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.
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
- fast load balancing
- easy to deploy
- 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