Get IT Done: Tips for fine-tuning your Web server

Examines networking tricks used to speed up Web pages, such as off-loading server-intensive encryption and using a third-party caching network

By Kevin Savetz

If your Web site can't deliver your message in a matter of seconds, you'll lose customers. Even users with slow connection speeds can quickly load pages if your Web server performs well.

To keep your customers coming back, your Web server needs to be fast and efficient. Potential customers won't stop to ask why your site is slow—they'll simply go elsewhere. But with the help of specialized software, hardware, and online tools, you can keep customers from quitting your site in frustration.

Performance enhancements run the gamut from free software and online services to expensive hardware. Regardless of which combination you choose, ensure that you've improved your Web site experience for all users—some improvements that benefit high-speed customers could still leave modem users at a crawl. Make sure that fine-tuning your Web server is truly a customer-retention program. Here's how.

Check out CNET Enterprise Business
This article appears courtesy of the CNET’s Enterprise Business section, where you can explore IT business solutions on various topics, including ASPs, Linux, groupware, information systems infrastructure, and supply chain management.

Performance testing and monitoring
Before you think about boosting your site's performance, you need to measure and document the performance you're currently getting. Performance testing allows you to monitor site load times by measuring the end-to-end response times from various locations.

Start by testing your server's capacity and limitations. Find out how many pages it can deliver simultaneously and how long it takes to download the most popular pages over fast and slow connections.

A wide variety of performance criteria can be tested, and an equally diverse array of software and services is available for performing them. Each offers its own set of tests, which range from basic alerts that a server is down or overloaded to synthetic transaction software that tests performance and response time. Online services include AlertSite, Holistix Web Manager, and Luminate.Net. Your performance test results will give you a baseline—tangible information that will help you make performance upgrade decisions. After installing an upgrade, test again to gauge its effect.

How much improvement you should expect from an upgrade depends entirely on your performance needs—and how much you're willing to invest. Options range from free software add-ons to hardware that costs thousands of dollars.

Regardless of the complexity of your upgrade, performance testing should not be a one-time activity. Many factors, from changing visitors' usage patterns to installing a new version of server software, can help or hinder performance. Test your site whenever you change anything concerning your Web server or the applications running on it. Even a seemingly minor change to your site's software can cause performance problems.

In addition to occasional testing, ongoing monitoring of your Web server is important. Monitoring will let you know when the server's workload is too high or whether it crashes and can also help uncover other problems. To conduct basic monitoring, use a log file analysis program to find out when your traffic peaks, then check the server's response at those times. For a more complex solution, use software or a service that continually monitors your site and reports performance metrics.

There are many options for performance monitoring. WebPerf is a free, open source system for measuring response time from multiple locations on the Internet. Keynote Perspective offers online services that perform more complex measurements, such as the speed of e-commerce transactions and the performance of streaming media.

Performance testing and monitoring tools
Performance testing These services offer tests that range from basic systems that alert you when the server is down or overloaded to synthetic transaction software that tests performance and response time. Performance monitoring These services monitor your Web site's performance. WebPerf is a free, open source system that measures response time. Keynote Perspective measures download time, transaction speed, and streaming media performance.

Prevent Web server overload
To keep your Web server from overloading, you have to control the load placed on the server by both your visitors and the server software. Although server-side scripting tools such as Active Server Pages (ASP), Allaire ColdFusion, and PHP can help you build dynamic Web pages to be generated on the fly, this puts a heavier load on the server than posting static pages.

Examine your site—especially the most popular pages—and decide what content needs to be built dynamically. If a page doesn't need to be dynamic, make it static and lighten the load.

Also, you can even out the user load by encouraging users to visit at a steady pace rather than in sporadic, server-crushing bunches. You can't tell people when to surf your site, but you can decide when to post new content. Instead of adding five new articles every Monday morning, for example, post one per day. This could prevent a performance-crunching load from putting your server out of commission on Monday morning.

To help stagger content posting, high-end page-generation tools such as Vignette Content Management Server and JavaServer Pages allow Webmasters to preload content and schedule a posting time.

Optimize your HTML
Optimizing the transmission of HTML files is an effective way to decrease download times and save bandwidth. Because HTML is not a design layout language, white space—returns, spaces, and tabs—can be removed with no effect on the look of the page in the browser. If you strip your HTML files of that extra padding, visitors with slow Internet connections may notice a slight speed improvement, but high-speed users probably won't notice. Stripping extraneous HTML comments can shave a few bytes too, but do this carefully—many browser and server-side functions (such as JavaScript and PHP) rely on code enclosed in comment tags.

A more effective but more difficult technique is compressing HTML files before they're sent. Transferring compressed files takes less time and bandwidth, but this process works only with modern browsers that can decompress the files before displaying them. Few Web servers have built-in support for dynamic compression, but software can add this functionality. For instance, you can install mod_gzip, a free module that adds dynamic GZIP compression capability to the Apache Web server.

Another technique, HTTP pipelining, lets the server stuff multiple objects into each HTTP stream, which reduces the number of packets transmitted as well as the transfer time. By leaving the TCP connection open between consecutive operations rather than running multiple short TCP connections in parallel, overhead is reduced. According to a W3C study, pipelining can trim the number of packets transmitted by a 2-to-10 factor. Pipelining is available only under Hypertext Transfer Protocol 1.1 (HTTP/1.1) and is built in to many Web servers that support HTTP/1.1. Check your server's documentation to find out whether it is configured to use pipelining.

You can't count on compression and pipelining to work with all browsers. It will work only with browsers that support HTTP/1.1, which lets browsers and servers negotiate optimal content encodings. A detailed description of the process can be found in RFC 2616.

Use a third-party caching network
A single server—or even a group of servers in one location—may not be effective for worldwide delivery of your Web site. Network congestion and server load can hamper access speeds and make it difficult for your Web server to deliver pages, even within the same country. However, a distributed caching network can ease the load and provide a huge speed boost.

A caching network is a group of Web servers placed in geographically distant locations. These caching servers download copies of the information on your company's primary server. When a visitor requests information from your site, some or all of the data is served from the caching server that will be fastest for that user. The result is faster downloads.

Caching servers can maintain a complete copy of the primary Web site, known as a mirror, that is automatically updated when the primary site is changed. When visitors access your site, they are rerouted to the nearest and fastest mirror server. One such caching network is Digital Island Footprint.

Some caching server networks, such as Akamai FreeFlow, let your server deliver HTML pages while the caching servers deliver images and other bandwidth-intensive content. This method speeds download times and is completely invisible to visitors. The services are aimed at medium to large businesses. The Akamai FreeFlow service costs $1,995 per megabit per second of content delivered, averaged over one month's time.

Offload server-intensive encryption
To safeguard online transactions, your Web site probably uses encryption and decryption—very CPU-intensive processes. Servers loaded with many simultaneous encrypted connections will be slower, whether or not they use encryption. If your server makes heavy use of Secure Sockets Layer (SSL) or Secure Shell (SSH) encryption, you can lighten its load by offloading encryption to specialized hardware.

An encryption accelerator handles public-key encryption calculations to improve your server's response time. The products are expensive (about $7,000 to $15,000), but because they can significantly reduce the load on a Web server, you may not have to add additional servers.

The choices include the Intel NetStructure 7115 e-Commerce Accelerator, iVEA CryptoSwift eCommerce Accelerator, and Packeteer AppCelera ISX-50.

Installing these devices is not difficult. Besides plugging in the hardware, system administrators need to install software on the Web server. The software intercepts SSL connection requests and passes them to the accelerator hardware. (Each product offers software that is compatible with the major Web servers.)

Caching networks and content accelerators
Third-party caching networks A caching network keeps a complete copy of a primary Web site and routes visitors to the nearest and fastest server. Encryption accelerators These accelerators offload SSL encryption to reduce the load on your Web server.

Boost speed with software and hardware
A relatively easy way to boost site performance is to install specialized software or hardware to optimize Web connections.

The Packeteer AppCelera ICX-75 is a $17,995 hardware content accelerator that compresses HTML and optimizes graphics files based on each visitor's connection speed and browser type.

Or you can add software to provide performance enhancements. For instance, BoostWeb Optimizer accelerates Web page delivery by compressing HTML and optimizing graphics files depending on the browser type. The software starts at $10,000 for a single-CPU system. Software-based optimizers will speed users' connections and save bandwidth, but they will increase the load on your server. BoostWorks recommends that you run the software on a separate server.

Set maximum sizes for file types
Although this is a procedure and not a technical solution, company policy should set maximum sizes for HTML pages, image files, and Java. Delivering small files is most important for users with slow Internet connections. Many simple techniques are available to reduce file sizes:
  • Reduce the number of colors in GIF images.
  • Increase the compression level of JPG images.
  • Break large HTML files into several smaller pages.

What should your file size limits be? There's no right answer; it depends on the amount of bandwidth your average user has. You should design pages for the slowest expected connection speed. Many Web design applications, including Adobe GoLive and Allaire HomeSite, will show estimated page download times at various connection rates.

Tools such as JPEGCruncher, GIFCruncher, and Image Optimizer can quickly optimize batches of GIF and JPEG images.

There is no best way to boost site performance. The techniques that are right for your site depend on the amount of traffic and bandwidth you have, the access speed of your users, and your budget. But no matter how you boost performance, you'll have more satisfied visitors in the end.

Content accelerators and image optimizers
Content accelerators Content accelerators compress HTML and optimize graphics files. Image-optimizing tools These tools handle batches of GIF and JPEG images to reduce file size.

Kevin Savetz, a contributor to CNET Enterprise, is a freelance computer technology writer who has specialized in the Internet since 1992.


Editor's Picks