Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 1998

Load Sharing for Your NT Web Server


RSS
Subscribe to Windows IT Pro | See More Domain Name System (DNS) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

ROUND ROBIN can boost a hard-working Web server's performance while EASING its burden

A commercial I saw on TV the other day amused me. In an IBM e-Business commercial, two network engineer-types become overwhelmed with flame email because their Web server is too slow. Their conversation goes something like this:
Engineer #1: We should have upgraded the server.
Engineer #2: We can't. It's not scalable.
Engineer #1: Well, what should we do?
[Dramatic pause]
Engineer #2: Lock the door.

Although I'm sure IBM delivers good solutions, Big Blue is playing on people's fears in this commercial. Even if you buy a Web server that isn't scalable, you can boost its responsiveness by distributing the load across several systems. If you use basic technologies available in Windows NT, load distribution is easy.

Build a Better Mousetrap
Somebody once said, "If you build a better mousetrap, the world will beat a path to your door." Well, let's say the world consists of more than 30 million Internet users and your door is a single server on one IP address. With that setup, the world will blow your door off its hinges if everyone visits your site at once. However, if I must have a problem, I'd like it to be too much Web traffic.

What do you do if your Web server is overloaded? If you're not following the KISS (Keep It Simple, Sysadmin) principle with your Web server, start there: Pull off all non-Web-related services and put them on other servers. I am amazed at the number of newsgroup postings from people who are running a Primary Domain Controller (PDC) with Exchange Server, Proxy Server, SQL Server, Internet Information Server (IIS), Remote Access Service (RAS), Dynamic Host Configuration Protocol (DHCP), Windows Internet Naming Service (WINS), and Domain Name System (DNS) on one server with 64MB of RAM and wondering why they get lackluster performance. One great thing about NT and its domain-model infrastructure is that you can spread out tasks among different servers in the domain. By all means, take advantage of this capability.

What if you've stripped your Web server to the bare bones and you're still having performance problems? You must either scale your server or distribute your traffic load to lighten the burden on the server (for an example of how Windows NT Magazine's Web master handles distribution load on the magazine's Web server, see T.J. Harty, "Web Structure and Infrastructure," November 1997).

You don't need to consider high-end solutions such as clustering to accomplish basic load sharing. In this article I'll show you how to build load sharing into your system for just the cost of an additional server. Purchase a configuration that is identical to your existing Web server and distribute the load of your Web traffic evenly to give your second server about the same power and capacity as your first.

Round Robin DNS
If your Web site is configured the way most Web sites are, it probably looks like the setup in Figure 1, page 192, with one server handling all the site visitors. This common configuration works well initially, but as the site grows, the server starts to strain under the load of increased traffic.

You can't simply build another Web server that is identical to your first server because your two machines can't share the same IP address. Suppose your company has a DNS entry for www.yourcompany.com that is pointing to an IP address of 10.0.0.2. Making a new entry called www1.yourcompany.com and then pointing it to your new server at IP address 10.0.0.4 won't do you much good. What you need is one DNS name that points to two (or more) systems.

NT's DNS service can give you this capability. When you use DNS's round-robin entry function, you can list multiple IP addresses for any given site. The round-robin system lets groups of similarly configured systems act with clusterlike behavior without requiring significant technological investment or system retooling. DNS makes this functionality possible by keeping records on multiple systems that exist under the same host name but carry different IP addresses.

Here's how round robin works. When the DNS server receives a query for a given host name (e.g., www), it responds with all the available A (signifying Address) record addresses in sequence. When the server receives a second query for the same host name, the server shuffles the addresses before it replies: The first address from the first response moves to the end of the list, the second address from the first response becomes the first address in the second response, and all the other addresses move down the list in order. Suppose you have three Web servers, such as those shown in Figure 2, with the IP addresses 10.0.0.2, 10.0.0.4, and 10.0.0.6. If you define all these systems as A records with a host name of www, your DNS server responds to an initial query with all three addresses in the order listed in Figure 3. When the DNS server receives a second query for the same system, it shuffles the addresses, responding as shown in Figure 4.

Microsoft's white paper, "DNS and Microsoft Windows NT 4.0," states: "If you make a [DNS] query via some mechanism ... the DNS server will send both IP addresses back, but the client will always use the first one." I performed some informal testing with a packet sniffer and a few bogus DNS entries, and I discovered that the statement in Microsoft's white paper doesn't always hold true. True, some applications, such as PING, will use only the first IP address a DNS server gives to them. However, Internet Explorer (IE­and presumably Netscape) attempts to use the first address it gets but will cycle through the remaining addresses if the first system isn't online or doesn't respond.

Although the ability of a client machine to cycle through IP addresses is a great fault-tolerant feature, keep in mind that this ability is a function of the client, not the server. Making round-robin DNS entries doesn't mean your system is fault tolerant. NT's DNS server doesn't know whether one of the systems assigned to a specific IP address is down--it will continue to hand out all the A record addresses it has and shuffle them with each additional request. If your client application (such as NT's command line-based FTP client) doesn't know how to deal with multiple addresses, and if the host listed in the first IP address of the DNS response isn't available, the client won't connect.

To set up a round-robin DNS entry for your Web site, enter two or more A record entries for the same host name within your site, and give them different IP addresses. Screen 1 shows an example of two Web servers, one at IP address 10.0.0.2 and another at address 10.0.0.4, that are both listed with the same www DNS entry.

If you're not using NT's DNS, you can probably still set up a round-robin configuration. Because round robin is defined in Request for Comments (RFC) 1794, it is a widely accepted function for most DNS servers. You can also use round robin if you use Berkeley Internet Name Domain (BIND) 4.9.3 or a later BIND version. Or, if your Internet Service Provider (ISP) provides name service for you, ask your ISP to set up a round-robin entry for your Web server.

   Previous  [1]  2  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Microsoft Kills OneCare, Will Launch Free Security Solution

Microsoft on Tuesday announced that it would retire its $50-a-year security subscription product, Windows Live OneCare, and replace it with a free solution codenamed "Morro." Unlike OneCare, however, Morro will focus only on core anti-malware features and ...

The website is down because someone removed the X-Box

What happens when a manager mistakes a server for a games console. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing