Creation and expiration of Dispatcher Worker Processes

From Messaging Server Technical Reference Wiki
Jump to: navigation, search

There are automatic housekeeping facilities within the Dispatcher to control the creation of new and expiration of old or idle Worker Processes. The basic options that control the Dispatcher's behavior in this respect are min_procs and max_procs. min_procs provides a guaranteed level of service by having a number of Worker Processes ready and waiting for incoming connections. max_procs, on the other hand, sets an upper limit on how many Worker Processes may be concurrently active for the given service.

Since it is possible that a currently running Worker Process might not be able to accept any connections either because it is already handling the maximum number of connections of which it is capable or because the process has been scheduled for termination, the Dispatcher may create additional processes to assist with future connections.

The min_conns and max_conns options provide a mechanism to help you distribute the connections among your Worker Processes. min_conns specifies the number of connections that flags a Worker Process as "busy enough" while max_conns specifies the "busiest" that a Worker Process can be.

In general, the Dispatcher will create a new Worker Process when the current number of Worker Processes is less than min_procs or when all existing Worker Processes are "busy enough" (the number of currently active connections each has is at least min_conns).

The max_life_conns, max_life_time, and max_idle_time Dispatcher options all affect when the Dispatcher will expire "old" or idle Worker Processes.

Note that if a Worker Process is killed unexpectedly, e.g., by the UNIX kill command, the Dispatcher will still create new Worker Processes as new connections come in. Only shutting down the specific Dispatcher service, disabling the specific Dispatcher service followed by restarting the Dispatcher, or shutting down the Dispatcher itself, will stop the Dispatcher's creation of new, as-needed, Worker Processes, (up to the Dispatcher's configured maximum number of such processes). (See the shutdown utility, or after disabling a service the restart utility, for how to shut down a service entirely.)

See also: