Wednesday, June 10, 2009

Load Sharing with DNS





























Three types of DNS load sharing techniques will be examined here. These are as follows:
1 Backup Server via Redirected Secondary DNS
2 Load Sharing with Round Robin DNS
3 Dynamic Load Balancing DNS

1.Round Robin DNS Load Balancing
--------------------------------
The in-built round-robin feature of BIND of a DNS server can be used to load balance multiple web servers. It is one of the early adopted load balancing techniques to cycle through the IP addresses corresponding to a group of servers in a cluser. The details on the implementation is discussed here.

Pros: Very simple, inexpensive and easy to implement.
Cons: The DNS server does not have any knowledge of the server availability and will continue to point to an unavailable server. It can only differentiate by IP address, but not by server port. The IP address can also be cached by other name servers and requests may not be sent to the load balancing DNS server.

2.Hardware Load Balancing
-------------------------
Hardware load balancers can route TCP/IP packets to various servers in a cluster. These types of load balancers are often found to provide a robust topology with high availability, but comes for a much higher cost.

Pros: Uses circuit level network gateway to route traffic.
Cons: Higher costs compared to software versions.

3.Software Load Balancing
-------------------------
Most commonly used load balancers are software based, and often comes as an integrated component of expensive web server and application server software packages.

Pros: Cheaper than hardware load balancers. More configurable based on requirements. Can incorporate intelligent routing based on multiple input parameters.

Cons: Need to provide additional hardware to isolate the load balancer.


Example

Load Sharing with Round Robin DNS:

One of most common implementations of DNS is the Berkeley Internet Name Domain (BIND). This allows address records (A records) to be duplicated for a specific host, with different IP addresses. The name server then alternatively rotates addresses for any one name that has multiple A records, and is known as DNS round robin.
As an example, your company has three web servers. Their real names and IP addresses are as follows:
www.yourcompany.com 128.1.1.1
www.yourcompany.com 128.1.1.2
www.yourcompany.com 128.1.1.3
You want to set up the servers so that DNS requests by clients (in this case, web server access) are round robin rotated. This is accomplished by placing multiple A records in the authoritative name server files.

For the above example, we want all clients to access our site by using www.yourcompany.com, but we want these requests to be shared between our three servers using DNS round robin. To do so, we need to place the following A records in the name server file:
www.Grid.com. IN A 192.168.1.1
www.Grid.com. IN A 192.168.1.2
www.Grid.com. IN A 192.168.1.2
Note the '.' after the name www.yourcompany.com on each A record. This is mandatory.
A Time To Live (TTL) field is often added to the A records. The TTL value is the maximum time that the information should be held to be reliable. By setting the TTL to a fairly small amount time e.g. 60 seconds, the effectiveness of the distribution can be maximized. A lower value may be specified, but this causes more DNS traffic in updates, which improves the load sharing on the web servers at the expense of increasing the local on the name server.
www.Grid.com. 60 IN A 192.168.1.1
www.Grid.com. 60 IN A 192.168.1.1
www.Grid.com. 60 IN A 192.168.1.1
When a DNS request for an IP address is received, BIND returns one of the IP addresses and makes a note of it. The next request will then return the next IP address in the file and so on until the last one, after which BIND returns to the first address again.

I am able to use this Load Balancing successfully with Oracle Products like Oracle EBUS R12, Oracle IAS , OPA products

1 comment:

  1. Essindia.com offering Offshore Web development,
    Offshore Web application development
    ,Website Design Company in India,Low cost Website Design India,Portals
    Design Company in India,providing Multimedia Solutions.

    ReplyDelete