Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Nginx work as Direct Server Return load balancer?

Is there a way to configure Nginx to work as a Direct Server Return (DSR) load balancer similar to this:
http://blog.haproxy.com/2011/07/29/layer-4-load-balancing-direct-server-return-mode/

like image 903
Jimski Avatar asked Sep 02 '25 17:09

Jimski


1 Answers

To do this you need transparent parameter of Nginx proxy_bind directive which is available on Nginx Plus R10 or Nginx 1.11.2+. Also you need to configure routing table and firewall for IP transparency and tc for direct server response. A working example is fully described here: https://www.nginx.com/blog/ip-transparency-direct-server-return-nginx-plus-transparent-proxy/

like image 192
sharez Avatar answered Sep 05 '25 04:09

sharez