Idea: Zeroconf/Avahi support?

Marcus Clyne eugaia at gmail.com
Tue Mar 10 01:52:07 MSK 2009


Manlio Perillo wrote:
> Cliff Wells ha scritto:
>> I've been considering a pair of Nginx modules that would support
>> Avahi/Zeroconf.  That is, let Nginx announce itself via Avahi (one
>> module) and another that would let it detect other services via Avahi
>> (the second module) for use with the upstream module.
>>
>> This would allow an Nginx instance to detect when new Nginx servers are
>> added to a cluster (upstream) and automatically start load balancing
>> them without having to edit the config file and signal Nginx.
>>
>
> This would probabily require a rewrite of the upstream module, to 
> support dynamic configuration.
>
What about using a repeating timed event that checked for new upstream 
servers, perhaps launching the search in a new thread?  If the server 
makeup has changed, then an event could be triggered to change the 
upstream configuration?  This wouldn't require re-writing the upstream 
module, but would it cause problems to existing connections to upstream 
servers?  Since events and file descriptors would already be registered 
by this point, the main problem might be with connections where the next 
upstream needed to be selected, but that might still be ok (depending on 
how it's implemented, which I've not looked at).

Of course rewriting of the upstream module might give a more elegant 
solution. ;-)
>
> > [...]
>
>
> Regards  Manlio
>
>

Marcus.





More information about the nginx mailing list