Branch-Based A/B Testing: Using Copy-on-Write Database Branches as Experiment Variant Isolation Primitives
We present a system for conducting A/B experiments at the database level using copy-on-write (COW) database branches as the isolation mechanism for experiment variants. Unlike conventional A/B testing systems that route users to different application code paths or UI variants, our approach routes database queries to different COW database branches, enabling experimentation with schema changes, index strategies, data transformations, and stored procedure modifications with zero storage overhead at branch creation. The system comprises three integrated components: (1)~a deterministic user-to-branch router supporting multiple assignment strategies (hash-based, attribute-based, group-based) with sticky session caching; (2)~an experiment lifecycle manager with traffic control (Active, Paused, Completed states); and (3)~a per-branch metrics collector recording query performance, success rates, and custom business events with automatic inter-branch statistical comparison. We describe the architecture, routing algorithms, and metrics collection pipeline as implemented in HeliosDB, an open-source PostgreSQL-compatible embedded database. To our knowledge, no prior system combines COW database branching with integrated A/B experiment user routing and per-branch analytics.
Authors
- Daniel Moya Vaca
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-03-25
- DOI
- https://doi.org/10.5281/zenodo.19242078
- Primary Topic
- Advanced Database Systems and Queries
- Type
- article
- Field-Weighted Citation Impact
- 0.00