ADC

A typical load balancing scenario

In a load balancing setup, the Citrix ADC appliances are logically located between the client and the server farm, and they manage traffic flow to the servers.

The following figure shows the topology of a basic load balancing configuration.

Figure 1. Basic Load Balancing Topology

image

The virtual server selects the service and assigns it to serve client requests. Consider the scenario in the preceding figure, where the services service-HTTP-1 and service-HTTP-2 are created and bound to the virtual server named virtual server-LB-1. Virtual server-LB-1 forwards the client request to either service-HTTP-1 or service-HTTP-2. The system selects the service for each request by using the Least Connections load balancing method. The following table lists the names and values of the basic entities that must be configured on the system.

Table 1. LB Configuration Parameter Values

The following figure shows the load balancing sample values and required parameters that are described in the preceding table.

Figure 2. Load Balancing Entity Model

image

The following tables list the commands used to configure this load balancing setup by using the command line interface.

Task Command
To enable load balancing enable feature lb
To create a service named service-HTTP-1 add service service-HTTP-1 10.102.29.5 HTTP 80
To create a service named service-HTTP-2 add service service-HTTP-2 10.102.29.6 HTTP 80
To create a virtual server named vserver-LB-1 add lb vserver vserver-LB-1 HTTP 10.102.29.60 80
To bind a service named service-HTTP-1 to a virtual server named vserver-LB-1 bind lb vserver vserver-LB-1 service-HTTP-1
To bind a service named service-HTTP-2 to a virtual server named vserver-LB-1 bind lb vserver vserver-LB-1 service-HTTP-2

Table 2. Initial Configuration Tasks

For more information about the initial configuration tasks, see Setting Up Basic Load Balancing.

Task Command
To view the properties of a virtual server named vserver-LB-1 show lb vserver vserver-LB-1
To view the statistics of a virtual server named vserver-LB-1 stat lb vserver vserver-LB-1
To view the properties of a service named service-HTTP-1 show service service-HTTP-1
To view the statistics of a service named service-HTTP-1 stat service service-HTTP-1
To view the bindings of a service named service-HTTP-1 show service bindings service-HTTP-1

Table 3. Verification Tasks

Task Command
To configure persistence on a virtual server named vserver-LB-1 set lb vserver vserver-LB-1 -persistenceType SOURCEIP -persistenceMask 255.255.255.255 -timeout 2
To configure COOKIEINSERT persistence on a virtual server named vserver-LB-1 set lb vserver vserver-LB-1 -persistenceType COOKIEINSERT
To configure URLPassive persistence on a virtual server named vserver-LB-1 set lb vserver vserver-LB-1 -persistenceType URLPASSIVE
To configure a virtual server to redirect the client request to a URL on a virtual server named vserver-LB-1 set lb vserver vserver-LB-1 -redirectURL http://www.newdomain.com/mysite/maintenance
To set a backup virtual server on a virtual server named vserver-LB-1 set lb vserver vserver-LB-1 -backupVserver vserver-LB-2

Table 4. Customization Tasks

For more information about configuring persistence, see Choosing and Configuring Persistence Settings. For information about configuring a virtual server to redirect a client request to a URL and setting up a backup virtual server, see Configuring Features to Protect the Load Balancing Configuration.

A typical load balancing scenario