Jane Street describes an optimization to Aria, its internal message bus, which processes multiple terabytes of data per day. During recovery, clients replay recent messages but often need only a small subset of the topics; scanning the entire stream became costly as more clients used the path.
The redesign indexes topic partitions rather than every individual topic. When a client requests data, the system merges the relevant indexes with a min-heap to restore message order while avoiding a huge per-topic index.
The company reports a 30% reduction in CPU use on production workloads. The write-up also explains why the original linear scan remained attractive at smaller scale: its cache locality made a simple algorithm competitive until concurrency and volume changed the bottleneck.
This is a useful case study in choosing an index around the actual query pattern, then validating the trade-off against production behavior. It also emphasizes that ordering and correctness constraints must survive any optimization to recovery.














