• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Part I: Scalability > Different Ways to Scale

Chapter 2. Different Ways to Scale

In this chapter

Part One: Understanding Scaling Issues

Part Two: Choosing a Load-Balancing Solution

In the preceding chapter you learned about ways to monitor your site's performance and analyze problems. This chapter focuses on one solution to a performance problem—scaling up your site by adding additional servers.

You can host a single Web site across multiple Web servers in two different ways. The first option, which is arguably the simplest, is to split your site's functionality across multiple machines. If indexing your site and running full-text searches is slow, you can set up a separate Web server that just does searching and call it search.yourdomain.com. If e-commerce and credit card validation are your bottleneck, you can set up another machine called store.yourdomain.com. Many successful Web sites add additional machines in this manner. Some sites under particularly heavy traffic even put their images on a separate images.yourdomain.com server to segregate their HTTP traffic. This type of scaling is relatively easy because each machine can have a unique configuration. This way, you don't have to deal with many consistency or synchronization issues.

This strategy might work in some situations, but it has weaknesses. The first weakness is that this strategy doesn't provide any redundancy. If you move a search to a separate server, and your search machine crashes, you've just lost all search functionality, even though your main server is running fine. If you provide identical services on the two machines you own, the failure of one has an impact only on your ability to handle high traffic. It doesn't deactivate any features of your site.

The second problem you might encounter happens when you get so much traffic that one box isn't enough to handle your dedicated function. What happens when your search function becomes so popular that your single search box is running out of resources? Do you subdivide your search into, say, a site search and a news feed search, and set up site.search .yourdomain.com and newsfeed.search.yourdomain.com? Then you have to go into your existing code and change all the old references to search.yourdomain.com. You have to deal with people who may have bookmarked your search machine. And that's assuming you can even subdivide your search function into two separate pieces. How do you split up an e-commerce application that just does credit card queries? Visa.store.yourmachine.com and amex.store .yourmachine.com? You can see that this solution isn't reasonable.

At some point, you're going to want to use two or more machines to provide a single service to your users, whether it's your entire site or just a subsection. You will want the users to have as seamless an experience as possible; ideally, your users shouldn't even know that the site they're visiting is a collection of machines. A group of machines serving identical content and services is generally known as a cluster, a name that nicely captures the homogenous nature of such an installation. You might also hear a cluster and its associated back-end machines referred to as a server farm, presumably due to the natural tendency of server computers to proliferate like kudzu. This chapter will focus on the issues of running a single Web site across multiple Web servers.

Running one Web site on one server is relatively straightforward: You know that every Web request goes to the same Web server software and ColdFusion service, with the same settings and environment. But as soon as you add a second server, you are faced with a host of technical challenges. This chapter will discuss the issues you'll face in moving to a multiple-server configuration and will then move to a review of some of the main technologies that enable you to distribute your traffic across multiple servers in a balanced way.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint