Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I control the number of concurrent client connections and the size of the request queue on a server?

0
Posted

How can I control the number of concurrent client connections and the size of the request queue on a server?

0

The rpc_server_listen() call creates a pool of threads to handle incoming RPCs. The server can be actively working on at most this many RPCs simultaneously. The size of the pool is controlled by a parameter to rpc_server_listen. This is the primary place where you are expected to control the number of simultaneous connections. If you want to go deeper, into the question of what happens when all the server-listen threads are busy, things become tricky, because there are so many factors affecting the answer. If all the server threads are currently busy, incoming requests will be queued by the RPC runtime. There is not an explicit API for controlling the size of this queue. The rpc_use_protseq*() calls have a “max calls” parameter, but its effect is murky and it may be ignored completely by the implementation. If the RPC queue is full, the runtime will not accept any more network messages. Incoming requests will therefore be held at the network protocol layer, which maintains a queue of i

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123