As the use of RabbitMQ grows, there's a growing need for its operators and engineers to have a good understanding and appreciation of its internal design, and how its sub-components interact to meet the various messaging requirements in industry. In this talk I walk through the internal design of RabbitMQ, explaining some of the key components which attribute to its robustness and reputation of being a world leading and well trusted messaging system.
--
The first RabbitMQ Summit connected RabbitMQ users and developers from around the world in London on November 12, 2018. Learn what's happening in and around RabbitMQ, and how top companies utilize RabbitMQ to power their services.
https://www.rabbitmqsummit.com
RabbitMQ Summit was organized by:
- Erlang Solutions, offering world-leading RabbitMQ Consultancy, Support, Health Checks & Tuning solutions https://www.erlang-solutions.com/
- CloudAMQP, offering fully managed RabbitMQ clusters https://www.cloudamqp.com
RabbitMQ Summit 2018 was sponsored by the following companies.
Platinum sponsors:
Pivotal
LShift
Gold sponors:
Trifork
AWS
Silver sponsor:
Cogin Queue Explorer
2. QUICK ADDITIONAL ACKNOWLEDGEMENTS
▸ Saskia Kuipers (ESL)
▸ Johan Rhodin and Lovisa Johansson (84codes)
▸ Pieter Humphrey (Pivotal)
▸ Pivotal Engineering Team for all the great work, as always! (Dan Carwin’s team)
▸ Everyone here, Erlang Solutions customers, some who’ve traveled from quite far
3. GOAL: DESIGN & ARCHITECTURE
P C
▸ Explain the internal design and architecture of rabbit
APP-1 APP-2
▸ Ever present need for efficient communication
4. QUOTE
"A picture is worth a thousand words"
- Fred Barnard
- Ayanda Dube …. (last night!)
"A software system diagram is worth a thousand lines of code”
28. AMQP: NODE STATE
▸ Connection establishment
▸ Channel creation
▸ Create/declare an exchange
▸ Create/declare a queue
▸ Bind queue to exchange
P Cch2
30. AMQP HANDLING: QUEUE TO EXCHANGE BINDING
rabbit channel
queue.bind
format SRC & DST
strip “n” and “r”
resource names
Y
write
permitted DST?
Y
N
Is default X?
N
Y
read
permitted X?
Y
N
RETURN
rabbit_binding
valid
binding?
N
lookup
binding
[ _ ]
Y
[]
INSERT BINDING
MNESIA
queue.bind_ok
rabbit writer
31. AMQP: NODE STATE
▸ Connection establishment
▸ Channel creation
▸ Declare an exchange
▸ Declare a queue
▸ Bind queue to exchange
▸ Subscribe Consumer
P Cch2
37. OPERATIONS: CLUSTERING
▸ Adding “extra nodes” to mnesia configuration
▸ Replication and synchronisation of metadata
▸ Internal internode routing/referencing
synch synch
▸ Default distribution port 25672
38. OPERATIONS: HA QUEUES
M S1 S2
gm gm gmC
synch synch
▸ Backing queue switches to the mirror queue master
GM
▸ HA policies dynamically update queue state
▸ Synchronisation over Erlang distribution
39. CONCLUSION: DESIGN & ARCHITECTURE
▸ Not entirely fixed/static, common aspects
▸ Usage varies its internal design
▸ Creation and tearing down of resources (AMQP)
▸ Plugins will alter operation and design
▸ Version releases introduce design and architecture shifts
https://github.com/rabbitmq/rabbitmq-server/
https://github.com/rabbitmq/rabbitmq-common/