NAT stands for Network Address Translation.
In the NAT mode, the load-balancer will route traffic between user and server by changing destination IP address of the packets.
TCP connection overview
TCP connection is established between the client and the server.
The loadbalancer just ensures a client is always forwarded to the same server.
Data flow
As shown below, the clients get connected to the service VIP.
The load balancer chooses a server in the pool then forwards packets to it by changing destination IP address.
Pros and cons
Pros
- fast load balancing
- easy to deploy
Cons
- infrastructure intrusive: need to change the default gateway of the servers
- The server default gateway must use the load balancer, in order to do reverse NAT operation.
- output bandwith is limitated by loadbalancer output capacity
When use this architecture?
- where response time matters
- where no intelligence is required
- when output capacity of the load-balancer won’t be a bottleneck in a near future
- when nothing but the default gateway of the servers can be changed
Setting up the SNAT and an L3 interface in the same L2 than servers will avoid you to reconfigure any default gateway so that’s even easier to deploy.
Thanks for the comment.
I guess you mean the Direct Server Return mode.
I wrote an article about it: http://blog.exceliance.fr/2011/07/29/layer-4-load-balancing-direct-server-return-mode/
It was in the TODO list 😉
Hi,
No just DSR is another feature which add asynchronism, not SNAT.
Great review! You actually covered some interesting things in this post. I came across it by using Yahoo and I’ve got to admit that I already subscribed to the RSS feed, will be following you on my iphone 🙂
Do you think this would handle an application that requires multiple connections (not just a single connection) between the client & server? I am looking for a load balancer that will handle this situation
Hi William,
Of course it will work.
In that case, I guess all the connection from a single user must go to the same server, so use a balancing algorithm based on source IP address (an alternative solution exists if all your services rely on TCP).
You can download an evaluation Aloha VM on our website: http://exceliance.fr/en/trial-versions-0 and try it in a POC.
We’ll be keen to help you configure your appliance for your POC.
Regards
Thanks Baptiste, you are correct about the single user communicating to the same server requirement plus all communication is TCP. I should add that this is a real-time communication and we know that reserve proxy load balancing breaks the communication. I do have a support ticket open (about another matter) so perhaps that would be the best way to continue this discussion? I have the virtual appliance installed already but not set-up yet.