Improving Performance Through Load Balancing

Across the web, sites experience a wide range of network traffic requirements. Sites such as Google, Yahoo, Amazon, and Microsoft obviously experience tens of millions of user hits per day. To handle such web requests, the sites use a technique known as load balancing, as shown in FIGURE 4-5, to share the requests across multiple servers.

A load balancing server is between systems on one side and a cloud consisting of server 1 and server 2 on the other side. Requests 1, 2, 3, and 4 from the systems lead to the load balancing server. Requests 1 and 3 are directed toward server 1 and requests 2 and 4 are directed toward server 2 from the load balancing server.

FIGURE 4-5 Load balancing uses a server to route traffic to multiple servers that, in turn, share the workload.

For a simple webpage, a client’s web browser requests an HTML page and then the related graphics, CSS, and JavaScript files from the web server, as shown in FIGURE 4-6.

An illustration shows a system requesting H T M L page, graphic 1, graphic 2, C S S, and JavaScript to a server and the server sending the same back to the system.

FIGURE 4-6 A client (browser) typically makes multiple requests to a server in order to download the HTML, CSS, JavaScript, and page graphics.

When demand becomes too great for the server, the company can place a load-balancing server in front of two or more servers to which the load balancer distributes the web requests. Load balancing for simple applications is quite straightforward, as either server can handle all requests.

When server-based applications become more complex, accessing data within a database, for example, the developers must provide shared access to the database. To eliminate a single point of failure, companies will often replicate copies of the database on multiple servers. The database software, in turn, must then synchronize data updates across the systems, as shown in FIGURE 4-7.

A system representing a user sends a request to a load balancing server, which in turn directs the request to server and database 1 placed in a large cloud. Database update is directed from server and database 1 to server and database 2 in the same cloud.

FIGURE 4-7 Load balanced systems, for data redundancy purposes, often replicate databases on multiple servers. Each database, in turn, will send data updates to other to maintain data synchronization between the servers.

As an alternative, the company may choose to simplify the solution using a cloud-based database or a cloud-based network attached storage device, as shown in FIGURE 4-8. In this way, the applications do not need to worry about the data synchronization and replication—that task is handled within the cloud.

A system representing a user sends a request to a load balancing server, which in turn directs the request to server 1 placed in a larger cloud. Data update is directed from server 1 to cloud based database in the same cloud. Server 2 is also shown in the larger cloud.

FIGURE 4-8 Using a cloud-based network-attached storage device and a cloud-based database to handle database replication and load balancing.

Taking a Closer Look at Load Balancing

To better understand load balancing, consider the processing that occurs when a user visits a site such as Yahoo. To start, the user types in a domain name, such as www.yahoo.com. The user’s web browser, in turn, sends the domain name to a special server on the web called a domain-name server (DNS), which, in turn, returns the site’s (Yahoo’s) Internet protocol (IP) address. As shown in FIGURE 4-9, the browser then uses the IP address to contact the server.

A browser of a system sends the domain name w w w dot yahoo dot com to a domain name server (D N S) which in turn returns the I P address 10.25.32.101 back to the browser. The browser then sends the request to another server using the domain name and I P address.

FIGURE 4-9 Web browsers use the IP address they receive from a DNS to access a server on the web.

When a site uses load balancing, the IP address returned by the DNS might correspond to the load-balancing server. When the load balancer receives the browser request, it simply sends the request to one of the servers on a round-robin basis. Should demand on the site increase, additional servers can be added, to which the load balancer can distribute requests. Using a similar technique, most IaaS solutions provide on-demand scaling and load balancing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.84.150