Z
Z
zvonok13372018-12-07 10:33:40
Clustering
zvonok1337, 2018-12-07 10:33:40

Is it possible to increase the maximum value of RABBITMQ clients above 65535?

Hello. I am using RabbitMQ.
As you know, there are 65535 ports on a computer, therefore, only a maximum of 65535 clients can be connected to one broker, in theory, of course.
How can I increase this limit to 200.000? up to 1.000.000?
Or is it a different instrument? Which?
There are many consumers (client), and each has its own queue, where the task arrives. There are a lot of clients, and they differ in settings. Everyone has their own, unique.
Can you explain about clustering? Will it help in solving this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-12-07
@zvonok1337

Only 1 port is used on the server side, it is the client side that chooses a random one (by default), so the number of clients that the RabbitMQ server (and any other service) can serve is not limited by the port limit. (For example, on Linux, each connection is characterized by 5 parameters {proto, src_ip, scr_port, dst_ip, dst_port}.)
The limit is given by the computing resources that RabbitMQ manages. Since the queues in RMQ are not the simplest, they consume enough memory, I would say that each queue (assuming there are few messages) consumes 30-50 KB of RAM. You can try enabling Lazy Queue mode so that RQM always writes/reads from disk and does not cache messages in memory. Also RMQ loves the CPU but can distribute the load well across all the cores.
In cluster mode, RabbitMQ can distribute queues across all servers and serve the client on any of them (but you also need to balance clients across all nodes, ideally "binding" the client to one server). But the problems will start when RMQ nodes start to "fall" :-) Plus, the metadata about the queues is synchronized between all servers, so if the command flow for creating / deleting queues is high, then this alone can eat up a lot of CPU and network.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question