Fastly

Understanding the Statsig Fastly integration

Statsig's Fastly integration seamlessly pushes your Statsig configs to Fastly Config Stores. This powerful integration allows you to quickly bootstrap your Fastly projects with Statsig configurations, reducing setup time and complexity.

The key components of the Statsig Fastly integration are:

  • Fastly API Token: This token, obtained from your Fastly account, grants Statsig access to your Fastly resources.

  • Config Store ID: The unique identifier for your Fastly Config Store, where Statsig will push your configurations.

  • Statsig Fastly Data Adapter: A small piece of code that you'll implement in your Fastly worker to enable communication between Fastly and Statsig.

By leveraging these components, you can effortlessly sync your Statsig configurations with your Fastly setup. This integration ensures that your Fastly edge servers always have access to the latest Statsig configs, enabling real-time experimentation and feature management.

Whether you're running A/B tests, gradually rolling out new features, or personalizing user experiences, the Statsig Fastly integration makes it easy to deliver dynamic content at the edge. With Statsig and Fastly working together, you can confidently experiment and innovate, knowing that your configurations will be seamlessly deployed across your Fastly infrastructure.

Configuring the Statsig Fastly integration

To set up the Statsig Fastly integration, navigate to the Fastly integration settings in the Statsig Console under Project Settings -> Integrations. You'll need to provide two key pieces of information: the Fastly API Token and the Fastly Config Store ID.

The Fastly API Key can be found in the Fastly portal under Account -> API Tokens. Ensure that the token has Engineer Roles and Global access to enable Statsig to push configurations to your Fastly Config Stores.

You can create a new Config Store or identify an existing one using the Fastly API or CLI. Once you have the Config Store ID, input it into the Statsig Console along with the API Token.

After configuring the integration settings, implement the Statsig Fastly Data Adapter into your Fastly worker. This adapter allows your worker to fetch Statsig configurations from the linked Fastly Config Store, enabling seamless integration of feature flags and experiments into your Fastly-powered applications.

Keep in mind that Fastly Config Stores have maximum size limits that may prevent Statsig from pushing larger configurations. Additionally, Statsig ID Lists are not currently synced into Fastly Config Stores.

By following these steps and leveraging the Statsig Fastly integration, you can quickly bootstrap your Fastly projects with powerful feature flagging and experimentation capabilities provided by Statsig.

Limitations and best practices

When using Statsig's Fastly integration, it's important to understand the limitations of Fastly Config Stores. Fastly imposes maximum size limits on Config Stores, which may prevent Statsig from pushing larger configs. Check Fastly's documentation for the latest Config Store limits to ensure your configs fit within these constraints.

Another current limitation is that Statsig ID Lists are not synced to Fastly. If your experiments or feature gates rely heavily on ID Lists, you may need to find alternative ways to target users within Fastly until this functionality is supported.

As you transition from proof-of-concept to production with Statsig and Fastly, follow best practices for experiment design and rollout. Start with small, controlled tests and gradually ramp up to larger audiences while monitoring key metrics. Use Statsig's pre-production environments to validate your experiments before pushing to production.

To learn more about optimizing your Statsig and Fastly integration, consult the Statsig documentation, join the Statsig community Slack, and explore the Statsig GitHub repositories. These resources provide in-depth guidance, support, and examples to help you make the most of experimentation and feature management with Fastly.

Join the #1 experimentation community

Connect with like-minded product leaders, data scientists, and engineers to share the latest in product experimentation.

Try Statsig Today

Get started for free. Add your whole team!

What builders love about us

OpenAI OpenAI
Brex Brex
Notion Notion
SoundCloud SoundCloud
Ancestry Ancestry
At OpenAI, we want to iterate as fast as possible. Statsig enables us to grow, scale, and learn efficiently. Integrating experimentation with product analytics and feature flagging has been crucial for quickly understanding and addressing our users' top priorities.
OpenAI
Dave Cummings
Engineering Manager, ChatGPT
Brex's mission is to help businesses move fast. Statsig is now helping our engineers move fast. It has been a game changer to automate the manual lift typical to running experiments and has helped product teams ship the right features to their users quickly.
Brex
Karandeep Anand
President
At Notion, we're continuously learning what our users value and want every team to run experiments to learn more. It’s also critical to maintain speed as a habit. Statsig's experimentation platform enables both this speed and learning for us.
Notion
Mengying Li
Data Science Manager
We evaluated Optimizely, LaunchDarkly, Split, and Eppo, but ultimately selected Statsig due to its comprehensive end-to-end integration. We wanted a complete solution rather than a partial one, including everything from the stats engine to data ingestion.
SoundCloud
Don Browning
SVP, Data & Platform Engineering
We only had so many analysts. Statsig provided the necessary tools to remove the bottleneck. I know that we are able to impact our key business metrics in a positive way with Statsig. We are definitely heading in the right direction with Statsig.
Ancestry
Partha Sarathi
Director of Engineering
We use cookies to ensure you get the best experience on our website.
Privacy Policy