How load balancing works
Load balancing basics
-
Load balancing virtual server. The IP address, port, and protocol combination to which a client sends connection requests for a particular load-balanced website or application. If the application is accessible from the Internet, the virtual server IP (VIP) address is a public IP address. If the application is accessible only from the LAN or WAN, the VIP is usually a private (ICANN non-routable) IP address.
-
Service. The IP address, port, and protocol combination used to route requests to a specific load-balanced application server. A service can be a logical representation of the application server itself, or of an application running on a server that hosts multiple applications. After creating a service, you bind it to a load balancing virtual server.
-
Server object. A virtual entity that enables you to assign a name to a physical server instead of identifying the server by its IP address. If you create a server object, you can specify its name instead of the server's IP address when you create a service. Otherwise, you must specify the server's IP address when you create a service, and the IP address becomes the name of the server.
-
Monitor. An entity on the NetScaler appliance that tracks a service and ensures that it is operating correctly. The monitor periodically probes (or performs a health check on) each service to which you assign it. If the service does not respond within the time specified by the time-out, and a specified number of health checks fail, that service is marked DOWN. The NetScaler appliance then skips that service when performing load balancing, until the issues that caused the service to quit responding are fixed.
Understanding the topology
| Entity | Name | IPAddress | Port | Protocol |
|---|---|---|---|---|
| Virtual server | Vserver-LB-1 | 10.102.29.60 | 80 | HTTP |
| Services | Service-HTTP-1 | 10.102.29.5 | 80 | HTTP |
| Service-HTTP-2 | 10.102.29.6 | 80 | HTTP | |
| Monitors | Default | None | None | None |
Use of wildcards instead of IP addresses and ports
-
If the NetScaler appliance is configured as a transparent pass through, which must accept all traffic that is sent to it regardless of the IP or port to which it is sent.
-
If one or more services listen on ports that are not well known.
-
If one or more services, over time, change the ports that they listen on.
-
If you reach the limit for the number of IP addresses and ports that you can configure on a single NetScaler appliance.
-
If you want to create virtual servers that listen for all traffic on a specific virtual LAN.
| IP | Port | Protocol | Description |
|---|---|---|---|
| * | * | TCP | A general wildcard virtual server that accepts traffic sent to any IP address and port on the NetScaler appliance. When using a wildcard virtual server, the appliance dynamically learns the IP and port of each service and creates the necessary records as it processes traffic. |
| * | * | TCP | A firewall load balancing virtual server. You can bind firewall services to this virtual server, and the NetScaler appliance passes traffic through the firewall to the destination. |
| IP Address | * | TCP, UDP, and ANY | A virtual server that accepts all traffic that is sent to the specified IP address, regardless of the port. You must explicitly bind to this type of virtual server the services to which it will redirect traffic. It does not learn them dynamically. |
| Note: You do not configure services or virtual servers for a global HTTP port. In this case, you configure a specific port as a global HTTP port (for example, set ns param -httpPort 80). The appliance then accepts all traffic that matches the port number, and processes it as HTTP traffic. The appliance dynamically learns and creates services for this traffic. | |||
| * | port | SSL, SSL_TCP | A virtual server that accepts all traffic sent to any IP address on a specific port. Used for global transparent SSL offloading. All SSL, HTTP, and TCP processing that usually is performed for a service of the same protocol type is applied to traffic that is directed to this specific port. The appliance uses the port to dynamically learn the IP of the service it must use. If –cleartext is not specified, the NetScaler appliance uses end-to-end SSL. |
| * | port | Not applicable | All other virtual servers that can accept traffic to the port. You do not bind services to these virtual servers. The NetScaler appliance learns them dynamically. |
-
Specific IP address and specific port number
-
Specific IP address and a * (wildcard) port
-
-
(wildcard) IP address and a specific port
-
-
-
(wildcard) IP address and a * (wildcard) port
-
-
HTTP
-
TCP
-
ANY
Configuring global HTTP ports
To configure a global HTTP port by using the command line interface
set ns param –httpPort <port>
show ns param
Example 1: Configuring a port as a global HTTP port
set ns param -httpPort 80
Done
show ns param
Global configuration settings:
HTTP port(s): 80
Max connections: 0
Max requests per connection: 0
Client IP insertion: DISABLED
Cookie version: 0
Persistence Cookie Secure Flag: ENABLED
...
...
Example 2: Adding ports when one or more global HTTP ports are already configured**
> show ns param
Global configuration settings:
HTTP port(s): 80
Max connections: 0
Max requests per connection: 0
Client IP insertion: DISABLED
Cookie version: 0
Persistence Cookie Secure Flag: ENABLED
Min Path MTU: 576
...
...
Done
> set ns param -httpPort 80 8888
Done
> show ns param
Global configuration settings:
HTTP port(s): 80,8888
Max connections: 0
Max requests per connection: 0
Client IP insertion: DISABLED
Cookie version: 0
Persistence Cookie Secure Flag: ENABLED
Min Path MTU: 576
...
...
Done
>
To configure a global HTTP port by using the configuration utility
-
Navigate to System > Settings > Change HTTP Parameters, and then add an HTTP port number.