Rabbitmq之Socket descriptors

        rabbitmq maximum number (Socket Descriptors) connected, Socket connections of RabbitMQ (socket descriptors) is a subset of the file descriptor (file descriptors, fd) is .

In other words, the maximum number of connections and the maximum number of file handles RabbitMQ can simultaneously open (file systems, pipes) are limited by the operating system settings for number of file descriptors, the two are shift in the relationship.

       Initially, available socket descriptor fd ratio of the number of available in about 0.8-0.9, this value is not fixed, when there is surplus socket descriptor,

RabbitMQ will use as much of the file descriptor for read and write disk files. With the establishment of an increasing number of socket connection to the server, the file handle to start recycling, to reduce the number.

        In short, RabbitMQ will give priority to the file descriptor used to establish a socket connection, sacrificing frequent open / close operation of the disk file to bring performance loss,

This trade-off is easy to understand, as a network server, of course, give priority to the network throughput. Thus, for the multi-queue write high number of concurrent connections queue so little difference between the performance slightly, such as using RabbitMQ do RPC.

When the socket connection to the server to establish the limit has been reached (sockets_limit), the server will not accept new connections. Here to distinguish clearly, it is no longer received RabbitMQ AMQP connection rather than a TCP transport layer connection,

       Reference Links: https://blog.csdn.net/huoyunshen88/article/details/42779389

Guess you like

Origin www.cnblogs.com/llwxhn/p/12436155.html