Uber has developed a chunked aggregation buffer strategy to overcome JVM memory limitations when computing exact distinct counts for high-cardinality non-rollup metrics in distributed data pipelines. This strategy partitions the bitmap aggregation buffer across a map, keyed on the top 16 bits of each hashed identifier, effectively eliminating the 2 GB JVM constraint and enabling concurrent execution of backfill jobs. This has reduced two-year backfill time by 65% on average and eliminated out-of-memory failures. The solution is generalizable beyond Uber's stack and addresses challenges in computing metrics like monthly active users at scale.
All Uber trails