Search code examples
nginxf5big-ip

Reproduce NGinx proxy_next_upstream system on F5 BIG-IP


I'm asking myself if it possible to reproduce NGinx proxy_next_upstream system on F5 BIG-IP.

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 (proxy_next_upstream error), if a tcp connection fail on first instance when routing a request (because instance is down for example), NGinx automatically forward 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.


Solution

  • Here is something interesting: https://support.f5.com/kb/en-us/solutions/public/10000/600/sol10640.html