---
title: "Scaling and benchmarking a critical message bus using a new indexing strategy"
description: "Aria, Jane Street's internal message bus, was burning CPU by linearly filtering its in-memory ring buffer whenever lagging clients recovered a subset of topics."
url: "https://swe.quest/articles/scaling-and-benchmarking-a-critical-message-bus-using-a-new-indexing-strategy-b90c14ae394a3109"
canonical: "https://blog.janestreet.com/scaling-and-benchmarking-a-critical-message-bus/"
source: "Jane Street Tech Blog"
published: "2026-10-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["messaging","performance","data-structures","algorithms","testing"]
---

# Scaling and benchmarking a critical message bus using a new indexing strategy

A post on [Jane Street Tech Blog](https://swe.quest/sources/jane-street.md), published 2026-10-05, 9 min read, Case study. Original: [https://blog.janestreet.com/scaling-and-benchmarking-a-critical-message-bus/](https://blog.janestreet.com/scaling-and-benchmarking-a-critical-message-bus/)

## Summary

Aria, Jane Street's internal message bus, was burning CPU by linearly filtering its in-memory ring buffer whenever lagging clients recovered a subset of topics. An intern added per-topic-partition indexes, merged with an n-way min-heap and stored in a shared pool of 1024-entry blocks so indexes grow and shrink dynamically, which cut CPU by about 30% on real workloads. For on-disk initial recovery, where one restart went from 2.5 seconds to 13 minutes by reading 10x more data than needed, a fixed three-segment subtree split was replaced with adaptive splitting that combines greedy clustering and binary search over per-topic volume. Both changes were validated with agent-driven heap benchmarks, expect tests, property-based tests and Antithesis runs.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Data structures](https://swe.quest/tags/data-structures.md) (Architecture & design)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)

## Prerequisites

- pub/sub messaging ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))
- ring buffers
- heaps and n-way merge

## Keywords

Aria, Antithesis, Jane Street, min-heap, fast\_heap\_unboxed

## Related posts

- [Getting from tested to battle-tested](https://swe.quest/articles/getting-from-tested-to-battle-tested-e1b6bb8c2cdb1387.md): Jane Street Tech Blog · 2025-12-03 · Medium · 13 min read · Testing, Distributed systems, Debugging, Formal methods, Queues & messaging
  Jane Street's Aria, a low-latency message bus with strong ordering guarantees, already had unit, simulated-network, quickcheck, AFL fuzz, version-skew, lab and chaos tests, yet adding Antithesis's deterministic-hypervisor testing surfaced two unknown bugs on the first run.
- [FOQS: Making a distributed priority queue disaster-ready](https://swe.quest/articles/foqs-making-a-distributed-priority-queue-disaster-ready-0c0b1a2a20084eae.md): Meta Engineering · 2022-01-18 · Medium · 10 min read · Queues & messaging, Resilience, Replication, Distributed systems, MySQL
  Meta's FOQS distributed priority queue moved from isolated regional installations on semi-synchronous replicated MySQL to a single global installation, after Hurricane Florence in 2018 exposed manual traffic rebalancing and items stuck on unreachable shards.
- [Enhancing Distributed System Load Shedding with TCP Congestion Control Algorithm](https://swe.quest/articles/enhancing-distributed-system-load-shedding-with-tcp-congestion-control-algorithm-c180104e3f071048.md): Zalando Engineering · 2024-04-22 · Medium · 9 min read · Resilience, Event-driven architecture, Queues & messaging, Microservices
  Zalando's customer communication platform applies TCP-style AIMD (Additive Increase Multiplicative Decrease) congestion control at its ingestion point to shed load and prioritize critical messages.
- [Index sharding in ClickHouse Cloud: Petabyte-scale data needs petabyte-scale indexing](https://swe.quest/articles/index-sharding-in-clickhouse-cloud-petabyte-scale-data-needs-petabyte-scale-162dcf2c4093c588.md): ClickHouse · 2026-04-21 · Hard · 16 min read · Query engines, Analytics & OLAP, Distributed databases, Memory management, Performance engineering
  Index sharding in ClickHouse Cloud splits primary and secondary index analysis across replicas using consistent hashing over data parts.
- [How Meta built the infrastructure for Threads](https://swe.quest/articles/how-meta-built-the-infrastructure-for-threads-961a6b509998fe97.md): Meta Engineering · 2023-12-19 · Medium · 7 min read · Scaling, Distributed databases, Multi-tenancy, Serverless, Resilience
  Threads reached 100 million sign-ups in five days on existing shared Meta infrastructure rather than purpose-built systems, illustrated through two components: ZippyDB and Async.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
