Hook called if a new connection or a keep-alive connection
cannot be scheduled immediately to a worker. Dict contains the
following keys:
- port:Port
- Port number that identifies the server.
- reason:Reason
- One of
accept
for a new connection or keep_alive
if a
worker tries to reschedule itself.
- peer:Peer
- Identify the other end of the connection
- waiting:Size
- Number of messages waiting in the queue.
- queue:Queue
- Message queue used to dispatch accepted messages.
Note that, when called with reason:accept
, we are called in
the time critical main accept loop. An implementation of this
hook shall typically send the event to thread dedicated to
dynamic worker-pool management.
- See also
- - http_add_worker/2 may be used to create (temporary) extra
workers.