Friday, February 29, 2008

Load Balancing Web Applications

by Vivek Viswanathan
09/28/2001

http://www.onjava.com/pub/a/onjava/2001/09/26/load.html?page=1

A cluster is a group of servers running a Web application simultaneously, appearing to the world as if it were a single server. To balance server load, the system distributes requests to different nodes within the server cluster, with the goal of optimizing system performance. This results in higher availability and scalability -- necessities in an enterprise, Web-based application. High availability provided by redundant resources. Scalability is an application's ability to support a growing number of users.

DNS round robin and Hardwaer load balancers are the two main methods available to balance a server load.

For DNS round robin, duplicate servers are required to form a cluster, each server
within the cluster takes their turn to answer incoming request. It is simple, easy to setup and inexpensive. However, it cannot support server affinity. This method balance the number of connection to each server not the actual loading.

For hardware load balancer: It use a virutal IP to represent the the IP of all servers in the cluster. When a request comes to the load balancer, it rewrites the request's header to point to other machines in the cluster. If a machine is removed from the cluster, the request doesn't run the risk of hitting a dead server, since all of the machines in the cluster appear to have the same IP address. This address remains the same even if a node in the cluster is down. It provides server affinity and high availability throught failover.

Tiered Software Architectures

http://www.sei.cmu.edu/str/descriptions/clientserver_body.html

Client/server architecture (2 tier architectures).
This approach split the processing management between the user system interface environment and the database management server environment. The client initiate the request (Remote procedure call or SQL ) sent to the server, and the servers respond to client with the answer.
This is good at providing distributed computer within a small size network, may be upto 100 simultaneous connections. If more than that, performance will deteriorate due to process of sending the "keep-alive" message. Furthermore, using proprietary databse restricts flexibility and choice of DBMS for application, it is not portable between different paltforms.

Three tier architectures is also referred to as the multi-tier architecture, a middle tier was added between the user system interface client environment and the database management server environment to perform queuing, application execution, and database staging. In addition the middle layer adds scheduling and prioritization for work in progress. There are a variety of ways of implementing this middle tier, such as transaction processing monitors, message servers, or application servers. The three tier client/server architecture has been shown to improve performance for groups with a large number of users (in the thousands) and improves flexibility when compared to the two tier approach. Flexibility in partitioning can be a simple as "dragging and dropping" application code modules onto different computers in some three tier architectures. A limitation with three tier architectures is that the development environment is reportedly more difficult to use than the visually-oriented development of two tier applications.

(see more on Three Tier Software Architectures)

Author: Darleen Sadoski, GTE
Copyright 2007 by Carnegie Mellon University

Tuesday, February 5, 2008

Why Learn CGI?

http://www.oreillynet.com/pub/a/oreilly/web/news/cgi_0700.html

by Scott Guelich
07/01/2000

The advantages of using CGI
1. CGI is the most popular way to develop dynamic content
2. CGI is support by all major web servers
3. CGI is language independent
4. CGI was intentionally designed as a lightweight interface over HTTP
5. Numerous ISPs and homepage services allow CGI scripts.
6. CGI are easy to learn and used by programmers
7. There are a lot of on-line CGI resources.