Citrix ADC

Use case 15: Configure layer 4 load balancing on the Citrix ADC appliance

The layer 4 load balancer (TCP and UDP ports) uses information provided in the networking transport layer for routing client requests across the server groups.

When a layer 4 connection is established between a client and a server, it has a packet view of traffic exchanged between them. The layer 4 load balancer makes its routing decisions based on the address information extracted from the first few packets in the TCP stream, and doesn’t inspect the packet content. Therefore, the layer 4 load balancing is also called as connection-based load balancing.

The layer 4 load balancer monitors the health of a server. Traffic is not routed to the server if it is DOWN.

The layer 4 load balancing is useful for various applications that uses TCP or UDP payloads. Such protocols exchange data as TCP payload and don’t have a specific structure to follow.

To configure layer 4 load balancing using the command line interface

At the command prompt, type:

add service     add lb vserver     bind lb vserver   

Example:

add service TCPservice 192.0.2.3 TCP 1 add lb vserver TCPserver TCP 192.0.2.4 1 bind lb vserver TCPserver TCPservice 

To configure layer 4 load balancing using the GUI

  1. Navigate toTraffic Management > Load Balancing > Services.

    Navigate to load balancing service

  2. ClickAddto a create a service.
  3. Specify the required details inService NameandIP Address.
  4. Select eitherTCPorUDPinProtocol.
  5. ClickOK.

    Add a service

  6. ClickDone.

    A service is created.

    When you create a service using UDP as the transport layer protocol, a ping monitor (built-in monitor) is automatically bound to the service. When you create a service using TCP as the transport layer protocol, atcp_defaultmonitor is automatically bound to the service.

    For the load balancing setup, you can bind your service to a different type of monitor or multiple monitors. For advance monitoring requirements you can use thetcp-ecvmonitor and configure the request and response messages.

  7. Navigate toTraffic Management > Load Balancing > Virtual Servers.

    Navigate to load balancing virtual servers

  8. ClickAddto create a new virtual server.

    When the load balancing is configured, you can connect to the load-balanced website, application, or server through the virtual server’s IP address or FQDN.

  9. Specify the required details inName,IP Address Type, andIP Address.

  10. Select eitherTCPorUDPinProtocol.

  11. Type a port number (0–1023 based on the type of service) inPort.

  12. ClickOK.

    Load balancing virtual server settings

  13. ClickNo Load Balancing Virtual Server Service BindinginServices and Service Groups.

    No load balancing virtual server service binding

  14. In theService Bindingpage, selectClick to SelectinSelect Service.
  15. Select the service to be bound and clickSelect.
  16. ClickBindto bind the service to the virtual server.

    Virtual server service binding

  17. ClickContinue.
  18. ClickDone.

    Virtual server configuration done

    The layer 4 load balancing virtual server configuration is completed.

Use case 15: Configure layer 4 load balancing on the Citrix ADC appliance