Deep Dives

Deep Dives

Mechanism-level walkthroughs of how Aeron Cache achieves consensus, low-latency transport, and GC-light performance.

Under the hood

Most caches are a hash map with a network adapter bolted on. Aeron Cache is the inverse: it starts from a messaging fabric — Aeron, the same transport that moves orders on exchanges — and treats the key-value store as a deterministic state machine riding on top of it. The result is a cache that is simultaneously highly available (RAFT-replicated across nodes), fast (binary SBE over reliable UDP or shared memory), and frugal (buffers and flyweights instead of per-request allocation).

These deep dives are the engineering commentary track. Each one takes a single mechanism, grounds it in the real classes and schema that ship in the repo, and explains not just what it does but why the design holds up under load. They assume you are a backend, platform, or distributed-systems engineer and would rather see AbstractCacheClusterService than a marketing diagram.

If you are new here, start with Getting Started and the embedded clients overview, then come back and pick a thread:

The five dives

  • RAFT consensus — How Aeron Cluster turns the cache into a deterministic replicated state machine. Leader, followers, the replicated log, snapshots, and why TTL runs on cluster timers instead of wall-clock time.

  • Aeron + SBE transport — What Aeron actually is, how the SBE wire protocol (schema id 7, little-endian, zero-copy flyweight codecs) is laid out, and why a binary-over-Aeron path leaves JSON-over-HTTP behind for latency-sensitive clients.

  • Low-GC design — Mechanical sympathy in practice: Agrona buffers, object pools, flyweights, single-threaded agents, and configurable idle strategies. Performance designed in, not tuned in afterwards.

  • JSON Merge Patch — Patch-native caching with RFC 7386. Recursive merge semantics, PATCH_ITEM deltas, patch-mode subscriptions, and the embedded object cache that rebuilds full objects locally.

  • Streaming Subscriptions — The subscription model end to end: keyed and patch-mode filters, the subscribe-ack barrier, the five update event types, and how near caches and client-side embedded mirrors stay in sync.

Each dive cross-links the others where the mechanisms meet — and they meet often. TTL timers only work because the state machine is deterministic; patch-mode streaming only pays off because the embedded object cache can reassemble deltas; the whole thing is only fast because the transport and the service agent both refuse to allocate on the hot path.