Behind the scenes: Statsig's backend performance

Mon May 13 2024

Jack Virag

Editor in Chief, Statsig

Brent Echols

Software Engineer, Statsig

Statsig was designed to support everything, everywhere, all at once.

When it comes to backend performance, developers and product managers need assurance that the tools they integrate can handle high loads, maintain low latency, and offer reliable service.

Statsig was built with these requirements in mind and has specifically tailored its infrastructure and caching strategies to ensure high availability even under extreme volumes of data.

Statsig backend performance

Infrastructure and scalability

Statsig's backend is built to scale and handle a vast amount of data efficiently.

With hundreds of billions of events processed daily, Statsig's infrastructure is designed to support applications ranging from thousands to billions of end-users. Here's how Statsig achieves this:

  • Distributed architecture: Statsig services are deployed across multiple regions, ensuring high availability and consistent uptime. If one region experiences issues, traffic is automatically routed to other healthy regions.

  • Autoscaling and resource provisioning: Statsig uses autoscalers and over-provisioned resources to handle sudden bursts of traffic gracefully, preventing service disruptions.

  • DDoS protection: Mechanisms are in place to reduce unintended or malicious spikes in traffic, safeguarding against Distributed Denial of Service (DDoS) attacks.

  • GitOps practices: Infrastructure changes follow the GitOps approach, including code reviews, validations, and continuous integration and deployment (CI/CD), to minimize human errors.

  • 24/7 on-call engineering: Statsig maintains a round-the-clock engineering on-call rotation to address customer-facing alerts and issues promptly.

Low latency

Statsig's commitment to low latency is evident in its SDKs and APIs:

  • Sub-Millisecond Latency: Post-initialization evaluations typically have less than 1ms latency, ensuring that feature gate and experiment checks are swift.

  • Offline Operation: Once initialized, Statsig's SDKs can operate offline, reducing the dependency on network connectivity and further lowering latency.

  • Default Values: If an experiment configuration isn't set, the application receives a default value without impacting the end-user experience.

High availability and reliability

Statsig's service level objectives (SLOs) for availability are actively tracked to maintain high uptime, exceeding 99.99% reliability.

The platform's design includes fallback mechanisms to handle scenarios where network requests may fail, ensuring that the application continues to function as expected.

Caching strategies

Caching is a critical component of Statsig's performance strategy.

The server SDKs incorporate local caching for project configurations, allowing for real-time evaluations without the need for a network request each time. Here's how caching contributes to performance:

  • In-memory caching: Server SDKs store rules for gates and experiments in memory, enabling evaluations to continue even if Statsig's servers were temporarily unreachable.

  • Polling and updates: The SDKs poll Statsig servers for configuration changes at configurable intervals, ensuring that the cache is up-to-date without excessive network traffic.

  • CDN caching: Configurations are cached in CDNs to ensure availability and low response times, even during a site event.

Built for builders

Whether you're one employee in a large, data-driven enterprise, or a self-starter looking to implement feature management and experimentation, Statsig has you covered.

Related reading: Statsig for startups

Statsig is known for its robust infrastructure, intelligent caching strategies, and commitment to low latency and high availability. By leveraging these capabilities, developers can integrate Statsig into their applications with confidence.

For those looking to dive deeper, Statsig's documentation and support channels—including Slack and live demos—are available for personalized assistance and address any performance and integration concerns.

Further reading

Create a free account

You're invited to create a free Statsig account! Get started today with 2M free events. No credit card required, of course.
an enter key that says "free account"


Try Statsig Today

Get started for free. Add your whole team!
We use cookies to ensure you get the best experience on our website.
Privacy Policy