Is it possible to do direct server return DSR load balancing using virtual servers in the cloud

haproxyload balancing

Is it possible to do this kind of load balancing in the cloud say for example in Digital Ocean if all of my droplets are from the same data center? Or do I need some sort of physical device to do this kind of layer 4 load balancing?

As it is shown here:
http://blog.haproxy.com/2011/07/29/layer-4-load-balancing-direct-server-return-mode/

I like the idea that the load balancer just distributes and then the servers reply the request directly to the clients. Is this possible to do without physical hardware, but with software like haproxy?

Best Answer

DSR is implemented in the Linux Kernel (IPVS) which only works with LVS (Linux Virtual Server). You will also need a health checking daemon like keepalived or ldirectord. BTW DSR does not work in Amazon AWS or in Azure due the to the network virtualisation security that they use. It won't work in things like Docker either.

http://www.loadbalancer.org/blog/load-balancing-methods