In GrowthBook 1.9, we launched the GrowthBook Proxy server to enable faster feature rollouts for self-hosted instances. With the Proxy, changes you make in the GrowthBook UI (e.g. disabling a feature) are released to all of your users in production in under a second.
We've gotten great feedback from our self-hosted community and we're excited to bring the benefits of the GrowthBook Proxy server to more people. Over the next several weeks, we're going to enable these same instant feature releases on all Pro and Enterprise accounts on GrowthBook Cloud!
No need to deploy and scale your own Proxy servers, everything will just work automatically.
How does it work?
GrowthBook Cloud serves billions of feature flags every month. To do this reliably at scale, we rely on a globally distributed CDN, short TTLs, and stale-while-revalidate headers.
If a user requests feature flags from our Cloud, it will get routed to an edge location closest to them. Most of the time, the edge location will already have a cached copy and can return instantly. If that cached copy is more than 30 seconds old, the CDN will refresh it in the background. In the rare event a cached copy does not exist, we forward the request to our Origin server and cache the response for future requests.
This is all well and good, but it means features could be 30-60s out-of-date. If a feature is causing your site to break, you want to be able to turn it off immediately, not in 30-60 seconds.
To solve this issue at scale, we use Redis Pub/Sub and Server-Sent Events. After receiving a cached copy of features, SDK clients connect to one of our globally distributed proxy servers, replay recent updates, and subscribe to future changes. When you toggle a feature in GrowthBook Cloud, we use Redis Pub/Sub to notify all of the proxy servers, which in turn notify all of the connected clients through Server-Sent Events. All of this happens quickly - typically within 1 second.
You get the best-in-class uptime and speed of a global CDN combined with the responsiveness of a real-time system.
Interested in contributing and helping us implement this in your language? Join our community Slack