This article describes how to configure L4 load balancing on NetScaler.
Layer 4 load balancing uses information (IPs and TCP or UDP ports) defined at the networking transport layer as the basis for deciding how to distribute client requests across the group of servers. As the layer 4 connection is established between the client and the server, it has a packet view of the traffic exchanged between them, so the load-balancing decision is made based on the layer 4 parameters, without considering the contents of the packet. That is why it is also called connection based load balancing.
Layer 4 load balancers can monitor the health of the server and helps to decide whether to take it out of the network or to continue to use it. Layer 4 load balancing is useful for various applications which still work on top of the TCP or UDP payloads. Such protocols exchange data as TCP payload and do not have specific structure to follow.
The following is the detailed steps to configure L4 load balancing on NetScaler:
Step1: Go to System > Traffic Management > Load Balancing > Services
Step2: Add a new service by filling all the required information (Select the protocol as TCP or UDP) and click OK to finish the basic settings.
When you create a service that uses UDP as the transport layer protocol, a ping monitor is automatically bound to the service. A ping monitor is the most basic of the built-in monitors. When you create a service that uses TCP as the transport layer protocol, a TCP_default monitor is automatically bound to the service. When you develop a strategy for managing your load balancing setup, you might decide to bind a different type of monitor, or multiple monitors, to the service. For advance monitoring requirements one can use TCP-ECV monitor where request/response messages can be configured.
Step3: Click Done to complete the creation of service.
Step4: Go to System > Traffic Management > Load Balancing > Virtual Servers.
Step5: Add Virtual Servers.
Once load balancing is configured, users connect to the load-balanced Web site, application, or server through the virtual server’s IP address or FQDN.
Step7: Click “No Load Balancing Virtual Server Service Binding”.
Step8: Click “Click to Select” to select the service.
Step9: Select the service to be bound and click Select.
Step10: Click Bind to bind the service to virtual server.
Step11: Click “Done” to complete the configuration of virtual server.
To configure L4 load balancing using command line interface, at the command prompt type:
add service <name> <serverName> <serviceType> <port>
add lb vserver <name> <serviceType> <ip> <port>
bind lb vserver <name> <serviceName>
Example:
Refer to "NetScaler: How Do I?" page for more easy to implement articles on commonly used features of NetScaler.