Product Documentation

Load Balancing Domain-Name Based Services

Nov 12, 2013

When you create a service for load balancing, you can provide an IP address. Alternatively, you can create a server using a domain name. The server name (domain name) can be resolved using an IPv4 or IPv6 name server, or by adding an authoritative DNS record (A record for IPv4 or AAAA record for IPv6) to the NetScaler configuration.

When you configure services with domain names instead of IPs, if you change the IP address of a server in your load balancing setup, the name server resolves the domain name to the new IP address. The monitor runs a health check on the new IP address, and updates the service IP address only when the IP address is found to be healthy.

Note: When you change the IP address of a server, the corresponding service is marked down for the first client request. The name server resolves the service IP address to the changed IP address for the next request, and the service is marked UP.

Domain-name based services have the following restrictions:

  • The maximum domain name length is 255 characters.
  • The Maximum Client parameter is used to configure a service that represents the domain name-based server. For example, a maxClient of 1000 is set for the services bound to a virtual server. When the connection count at the virtual server reaches 2000, the DNS resolver changes the IP address of the services. However, because the connection counter on the service is not reset, the virtual server cannot take any new connections until all the old connections are closed.
  • When the IP address of the service changes, persistence is difficult to maintain.
  • If the domain name resolution fails due to a timeout, the appliance uses the old information (IP address).
  • When monitoring detects that a service is down, the appliance performs a DNS resolution on the service (representing the domain name-based server) to obtain a new IP address.
  • Statistics are collected on a service and are not reset when the IP address changes.
  • If a DNS resolution returns a code of “name error” (3), the appliance marks the service down and changes the IP address to zero.

When the appliance receives a request for a service, it selects the target service. This way, the appliance balances load on your services. The following diagram describes the topology of a load balancing configuration that load balances a group of domain-name based servers (DBS).

Figure 1. Basic Load Balancing Topology for DBS Servers

The services Service-HTTP-1, Service-HTTP-2, and Service-HTTP-3 are bound to the virtual server Vserver-LB-1. The vserver Vserver-LB-1 uses the least connection load balancing method to choose the service. The IP address of the service is resolved using the name server Vserver-LB-2.

The following table lists the names and values of the basic entities configured on the appliance.

Entity type

Name

IP address

Port

Protocol

Virtual Server

Vserver-LB-1

10.102.29.17

80

HTTP

 

Vserver-LB-2

10.102.29.20

53

DNS

Servers

server-1

10.102.29.18

80

HTTP

 

server-2

www.citrix.com

80

HTTP

Services

Service-HTTP-1

server-1

80

HTTP

 

Service-HTTP-2

server-2

80

HTTP

 

Service-HTTP-2

10.102.29.19

80

HTTP

Monitors

Default

None

None

None

Name Server

None

10.102.29.19

None

None

The following diagram shows the load balancing entities and the values of the parameters that need to be configured on the appliance.

Figure 2. Load Balancing DBS Servers Entity Model

To configure a basic load balancing setup, see Setting Up Basic Load Balancing. Create the services and virtual servers of type HTTP, and name the entities and set the parameters using the values described in the previous table.

You can add, remove, enable, and disable external name servers. You can create a name server by specifying its IP address, or you can configure an existing virtual server as the name server.

To add a name server by using the command line interface

At the command prompt, type:

add dns nameServer <dnsVserverName>

Example

add dns nameServer Vserver-LB-2

To add a name server by using the configuration utility

  1. Navigate to Traffic Management > DNS > Name Servers.
  2. Create a DNS name server of type DNS Virtual Server, and select a server from the DNS Virtual Server list.

You can also add an authoritative name server that resolves the domain name to an IP address.