Problem
Omicron, the A/B platform at Mail.ru, runs up to 100 experiments and 5,000 metrics a day. Metrics were computed from raw client-analytics hit tables of several terabytes that also hold events no metric needs. Experiment group IDs sit in one array field of every event and must be unpacked on each query. The same metric on different sources needed duplicated scripts, and a new metric type took sprints because analysts handed Jupyter notebooks to developers. Poorly optimized metrics could take days to compute, and analysts recalculated unsupported metrics by hand.
Example from the article: the Cloud team needs an extrapolated subscription LTV built from historical data, and its method changes from time to time.
Solution in brief
Build a standardized per-user cumulative table with only the needed events, aggregated hits and parsed group IDs, and compute all metrics from it on Spark. Keep metric types, scripts and statistical formulas as YAML configs in an analytics repository that analysts edit themselves.
Questions this case answers
- How to scale experiment metric computation to thousands of metrics a day when each metric scans multi-terabyte raw event tables and metric logic is duplicated per data source
- How to let analysts define and change metric types and statistical tests without engineering involvement in an experimentation platform
- How to make A/B test metric calculation fast when hundreds of experiments and thousands of metrics run on raw event tables?
- How to let analysts add new metric types without a development sprint for each one?
Tools and methods
- Cumulative per-user table — aggregated events per user, day and experiment group; the single input for all metrics
- Analytics repository with YAML configs — metric types, SQL scripts and test choice, editable by analysts
- Apache Spark over HDFS — chosen over ClickHouse: storage is HDFS, and Spark combines statistics libraries with distributed compute
- Mann-Whitney test with bucketing, z-test, linearization + t-test — test choice by metric kind
Google or a one-time email code. No password.