A feature I’d like to see is the ability to use the “include” directive
in an upstream block
something like
upstream proxy3011 {
include “proxy.conf”;
}
using a proxy.conf like
server 192.168.0.1 max_fails=5 fail_timeout=10s;
server 192.168.0.2 max_fails=5 fail_timeout=10s;
server 192.168.0.3 max_fails=5 fail_timeout=10s;
server 127.0.0.1 backup;
why ?
At the moment I have a bunch of upstream block using all the same
configuration
so adding or removing a server from the list is quite painfull.
Why do I use a bunch of upstream block using the same configuration, for
one reason:
Using a single upstream block is quite dangerous in my case. If one
application fails then one or more server are set inoperative
for all the application using this upstream. Using one upstream for each
application solves this issue
using a proxy.conf like
so adding or removing a server from the list is quite painfull.
Why do I use a bunch of upstream block using the same configuration, for one reason:
Using a single upstream block is quite dangerous in my case. If one application fails then one or more server are set inoperative
for all the application using this upstream. Using one upstream for each application solves this issue
What do you think ?
The same “problem” that you are describing can be solved with say Module ngx_http_proxy_module while
keeping one upstream block.
The same “problem” that you are describing can be solved with say Module ngx_http_proxy_module while
keeping one upstream block.
In my case if I setup a single upstream like this for instance :
upstream guinicorn {
server 192.168.0.171 max_fails=1 fail_timeout=10s;
server 192.168.0.172 max_fails=1 fail_timeout=10s;
server 192.168.0.173 max_fails=1 fail_timeout=10s;
server 192.168.0.174 max_fails=1 fail_timeout=10s;
server 192.168.0.175 max_fails=1 fail_timeout=10s;
server 127.0.0.1 backup;
}
if one of this app fails badly in five request all the upstream servers
are set inoperative.
The behavior I noticed (few years ago, may be this has changed) is that
all the app
using this upstream will be using the backup server. So if one app
fails, the other fails to.
May be this behavior has changed, but now I create an upstream for each
app and I never had the problem again.
xav
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.