Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Imagine a load-balancer facing the internet, dispatching requests to several worker-servers in a local network.

Is there a way for the worker-servers to respond directly on the original socket / connection / IP or do they have to respond to the load-balancer for it to forward the response (making it the SPOF)?

share|improve this question

migrated from Feb 28 '12 at 0:23

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

Generally the response to the the load balanced request will go straight to the gateway, not back to the load balancer.

So the load balancer is a SPOF for the inbound requests, but because the outbound request goes straight to the gateway, it can bypass that SPOF - although because the ACK would need to come back in through the load balancer, it is still kind of pointless.

Generally you would have two load balancers. Only one of them owns the public IP address at any given time, and they run a heartbeat between them. As soon as the live load balancer loses its heartbeat (i.e. crashes, goes offline, etc), then the 2nd load balancer takes over the IP address.

share|improve this answer

There are some load balancers that will transparently load balance by using destination NAT but the load balancer will still need to see the return traffic to NAT it back to the original IP that the client opened a connection to. If I open a connection to a load balancer at and a server in the pool sends back a reply from its IP of I'm going to drop that packet because I don't know who is. I'm trying to talk to

You can avoid single point of failure in load balancers by setting up a dual stack with VRRP so that if a single load balancer fails another will take over all of its traffic. VRRP uses a shared MAC address and IP address to accomplish seamless failover.

share|improve this answer
The problem you are presenting here (if I understand correctly) can be resolved using direct server return. The loadbalancer and the backend real servers can both share an IP address for outbound traffic, as they can both use the same source IP. See the link for details. – Stefan Lasiewski Feb 28 '12 at 7:10

IP networks don't allow that directly, you need some software to help with you so that one worker-server works as a loadbalancer and if it fails, another automatically takes over loadbalancing responsibility and starts handling the requests coming to loadbalancer IP address. So they all have to run the loadbalancing software. You should be able to do this with software called HAProxy. You can google for "shared ip" to get forward with your research. This solution will naturally reduce one worker-servers serving capacity because it has to act as a loadbalancer for the whole cluster.

And btw. you would probably get more answers for this in the ServerFault.

share|improve this answer

It depends on the method of load balancing you are using. If you're just simply doing round-robin DNS, then yes your worker-servers will be making their connections "directly" with their clients.

If you're actually using a reverse proxy such as HAProxy, then no. Your worker-servers will use the load balancer as an intermediary. From the perspective of your worker-servers the client is the load-balancer, not the actual client.

If you're concerned with the creation of Single Point of Failure by using a reverse proxy in this way there are strategies you can employ to mitigate some risk such as using redundant proxies. Details will vary based upon your implementation.

share|improve this answer

You can set up the loopback address of several servers to be the same (its called aliasing). This IP is known to the outside world. Requests come with this IP as the destination IP address. The load balancer can direct requests based on the load balancing criteria and direct the request to one of these servers.

SO yes you can have a situation where several servers can respond to a single IP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.