Books
in black and white
Main menu
Home About us Share a book
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Load Balancing Servers, Firewalls and Caches - Kopparapu C.

Kopparapu C. Load Balancing Servers, Firewalls and Caches - Wiley Computer Publishing, 2002. - 123 p.
ISBN 0-471-41550-2
Download (direct link): networkadministration2002.pdf
Previous << 1 .. 8 9 10 11 12 13 < 14 > 15 16 17 18 19 20 .. 70 >> Next

Content Checks
Although a server and application may be passing health checks, the content served may not be accurate. For example, a file might have been corrupted or misplaced. Load balancers can check for accuracy of the content. The exact method that’s used varies from product to product. For a Web server, once the load balancer performs an application-level health check by using an HTTP GET request for a URL of customer choice, the load balancer can check the returned Web page for accuracy. One method is to scan the page for certain keywords. Another is to calculate a checksum and compare it against a configured value. For other applications, such as FTP, the load balancer may be able to download a file and compute the checksum to check the accuracy.
Another useful trick is to configure the load balancer to make an HTTP GET request for a URL that’s a CGI script or ASP. For example, configure the URL to http://www.abc.com/q?check=1. When the server receives this request, it runs a program called q with parameter check=1. The program q can perform extensive checks on the servers, back-end databases, and content on the server, and return an HTTP status or error code back to the load balancer. This approach is preferred because it consumes very little load-balancer resources, yet provides flexibility to perform extensive checks on the server.
Another approach for simple, yet flexible, health checks is to configure the load balancer to retrieve a URL such as http://www.mysite.com/test.html A program or script that runs on the server may periodically perform extensive health checks on the server, application, back-end database, and content. If everything is in good condition, the program will create a file named test.html; otherwise the program deletes the file test.html. When the load balancer makes the HTTP GET request for test.html, it will succeed or fail depending on the existence of this test file.
Scripting
Some load balancers allow users to write a script on the load balancer that contains the logic or instructions for the health check. This feature is more commonly found in load-balancing appliances that contain a variant of a standard operating system such as UNIX or Linux. Since the operating systems already provide some sort of scripting language, they can be easily exploited to provide users with the ability to write detailed instructions for server, application, or content health checks.
16
Agent-Based Checks
Some server administrators love this approach because they already know the scripting language, and enjoy the flexibility and power of the health-check mechanism provided by scripting.
Agent-Based Checks
Just as we can measure the load on a server by running an agent software on the server itself, an agent may also be used to monitor the health of the server. Since the agent runs right on the server, it has access to a wealth of information to determine the health condition. Some load-balancing vendors may supply an agent for each major server operating system, and the agent informs the load balancer about the server, application, and content health using an API. Some vendors publish an API for the load balancer so that a customer can write an agent to use the API. The API can be vendor specific or open standard. For example, a customer may write an agent that sets an SNMP (Simple Network Management Protocol) MIB (Management Information Base) variable on the load balancer, based on the server health condition.
One good application for server-side agents is when each Web server has a back-end database server associated with it, as shown in Figure 2.8. In practice, there is usually no one-to-one correlation of a Web server to a database server. Instead, there will probably be a pool of database servers shared by all the Web servers. Nevertheless, if the back-end database servers are not healthy, the Web server may be unable to process any requests. A server-side agent can make appropriate checks on the back-end database servers and reflect the result in the Web server health checks to the load balancer. This can also be accomplished by having the load balancer make an HTTP GET request for a URL that invokes a script or a program on the server to check the health of the Web server and the back-end database servers.
Web Database
servers servers
Figure 2.8 : Considering back-end applications or database servers as part of health checks.
The Ultimate Health Check
Since there are so many different ways to perform health checks, the question is, What level of health check is appropriate? Although the correct answer is, It depends, this book will attempt to provide some guidelines based on this author’s experience.
It’s great to use load balancers for standards-based health checks that don’t require any proprietary code or APIs on the server. This ensures you are free to move from one load-balancer product to another, in case that’s a requirement. One should also keep the amount of health checks a load balancer performs to no more
Previous << 1 .. 8 9 10 11 12 13 < 14 > 15 16 17 18 19 20 .. 70 >> Next