On this page

Client vs Server SDKs

Compare Statsig client and server SDKs to choose the right SDK for your platform based on security, latency, identity, and supported features.

Statsig offers client and server SDKs to enable experimentation and feature management across different parts of your application. This page outlines when to choose each.

Overview

Client SDKs run in code that executes on end-user devices, such as a website, mobile app, video game, or smart TV app. Server SDKs run on your servers (typically in the cloud), such as a web server or API server.

Many customers deploy both Server and Client SDKs, which lets them gate features on both the client and server side. While this is common, you can get value from Statsig by starting with one SDK type.

Usage

Client and Server SDKs follow a similar setup pattern:

  1. Initialize: Set up the SDK and download the latest values.
  2. Check an experiment/gate: Reference those values to assign an experiment or flag a feature.
  3. Log custom events: Log important app metrics to power your analyses.

After initialization, both Client and Server SDKs evaluate experiments/gates without a network request, and typically in less than 1ms. Checks in the Statsig SDKs are designed to be very efficient.

Conceptual differences

  • Data Privacy: The Server SDK runs in a secure, multi-user environment, so Server SDKs have access to the full ruleset describing each experiment and gate. Client SDKs fetch only the value for a single user, avoiding exposure of your configuration definitions.

Usage differences

Initialize and update logic

Client SDKs:

  • Configuration persists until next initialize or updateUser call
  • Call initialize at the start of each user session

Client SDKs

Server SDKs:

  • Poll Statsig servers for updates every 10 seconds by default (configurable)
  • Some SDKs support grpc streaming updates by connecting to the Statsig Forward Proxy

Server SDKs

Available SDKs

Client SDKs

Server SDKs

For more information on each SDK, refer to their respective documentation pages.

Got questions? Join the Statsig engineering and product team on the Statsig Slack channel.

Was this helpful?