Canary

What is canary testing?

Overview of canary testing

Canary testing releases new code or features to a small group of users before a full rollout. This approach helps you detect potential issues in a live production environment with minimal user impact. By catching issues early, you can address them before they affect all users.

The term "canary testing" comes from coal mining. Miners used canaries to detect toxic gases. If the canary showed signs of distress, it was a warning to evacuate. Similarly, canary testing warns you of problems in your new code.

Key points:

  • Small user group: Only a subset of users sees the new features.

  • Early detection: Identify and fix issues before a full deployment.

  • Minimal impact: Reduce the risk of widespread problems.

Using canary testing, you gain insights into real-world performance and user feedback. This lets you address issues incrementally. You can roll out changes gradually, ensuring a smoother transition to full deployment.

Benefits of canary testing

What are the key advantages?

Reduces risk: Bugs affect only a small user group, minimizing impact. This approach ensures issues are contained and manageable. Learn more about Canary Testing.

Real-world monitoring: You get performance feedback from actual users. It's a practical way to see how new features behave in production. Read about real-world examples.

Smooth transition: Issues can be fixed incrementally. This makes the deployment process less stressful and more controlled. See how Statsig helps with smooth transitions.

Key points:

How to implement canary testing

Steps to start canary testing

Create two environments: Set up one for the current production and another for the canary release. This separation ensures stability. Learn more about canary testing.

Use a load balancer: Direct a small percentage of traffic to the canary environment. This isolates potential issues to a limited user group. Utilize tools like feature gates to regulate the release.

Monitor and adjust: Gradually increase the user base if no issues are detected. Roll back immediately if problems arise. Effective event logging and metric creation can help track the feature's behavior and performance.

Key steps:

  • Initial setup: Separate environments. See how Statsig can help with implementation.

  • Traffic management: Load balancer distribution. Utilize Statsig's feature gates for controlled rollouts.

  • Incremental rollout: Gradual user base expansion. Learn more about progressive expansion.

  • Immediate rollback: Quick issue containment. For further reading, check out Statsig's blog.

Examples of canary testing in practice

Real-world applications

Social media platforms: Release new features to a small user group. Gauge engagement. Identify bugs. Learn more about canary testing

E-commerce sites: Test new payment gateways on a subset of transactions. Ensure stability and security. Canary launch methodology

Mobile applications: Roll out new app versions to a small group of beta testers. Use feature flags. Release to all users if stable. Statsig's feature gates

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