Skip to main content
← CONCEPTS / CONCURRENCY & RUNTIME
An end-to-end domain learning journey

LMAX Disruptor &
Lock-Free Ring Buffers.

The LMAX Disruptor replaces lock-contended queues with a pre-allocated power-of-two ring buffer, single-writer/CAS sequence claiming, and 64-byte cache-line padding to eliminate GC pauses and false sharing.
Start the journey7 sections· Last modified Nov 23, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

If lock contention or cache misses stall worker threads, pre-allocate a 2^N ring buffer, claim slots with seq & (N - 1), pad sequence cursors to 64 bytes, and gate producers on the slowest consumer sequence.

TL;DR30-second simplified summary
▾

The LMAX Disruptor eliminates lock contention, false sharing, and GC churn via a pre-allocated 2^N ring buffer, two-phase CAS slot claiming, and 64-byte padded Sequence cursors. SequenceBarriers coordinate parallel and DAG consumer stages while WaitStrategies trade CPU for tail latency.

Full walkthrough · 7 stages
01
L4 · FUNDAMENTALS

.

02
L4 · FUNDAMENTALS

.

03
L5 · APPLIED DESIGN

.

04
L5 · APPLIED DESIGN

.

05
L6 · SCALE & TRADE-OFFS

.

06
L6 · SCALE & TRADE-OFFS

.

07
L7 · STAFF / PRINCIPAL

.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

Why does the Disruptor pad each 8-byte Sequence cursor to 64 bytes?

Recommended Learning Flow