RabbitMQ VPS Hosting: Quorum Queues, Three-Node Clusters and a Production Checklist

One RabbitMQ node is fine for a side project. A production queue that must survive a server failure needs quorum queues on three nodes. Here is how to plan and check that setup.

A single RabbitMQ node on one VPS is fine while losing the broker for a while is acceptable. Once queued messages must survive a server failure, run three VPS nodes and use quorum queues: they replicate each message with the Raft protocol to three members by default and keep working with one node down. The rest of this post explains that choice and gives a checklist drawn from RabbitMQ's own production guidance.

For memory watermarks, disk alarms and publisher flow control in detail, see our earlier RabbitMQ memory and disk limits guide.

Why this matters

Message queues sit in the middle of order processing, email sending, payment callbacks and background jobs. If the broker loses messages, work silently disappears; if it stops accepting publishes, every upstream service starts timing out. Broker incidents usually trace back to one of three gaps: a single node with no replication, publishers that never wait for confirms, and disks that fill up because queues grew without limits.

One node or three?

QuestionOne node is enoughRun three nodes
Can messages be regenerated?Yes, from a database or logNo, the queue is the only copy
Is broker downtime acceptable?Minutes to hoursNo
Queue typesClassic queues are fineQuorum queues (or streams for long replays)
MaintenanceReboot during a quiet windowRolling restarts, one node at a time

RabbitMQ's documentation recommends odd cluster sizes. A quorum is a majority of members, so three members tolerate one failure and five tolerate two. Two nodes give no fault tolerance for quorum queues, and the documentation advises against running them on more than seven nodes, with performance tailing off above five.

What quorum queues need from a VPS

  • Disk: all quorum queues on a node share a write-ahead log, 512 MiB by default. RabbitMQ recommends allocating at least three times the effective WAL limit, with four times as a starting point, before counting message segments.
  • Memory: each queue keeps an in-memory index of at least 32 bytes per message, roughly 1 MB per 30,000 messages. Short queues and a max-length limit keep this predictable.
  • Durable local storage: the production checklist prefers SSD or NVMe and warns against shared or distributed file systems for the data directory.
  • Not for everything: quorum queues are always durable and cannot be exclusive, so temporary reply queues and short-lived queues should stay classic. Very long backlogs (5 million messages and up) and large fan-outs suit streams better.

Declare a quorum queue by passing x-queue-type=quorum when the queue is created; the type cannot be changed later, so decide before the first deploy.

Production checklist

Nodes and storage

  • At least 4 CPU cores and 4 GiB of RAM per node, and no other data services on the same VPS.
  • Generous disk; quorum queues and streams can have large on-disk footprints.
  • Clocks synchronised with NTP on every node.

Users and access

  • Delete the default guest user.
  • One user per application, with generated passwords.
  • Disable anonymous login with anonymous_login_user = none.
  • Restrict inter-node and CLI ports to the cluster members; expose only client ports to applications, over TLS with peer verification.
  • Generate a secure Erlang cookie and lock down its file permissions.

Limits and alarms

  • Keep vm_memory_high_watermark.relative between 0.4 and 0.7 (default 0.6).
  • Raise disk_free_limit well above the 50 MB default, close to the memory watermark size.
  • Set the open file handle limit to at least 50,000.
  • Choose a partition handling strategy before go-live; pause_minority is the usual choice with an odd node count.

Applications

  • Use publisher confirms. With quorum queues, a confirm is sent only after the message reaches a majority of replicas.
  • Use manual consumer acknowledgements.
  • Keep connections long-lived, with separate connections for publishing and consuming, so publisher flow control does not slow acknowledgements.
  • Keep heartbeat timeouts at 5 seconds or more and avoid polling with basic.get.
  • Configure a dead-letter exchange; since RabbitMQ 4.0, quorum queues drop or dead-letter a message after 20 failed deliveries by default.

Mistakes to avoid

  • Building a two-node cluster and assuming it is highly available.
  • Leaving disk_free_limit at its default on a small VPS disk.
  • Disabling the delivery limit, which lets a poison message loop forever.
  • Putting the broker on the same VPS as a busy database.
  • Treating replication as a backup: export definitions and keep them in version control.

StreamData's KVM VPS plans run from 1 GB to 128 GB of RAM on RAID NVMe storage, so three matching mid-size plans make a straightforward cluster, and the 9950X VPS range suits brokers that are CPU-bound on TLS or high message rates. Keep cluster members on a low-latency network close to each other.


Sources