Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteConfig Megaissue #26567

Open
6 of 18 tasks
benjackwhite opened this issue Dec 2, 2024 · 0 comments
Open
6 of 18 tasks

RemoteConfig Megaissue #26567

benjackwhite opened this issue Dec 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@benjackwhite
Copy link
Contributor

benjackwhite commented Dec 2, 2024

RemoteConfig Megaissue

See the RFC.

We're going to try and move as much as we can of our "decide" endpoint into static configs, driven largely by a CDN so that we can dramatically reduce how much we hit our existing endpoint as well as providing a migration path to the new "flags" service.

MVP

Initial implementation here: #26348

  • RemoteConfig class that generates this config as and when it is needed
  • Generates a config json, a config js and an array.js on endpoints /array/...
  • Tracks a metric so we can alarm on it
  • Flagged UI for this new array.js
  • Generates a second file that actually includes the site_apps code to be executed
  • Generates a third file that is a personalised array.js loader
  • Check if this breaks array.js.map for the extra configs
  • Figure out what to do about the one or two replay things that are "dynamic" (like checking the domain...)
  • Cronjob that takes care of ensuring things are in sync (just in case)
    • Maybe do this with a hash or something so we can detect whether changes are necessary or not
  • Decide endpoint having an option to use this RemoteConfig instead of the existing team access (with tests to cover it all)
  • Hook up to CDN and add cache invalidation
  • Add missing listener for quota limits changing

Future work

  • Bundle dependencies automatically based on configs (i.e. surveys if surveys are enabled, recordings etc.)
  • Update Mobile SDKs
  • Update PostHog JS
  • Setup legacy decide endpoint for flags service
  • Add surveys to the remote config (either as normal or its own config endpoint

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant