RabbitMQ & AMQP (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
RabbitMQ Clustering Internals: Erlang Mnesia Database and Node Types.
senior LevelSystem DesignDatabases & SQLRabbitMQ
In Simple Words: A RabbitMQ cluster binds multiple physical or virtual nodes into a single logical broker sharing the same Erlang cookie:
- Erlang Mnesia: A distributed, real-time DBMS embedded inside Erlang. It replicates cluster schema metadata (exchanges, users, virtual hosts, queue declarations) across all cluster nodes.
- Node Types:
- Disk Nodes: Persist metadata and runtime state to disk. A production cluster must have at least 2 Disk Nodes for quorum.
- RAM Nodes: Store metadata exclusively in RAM. Provides marginally faster queue declarations, but all data nodes in modern clusters are typically configured as Disk Nodes since metadata changes are infrequent.