communication between worker processes

Maxim Dounin mdounin at
Mon Oct 19 09:25:23 MSD 2009


On Mon, Oct 19, 2009 at 12:23:00AM -0400, Leo P. wrote:

> How might I be able to send a message or (custom) event to some
> given worker process? I am storing pointers to requests (and the
> workers that processed them) in shared memory for a module (
> ), and need to alert
> said workers to respond to said requests, from the context of a
> location request handler in a module. (maybe using ngx_channel
> stuff?)
> I'd really appreciate any suggestions.

There is no infrastructure for interprocess notifications in 
nginx right now.  Basically it's the reason why there is no such 
things as busy locks and so on.

You may try to emulate it via e.g. message queue in shared memory 
and periodic timer in each worker process to check it.  It's not 
perfect, but probably will work for you.

Maxim Dounin

More information about the nginx mailing list