Forum Discussion

Pierre_F_268999's avatar
Pierre_F_268999
Icon for Nimbostratus rankNimbostratus
Jun 06, 2016

Reproduce NGinx proxy_next_upstream system on F5

Hi,

I'm asking myself if it possible to reproduce NGinx

proxy_next_upstream
system on
F5
.

As a reminder, here is how it works on NGinx:

Given a pool of upstream servers let's call it

webservers
compose by 2 instances:

upstream webservers {
  server 192.168.1.10:8080 max_fails=1 fail_timeout=10s;
  server 192.168.1.20:8080 max_fails=1 fail_timeout=10s;
}

With the following instruction, if a tcp connection fail on first instance when routing a request (because instance is down for example), NGinx automatically reroute request to the second instance (USER DOESN'T SEE ANY ERROR).

Furthermore, instance 1 is blacklisted for 10 seconds (
fail_timeout=10s
).

Every 10 sec, NGinx will try to route 1 request to instance 1 (to know if instance is coming back) and make the instance available again if it succeed otherwise it wait again 10 sec to try.
location / {
  proxy_next_upstream error;
  proxy_pass http://webservers/$1;
}

I hope I'm clear enough...

Thanks for your help.

Pierre from France.