On 30 November 2015 at 23:40:16, Konstantin Kalin (
konstant...@gmail.com) wrote:
> Let's look at following use cases:
> 1) Scale up (Adding new node into the cluster)
> The node will get only new connections (assuming that clients
> have a way to discover it). All existing queues will stay on other
> nodes. If an application doesn't create any new queue there is
> no horizontal scaling of workloads(queues) at all.
Queues must guarantee ordering. Therefore all work that happens in a queue
has to stay on that node (in fact, chances are using more than one CPU core
would yield next to no benefit).
Migrating existing queues is not currently on the roadmap.
> 2) Concurrent booting RabbitMQ cluster with services that use
> the broker - micro-service architecture.
> There is a big chance that the services are quick enough to establish
> connections with first available RabbitMQ node. Thus the load
> is not distributed at all. Even if we periodically drop a connection
> and establish a new one the queue will stay on same node. Only temporary
> queues are balanced.
See
https://github.com/rabbitmq/rabbitmq-server/releases/tag/rabbitmq_v3_6_0_rc1
and specifically
https://github.com/rabbitmq/rabbitmq-server/issues/121.
> Is there any plans or a feature to do workload balancing if one
> node gets more load?
Beyond what's mentioned above, distributing workload in a messaging system very much
requires re-distributing client connections for better data locality, and nearly all messaging protocols
we have today don't cover this in any way in their specs.
You are missing (or at least not mentioning) one other implementation detail
which is a much bigger issue in a cluster: how messages are mirrored from master.
Currently it happens by nodes forming a ring, which scalability-wise isn't great.
There are plans to replace this with Raft (and involve a quorum of nodes). This is a non-trivial
undertaking, however.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ