3 ms·
If you really want to do it dynamically, you could read the upstreams from Redis with a combination of Nginx modules. Or use Puppet and restart, as the other po
by justincormack 14y ago
If you really want to do it dynamically, you could read the upstreams from Redis with a combination of Nginx modules. Or use Puppet and restart, as the other poster suggested, as it won't break connections in progress.
- jvoorhis 14y agoStoring and reading the configuration from Redis will be slower at runtime, but should scale more easily for a large number of hosts and be much more responsive than using Puppet or Chef. I recommend choosing either solution based on the number of hosts and rate of change.
- jvoorhis 14y agoYou can also use a custom DNS resolver with Nginx, and point it to a tool like DNSMasq or PowerDNS [1]. [1] http://wiki.nginx.org/HttpCoreModule#resolver http://wiki.nginx.org/HttpCoreModule#resolver