Implementing Raft in RabbitMQ
summary
RabbitMQ adopts Raft to replace fragile queue mirroring: a mostly complete Raft library (to be open‑sourced under Apache‑2/MPL‑1.1) is built after ~9–10 months, exercised with property‑based testing and Bosch deployment checks. Early tests with a thousand Raft-backed queues show massive fsync contention, so a shared write‑ahead log per node with batched fsyncs and a central heartbeat reduces chatter and disk pressure. Work is functional in testing, exposes tradeoffs (fsync latency, quorum needs, single‑leader bottleneck) and remains a work‑in‑progress.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:30Safe Harbor Statement
- 0:54What is RabbitMQ
- 1:42RabbitMQ nodes can form clusters
- 2:02Sections
- 2:37RabbitMQ High Availability
- 3:23RabbitMQ HA story isn't perfect!
- 5:12Chain replication
- 6:11RabbitMQ Mirrored Queue ring
- 6:55RabbitMQ Queue Mirror failure detection
- 7:26RabbitMQ Mirrored Queue reforms ring
- 8:30RabbitMQ Queue mirror sync
- 9:09RabbitMQ documentation wisdom
- 9:58RabbitMQ Queue Mirroring
- 10:46What do we need?
- 12:30Options
- 15:42Raft provides
- 17:27Raft protocol: replicate entry
- 18:05Raft protocol: reply + commit
- 19:30Taking action
- 20:56Raft vs Queue Mirroring failure handling
- 21:50Raft vs Queue Mirroring leader failure
- 23:09In response to (potential) failure
- 23:46Raft in RabbitMQ
- 27:43Message store replication
- 30:22Raft challenges
- 32:30Operational changes
- 33:25Ra: a Raft library
- 37:32Ra: implementation testing
- 39:35Summary
- 40:56RabbitMQ 3.7
related talks
37mImplementing Raft in RabbitMQ
43mRa: a Raft implementation
51mKeynote: Quorum Queues: A Retrospective
41mThe Raft Consensus Algorithm
47mDistributed Systems: When Democracy and Computer Science Come Together
44mCluster Consensus: When Aeron Met Raft
21mApache Ratis - A High Performance Raft Library
01h 12mCo-designing Raft + thread-per-core execution model for the Kafka-API
