How to configure Domain Name Based services

Summary

This article describes how to configure Domain Name Based services to send requests to all IP addresses returned from the Domain Name System (DNS) by using the round-robin method.

Background

After you configure Domain Name Based services on a NetScaler appliance, the service gets resolved to one or more IP addresses. When the service gets resolved to multiple IP addresses, the appliance only uses the first IP address to send the network traffic. The appliance does not load balance between all the IP addresses that are returned by the DNS server.

Requirement

In the virtual environments especially in the cloud networks where the services can be running on multiple hosts or instances, these instances can change dynamically based on the requirements at any given point of time. Therefore, a service can resolve to more than one IP addresses based on the number of instances that the service is running on and these IP addresses can change dynamically.

The appliance should be able to dynamically load balance network traffic to all the IP addresses that the Domain Name Based service gets resolved from the DNS server.

Configuration

The clients must access the domain based hosts and instances in the public cloud network.

The public cloud instances are dynamic and based on the requirement any new number of instances can be added at any time. The number of Elastic Compute Cloud (EC2) instances and their corresponding IP addresses are dynamic and are required to be identified by the DNS resolution.

In this article let us take an example of one domain, www.example.com which is running n number of instances in the external cloud network. The maximum number of instances is around eight and is expected can be up to 12.

At any given point of time there is less number of instances that are active. However, you can consider the maximum number of cloud instances and that is 12 in this example.

Configuration for the Network Traffic for www.example.com from a NetScaler Appliance to the Cloud

  • Configure a Domain Name Based service on the appliance, with an assumption that the maximum cloud instances for www.example.com is approximately 12.
    S1.example.com, S2.example.com……….S12.example.com
    With this configuration, you have the maximum number of services configured in the appliance to handle the maximum instances in the cloud for www.example.com which is 12.
    Note that you must know the name of the service instance and this name must be a static name for any given service instance that can be resolved by the DNS server.
  • Create a HTTP load balancing virtual server in the appliance and bind all the services to this load balancing virtual server.
  • Add a name server in the NetScaler appliance that refers to the DNS server that resolves the external service instances, so that the appliance can resolve these service instance names to the IP addresses. This name server can be in the internal or the external network.

The appliance monitors the Domain Name Based services and marks only those services with the status as UP which actually respond to the DNS query. The status of the rest of the services which do not respond to the DNS query are marked as DOWN.

You have configured 12 services and if there are only three services or instances with the status as UP, then the appliance marks only those three services with the status as UP for load balancing the network traffic.

Network Traffic Flow for www.example.com from a Client to the NetScaler Appliance

Clients in the internal network must be able to resolve www.example.com to the load balancing virtual server that you have configured on the NetScaler appliance.

When the network traffic from the internal clients reach the load balancing virtual server, the connection from the client is load balanced between the services that have the status as UP in the cloud network. These services can be identified based on the DNS resolution. The number of services can vary from 1 to 12.

Read the original article here.