Why architecture matters here

Disruptor fails on wrong wait strategy (CPU burn), sizing (buffer too small), and misunderstanding the model. Architecture matters because mechanical sympathy is the point.

Advertisement

The architecture: every piece explained

The top strip is the core. Producer claims slot. Ring buffer pre-allocated. Sequences producer + consumer cursors. Consumer(s) wait on sequence.

The middle row is tuning. Wait strategies busy / yield / block. Cache-line padding avoid false sharing. Barrier + dependencies consumer graph. Batch processing amortize.

The lower rows are ops. Configurations single vs multi producer. Metrics. Ops — sizing + lifecycle.

LMAX Disruptor — ring buffer + sequences + wait strategies + mechanical sympathymillions of messages per second, single JVMProducerclaim slotRing bufferpre-allocated slotsSequencesproducer + consumer cursorsConsumer(s)wait on sequenceWait strategiesbusy / yield / blockCache-line paddingfalse sharing avoidBarrier + dependenciesconsumer graphBatch processingamortize costsConfigurationssingle vs multi producerMetricsthroughput + latencyOps — sizing + startup + shutdowntunepadcomposebatchconfiguremeasuremeasureoperateoperate
LMAX Disruptor ring buffer with sequences and cache-line padding.
Advertisement

End-to-end flow

End-to-end: producer publishes event to slot. Consumer waits on sequence via busy-spin. Consumer batches available events. Barrier waits for upstream consumer for pipelines. Throughput 6M+ ops/sec on one core.