Nginx Backup
Nginx config:
upstream myapp1 {
server 127.0.0.1:9001 max_fails=1 fail_timeout=10s;
server 127.0.0.1:9002 backup;
}
If there is 1 fail in 10 seconds, then send all requests to the backup server (9002) and keep sending requests to 9002 for 10...
hn.0xbf.me1 min read