Thursday, 12 November 2009

Application Scalability

When we have an application which would need to support a large number of users (such as Google Search) or would require to do intensive processes (such as NASA Space programs), we see that one Server is not able to handle the workload because of limitation in its resources; memory, CPU or disk-space.

Scalability Solutions:
Scalability solutions provide approaches to distribute the application workload so that your application can remain responsive in a timely manner in those situations.

1.1 Load Balancers:

1.1.1 LBC: Load Balancer Components

1.1.2 NLB: Network Load Balancers

1.2. Load Balancer Algorithms:

1.2.1 DNS Round-Robin Load Balancer
To balance server loads using DNS, the DNS server maintains several different IP addresses for a site name. The multiple IP addresses represent the machines in the cluster, all of which map to the same single logical site name.

If there are 3 machines in the cluster, when the first request arrives at the DNS server, it returns the IP address of the first machine. On the second request, it returns the second IP address. And so on. On the fourth request, the first IP address is returned again.

Using the above DNS round robin, all of the requests to the particular site have been evenly distributed among all of the machines in the cluster. Therefore, with the DNS round robin method of load balancing, all of the nodes in the cluster are exposed to the net.

Session state can be stored on the server (using cookie) or in database; cookies can expire so not very reliable.

No support for high availability.

Hardware Load Balancers:

The load balancer exposes the IP address of the entire cluster to the world.

Hardware load balancer redirects the user requests to a node in the cluster based on the information in the header, cookies or URL data.

Hardware load balancers provide request-level failover; when the load balancer detects that a particular node has gone down, it redirects all subsequent requests to that dead node to another active node in the cluster. However, any session information on the dead node will be lost when requests are redirected to a new node.

Dispatcher-Based Load Balancers:

2. MCSC: Microsoft Cluster Server

Load Balancing:

There are 2 types of load balancing solutions:
  1. Software-based such as Windows Network Load Balanacing
  2. Hard-based
Software-based Load Balancer:
  • Can be configured for Sticky IP - for TCP
  • Can be configured for Sticky Sessions - for HTTP

HTTP load balancing techniques:

Key Terms:
  • Cluster
  • Cluster IP Address
  • Cluster Node
  • Cluster Node IP Address
  • Load Balanced Farm
  • DNS Round-Robin Load Balancing
  • DNS Lookup
  • Load Balancing Cluster
  • Hardware Load Balancer
  • Network Load Balancing (NLB)
  • Web Server Farm
to be continued...

No comments: