Skip to main content

Statsig Forward Proxy

The Statsig Forward Proxy is a service that we developed to be hosted and run in your own infrastructure. If SDKs are configured to use the forward proxy, it provides a closer, but also more reliable hop for retrieving Statsig dependent configurations from within your infrastructure instead of reaching out to our networks. The expected benefits of using the proxy are:
  1. Reduced dependency on Statsig Infrastructure Availability
  2. Improved performance through localization of download_config_spec to your cluster
  3. Improved cost savings and reduced network overhead through minimizing requests to Statsig Infrastructure
  4. Improved consistency of configurations, as the forward proxy becomes an articulation point for serving configs
  5. Support for cool features such as a streaming API through GRPC
If you have any questions about how to deploy, or need assistance, feel free to reach out to us on our slack channel or create a new github issue.

Installation

Helm Installation

The recommended way to install Statsig Forward Proxy in a Kubernetes environment is using the official Helm chart. Follow these steps to deploy:

Deployment Notes

Given that every use case for the proxy is different, we don’t have strict recommendations. However, we do have general recommendations:
  1. Understand what your general QPS to Statsig is. If you need help understanding this, feel free to reach out.
  2. If possibly using your payload, get a sense of what throughput can be supported by a single pod and then calculate how much you need to scale out by to support your traffic.
  3. Pre-scale the proxy for your max QPS and then begin to gradually rollout the proxy to services.
  4. Configure your auto-scaling, for most folks, scaling up at 70% utilization for CPU and memory is typically sufficient, but depending on your usage this might need to be tweaked.
If you are seeing scaling issues that can’t be resolved by scaling out horizontally, we recommend fronting it with nginx to help with flow control. If you need any help, we are happy to collaborate and work closely, just send a message to our slack channel to get further assistance.