<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd" -->

---
title: Experiments: safely test code changes against live...
description: Inngest introduces Experiments, a feature for comparing versions of a step against live production traffic using execution data Inngest already tracks (timing,...
canonical: https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Experiments: safely test code changes against live production traffic | daily.dev
og:description: Inngest introduces Experiments, a feature for comparing versions of a step against live production traffic using execution data Inngest already tracks (timing,...
og:url: https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd
og:image: https://api.daily.dev/og/posts/rPu1blDQd.png
og:image:alt: Experiments: safely test code changes against live production traffic
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Experiments: safely test code changes against live production traffic

**[Inngest Blog](https://daily.dev/sources/inngest)** · 2 min read · 0 upvotes · 0 comments

## Summary

Inngest introduces Experiments, a feature for comparing versions of a step against live production traffic using execution data Inngest already tracks (timing, retries, failures, cost). Developers call group.experiment() with variants and a selection strategy; Inngest runs exactly one variant per run and memoizes the choice as a durable step so retries never switch mid-execution. Selection strategies include weighted ramping, consistent bucketing by user or org, custom flag-driven selection for a no-deploy kill switch, and a fixed mode to lock in a winner. Useful for rewrites, vendor or database migrations, and comparing models or prompts. Available now in the Inngest TypeScript SDK v4.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/changelog/2026-06-23-experiments>

## Questions this post answers

### How can I A/B test a rewritten function against production traffic without risking mid-execution inconsistencies?

Inngest's Experiments feature, available in the TypeScript SDK v4, lets you call group.experiment() with multiple variants and a selection strategy so exactly one variant runs per execution, memoized as a durable step. Retries and replays reuse the same variant instead of switching mid-run, and comparisons use execution data Inngest already tracks: timing, retries, failures, and cost.

_daily.dev surfaces practical patterns for safely rolling out rewrites and migrations like this._

### What selection strategies does Inngest's experiment API support for gradually rolling out a new implementation?

Inngest offers experiment.weighted() to ramp traffic gradually, experiment.bucket() to keep a specific user or organization consistently on one variant, experiment.custom() to drive selection from a feature flag for a no-deploy kill switch, and experiment.fixed() to lock in a winning variant once the rollout is complete.

_Teams choosing a rollout strategy can find comparisons like this via daily.dev._

## Similar posts on daily.dev

- [A/B test models in production](https://daily.dev/posts/a-b-test-models-in-production-w0dbvgkzs) · Together AI · 0 upvotes · 0 comments
- [Measure the business impact of every product change with Datadog Experiments](https://daily.dev/posts/measure-the-business-impact-of-every-product-change-with-datadog-experiments-ls3zdav77) · Datadog · 0 upvotes · 0 comments
- [Best practices for scaling A/B testing with experiment protocols](https://daily.dev/posts/best-practices-for-scaling-a-b-testing-with-experiment-protocols-58az5aj2g) · Datadog · 0 upvotes · 0 comments

---

Tags: [#ab-testing](https://daily.dev/tags/ab-testing), [#inngest](https://daily.dev/tags/inngest), [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Experiments: safely test code changes against live production traffic","url":"https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd"},"datePublished":"2026-09-13T19:57:48.392Z","dateModified":"2026-10-15T02:22:28.574Z","description":"Inngest introduces Experiments, a feature for comparing versions of a step against live production traffic using execution data Inngest already tracks (timing,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/677a9984928d01713348f62ed81723a2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/677a9984928d01713348f62ed81723a2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ab-testing,inngest,typescript","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"Experiments: safely test code changes against live production traffic"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/experiments-safely-test-code-changes-against-live-production-traffic-rpu1bldqd#faq","mainEntity":[{"@type":"Question","name":"How can I A/B test a rewritten function against production traffic without risking mid-execution inconsistencies?","acceptedAnswer":{"@type":"Answer","text":"Inngest's Experiments feature, available in the TypeScript SDK v4, lets you call group.experiment() with multiple variants and a selection strategy so exactly one variant runs per execution, memoized as a durable step. Retries and replays reuse the same variant instead of switching mid-run, and comparisons use execution data Inngest already tracks: timing, retries, failures, and cost. daily.dev surfaces practical patterns for safely rolling out rewrites and migrations like this."}},{"@type":"Question","name":"What selection strategies does Inngest's experiment API support for gradually rolling out a new implementation?","acceptedAnswer":{"@type":"Answer","text":"Inngest offers experiment.weighted() to ramp traffic gradually, experiment.bucket() to keep a specific user or organization consistently on one variant, experiment.custom() to drive selection from a feature flag for a no-deploy kill switch, and experiment.fixed() to lock in a winning variant once the rollout is complete. Teams choosing a rollout strategy can find comparisons like this via daily.dev."}}]}
```

