ADC

Load balance domain-name based services

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 Citrix ADC configuration.

When you configure services with domain names instead of IP addresses, and if the name server resolves the domain name to a new IP address, the monitor bound to the service 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. The monitor could be the default monitor bound to the service or you can bind any other supported monitor. It probes the service at regular intervals defined in the monitor parameters. If the domain name resolves to a new IP address, the monitor sends a fresh probe to check the health of the service. All subsequent probes are at the predefined interval.

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

LB-topology-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

lb-dbs-entity-mode

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>
<!--NeedCopy-->

Example:

add dns nameServer Vserver-LB-2
<!--NeedCopy-->

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.

Note

You can add a name server of type TCP, UDP or UDP_TCP to resolver DBS probes. However, if TCP and UDP name servers coexists, and a UDP name server receives a response with truncated bit, this response is not retried over TCP name server.

Load balance domain-name based services