R&D Management 17 min read

How Huolala Built a Scalable A/B Testing Platform with Five Allocation Algorithms

Huolala’s A/B testing platform, serving over 200 business scenarios and thousands of experiments, combines a three‑stage workflow with a modular architecture—including a configuration console, SDK for traffic routing and data collection, and a robust data‑recovery pipeline—while offering five distinct allocation algorithms to ensure scientific experiment results.

Huolala Tech
Huolala Tech
Huolala Tech
How Huolala Built a Scalable A/B Testing Platform with Five Allocation Algorithms

Business Background

Huolala, founded in 2013 in the Greater Bay Area, provides intra‑city and inter‑city freight, enterprise logistics, moving, car sales, and post‑sale services. By April 2022 it operated in 352 Chinese cities, with 660,000 active drivers and 8.4 million active users each month.

The company runs more than 200 business scenarios, most of which require A/B experiments to guide product, algorithm, and strategy decisions. To date the platform has supported over 10,000 experiments, with more than 1,000 active experiments per month.

A/B Experiment Overview

The core idea of A/B testing is simple:

By using controlled variables, randomly assign samples to a treatment group and a control group, collect data, and apply statistical methods to determine which group performs better.

Modern internet A/B designs follow Google’s classic paper “Overlapping Experiment Infrastructure: More, Better, Faster Experimentation”, using concepts of “layers” and “domains” to allocate a portion of traffic for product feature validation.

Huolala A/B Experiment Platform Architecture

Platform architecture diagram
Platform architecture diagram

The platform follows three stages: pre‑experiment, during‑experiment, post‑experiment.

Pre‑experiment: Users design experiments on the configuration console, setting lifecycle, target audience, group allocation, traffic management, etc.

During experiment: The SDK handles traffic splitting, real‑time event logging, and monitoring data reporting. Data are collected via real‑time or batch pipelines.

Post‑experiment: Collected data undergo significance analysis and OLAP processing to generate significance reports and detailed metric dashboards.

Experiment Configuration Console

The console is the UI where product managers and analysts create experiments, define traffic splits, choose allocation methods, set target metrics, and bound the audience. It also provides real‑time status, traffic flow, anomaly alerts, and diagnostic tools. After an experiment ends, results—including confidence intervals and metric breakdowns—are viewed here, completing the experiment loop.

Configuration console screenshot
Configuration console screenshot

Traffic Reporting SDK

Developers integrate the SDK by requesting a layer ID, constructing request parameters, and invoking the split‑decision API and event‑logging API. The split‑decision response drives business logic, while logged events feed the evaluation pipeline.

Data Recovery Pipeline

The pipeline relies on Huolala’s big‑data infrastructure. Initially, SDK events are sent to Kafka, then ingested by the real‑time computation platform (FeiLiu) into raw tables. A daily T+1 batch job computes metrics into MySQL for display. Real‑time metrics use Flink to write directly to MySQL. With the maturation of the OLAP engine capable of sub‑second joins on billions of rows, all metrics have migrated to real‑time OLAP computation.

Data pipeline diagram
Data pipeline diagram

Five Traffic Allocation Algorithms

Scientific experiment results depend on proper sample selection and allocation. Random allocation is the most common method, but Huolala adds four more algorithms to accelerate convergence and maintain scientific rigor:

Time‑slice allocation, Time‑slice round‑robin allocation, Ordered time‑slice round‑robin allocation, Spatio‑temporal allocation

Random Allocation / Enhanced Random

Random allocation hashes a split key (e.g., user ID) with Murmur3, takes mod 100, and maps the result to a bucket pre‑filled according to group ratios. To improve uniformity, a consistent‑hash ring is used, locating the first node clockwise after the hash value.

Random allocation diagram
Random allocation diagram

Time‑Slice Allocation

Instead of a user ID, the allocation key is a time slice (e.g., 1 second). All requests arriving within the same slice are placed in the same group, optionally combined with a city ID to compare regional performance.

Time‑Slice Round‑Robin Allocation

Designed for order‑centric scenarios, this method assigns an entire time slice to a single group, preserving order across peak and off‑peak periods. A day is divided into equal slices (e.g., 3600 s). The number of slices per group follows a preset ratio, and a hash of the experiment ID randomises the slice order to keep results consistent across distributed nodes.

Time‑slice round‑robin diagram
Time‑slice round‑robin diagram

Ordered Time‑Slice Round‑Robin Allocation

This variant lets users explicitly define the sequence of slice‑to‑group assignments, possibly rotating through multiple sequences across periods. It gives full control over traffic distribution while still supporting rapid convergence.

Ordered time‑slice diagram
Ordered time‑slice diagram

Spatio‑Temporal Allocation

Used for intelligent surcharge scenarios, this approach first randomly splits traffic by a spatial key (e.g., origin‑destination pair) and then applies a time‑slice algorithm within each spatial bucket. Effectively a two‑layer experiment—spatial randomisation followed by temporal allocation—provides fine‑grained control over both dimensions.

Spatio‑temporal allocation diagram
Spatio‑temporal allocation diagram

Conclusion

The described architecture and allocation algorithms form the core of Huolala’s A/B testing platform, which now supports over 5,000 experiments and more than 15,000 experiment versions across all business lines. Future work will focus on improving experiment design usability, enriching metric sets, and adding AI‑driven traffic optimisation such as multi‑armed bandit techniques.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

A/B testingscalable architectureExperiment Platformtraffic allocationalgorithm design
Huolala Tech
Written by

Huolala Tech

Technology reshapes logistics

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.