Skip to main content

Built-In Traffic Splitting

A/B testing is a native primitive in Middlewr’s rule engine, not a bolted-on feature. Split nodes distribute traffic across two or more variants by weight, with deterministic visitor assignment that ensures consistent experiences.

Configurable Weights

Split traffic in any ratio — 50/50, 90/10, or across multiple variants. Weights must sum to 100.

Deterministic Assignment

FNV-1a hashing on visitorId + linkId ensures the same visitor always sees the same variant for a given link.

Per-Branch Analytics

Track clicks, geography, devices, and referrers for each variant independently. Compare performance in real-time.

Combine with Conditions

Chain splits after conditions to run experiments on specific segments — e.g., split only US mobile traffic between two landing pages.

How Splits Work

Split nodes use deterministic hashing to assign visitors to variants:
  1. The edge worker hashes visitorId + linkId using FNV-1a
  2. The hash is reduced to a number between 0-99
  3. The worker walks the cumulative weights to find the matching variant
  4. The visitor is routed to the variant’s target node
Because the hash is deterministic, the same visitor always lands in the same bucket for a given link — even across sessions.

Setting Up an A/B Test

1

Create a link with rules

Create a new link or edit an existing one. Set the link type to Rules and open the flow editor.
2

Add a split node

Drag a split node onto the canvas. Configure two or more variants with weights that sum to 100.
3

Connect destinations

Wire each variant to a destination node with the URL you want to test.
4

Optionally add conditions first

Place condition nodes before the split to only run the experiment on a specific audience segment (e.g., mobile visitors from the US).
5

Validate and publish

Middlewr validates that weights sum to 100, all branches have valid targets, and there are no cycles. Save to deploy instantly.
Start with a 50/50 split to establish a baseline, then adjust weights as data comes in. Middlewr’s per-branch analytics let you identify the winning variant without external tools.

Combining Splits with Conditions

The real power of A/B testing in Middlewr comes from combining splits with conditions. Run different experiments for different audience segments:
You can also chain transforms after splits to inject different tracking parameters per variant.

Multi-Variant Testing

Splits are not limited to two variants. Distribute traffic across three or more destinations:
Minimum two variants required. Each variant needs a weight between 1 and 100, and all weights must sum to exactly 100.

Next Steps

Analytics

Analyze per-branch performance to identify winning variants.

Conditional Routing

Target specific audience segments before splitting traffic.