Product Documentation

Anycast support in Citrix ADC

Anycast is a type of network where a set of servers shares the same IP address. The client request is directed to the topographically closest server based on their routing tables. This routing reduces latency issues, ensures high availability, and minimizes downtime.

Citrix ADC supports anycast network with Global Server Load Balancing (GSLB) and DNS features.

The following diagram illustrates a topology diagram of Anycast in Citrix ADC.

localized image

Anycast GSLB

The Citrix ADC GSLB feature provides load balancing across globally distributed sites along with disaster recovery and ensures continuous availability of applications.

During an outage, GSLB provides immediate disaster recovery by routing traffic to the closest or the best performing data center. However, GSLB cannot control the following:

  • How the DNS traffic is routed to GSLB nodes located in different geographical locations.
  • How much latency is getting added while DNS queries get routed to GSLB nodes.

In a typical GSLB setup, each data center has a GSLB node configured with the site-specific Authoritative Domain Name Server (ADNS) to receive DNS queries. Each site’s ADNS is configured as the nameserver in the DNS resolver. As the number of GSLB nodes increases, the number of nameserver records also increase. In such cases, if there is a failure of a datacenter, LDNS has to retry resolution with a different nameserver which would add to the latency in DNS resolution. Also, every time a GSLB node is added, the nameserver records must be updated.

To overcome these drawbacks, you can use Anycast ADNS. In Anycast ADNS, a single ADNS IP address is used for all GSLB nodes and the DNS traffic is routed to GSLB nodes using dynamic routing.

For example if a GSLB site is DOWN, the routing table is updated and route to this site is removed. Hence, the DNS queries are not sent to the sites that are DOWN. As a result, there are no retries.

Also, if a new GSLB node is added, the new node is assigned the same ADNS IP address. The dynamic routing automatically updates the routing tables with routes to new sites based on the routing algorithms. Hence, you do not have to update the DNS name server records. The rollout of new GSLB sites is made simpler and faster with Anycast.

How to configure ADNS IP address in an anycast mode

You must enable host routing on the ADNS IP in Citrix ADC and set the appropriate Route Health Injection (RHI) level. Mostly, there would not be any virtual servers on the ADNS IP and therefore RHI level must be selected as NONE. Enabling host route on the ADNS IP makes it a kernel route. You can then enable the dynamic routing of choice and configure the routing protocol to redistribute the kernel routes.

ADNS IP configuration – Example

At the command prompt, type;

add service adns_public ADNS 53

set ip -hostRoute ENABLED -vserverRHILevel ALL_VSERVERS

BGP configuration in GSLB site – Example

Site1#sh run
hostname Site1
log syslog
log record-priority
ns route-install bgp
interface lo0
 ip address
 ipv6 address fe80::1/64
 ipv6 address ::1/128
interface vlan0
 ip address
 ipv6 address fe80::e84c:f4ff:fe74:4588/64
interface vlan2
 ip address
router bgp 5
 redistribute kernel -----> redistributing the kernel routes
 neighbor remote-as 4
 neighbor advertisement-interval 1
 neighbor timers 4 16


GSLB site routing table - Example

Site1#sh ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, I - Intranet
       * - candidate default

K via ---------------------------------------> Kernel Route for ADNS
C is directly connected, vlan0
C is directly connected, lo0
B [20/0] via, vlan2, 01w5d22h
B [20/0] via, vlan2, 01w5d22h
C is directly connected, vlan2
B [20/0] via, vlan2, 01w5d22h
B [20/0] via, vlan2, 01w5d22h
B [20/0] via, vlan2, 01w5d22h

Gateway of last resort is not set

Anycast DNS

You can use Anycast DNS for DNS proxy virtual servers on Citrix ADC. When there are multiple DNS name servers configured, the DNS resolver responds based on round robin method. For example, if the resolver does not receive any response from the first server, it switches to the second server after the configured timeout value expires and so on. The switching from first server to second server adds to the latency in DNS resolution. If the DNS resolvers are configured with Anycast, then this latency can be eliminated.

DNS configuration – Example

At the command prompt, type;

add lb vserver dns DNS 53

set ip -hostRoute ENABLED -vserverRHILevel ALL_VSERVERS

Anycast support in Citrix ADC

In this article