Four-step Process
From LB Wiki
The four-step process is the fundamental method for how load balancers perform their work. Understanding it is key to understanding load balancing and how to troubleshoot problems that can arise.
The four steps are as follows:
- Step 1: Client to load balancer
- Step 2: load balancer to server
- Step 3: server to the load balancer
- Step 4: load balancer to the client
This is required for all load balancing, regardless of vendor. (The only exception to this is DSR, where there is a 3-step process) Essentially, the load balancer must be in the path of traffic on the way in, and on the way out.
If you're having trouble with a load balancer, or even if something thinks it's the load balancer and you're sure it's not, then going through this 4-step process can help you pinpoint the problem or it will provide the evidence necessary to prove that it isn't the load balancer.
Third Step
Most problems that occur happen in the 3rd step. For whatever reason, the load balancer is not in the path of traffic on the way out.
Four-step NAT
To help understand what exactly happens to the network traffic, let's take a look at a NAT scenario. First, we'll assume we're doing "half-NAT", also known as transparency, or just simple load balancing. This is the default for most load balancers. It is named half-NAT because either the source or the destination IP address is changed, but not both. The biggest advantage to this is that it preserves the true source IP address in your server logs.
For this, we'll use the following three IP addresses:
- Client IP: 1.1.1.1
- VIP on load balancer: 2.2.2.2
- Server IP address: 3.3.3.3
The NAT process is as follows:
| NAT Table | |||
|---|---|---|---|
| Step | Process | Source IP | Destination IP |
| Step 1 | Client to load balancer | 1.1.1.1 | 2.2.2.2 |
| Step 2 | Load balancer to server | 1.1.1.1 | 3.3.3.3 |
| Step 3 | Server to load balancer | 3.3.3.3 | 1.1.1.1 |
| Step 4 | Load balancer to client | 2.2.2.2 | 1.1.1.1 |

