Scaling Web Traffic

Tips for scaling large web-sites or web services

First, you need to think about how you might partition things. Slashdot can be partitioned by stories because each story forum is generally independent of any other. Thus, if traffic builds up, you can split the traffic to multiple servers by dividing up which story goes to which server. If you have little e-stores, you can obviously partition by store because each little store is probably independent from the others.

Another thing to consider is to put the web server on one machine and the database server on another.

The hard part is databases in which there is a lot of interaction and no clear way to divide. When you do a general key-word search on ebay, for example, you have to search across multiple "kinds" of things. In such a case it might be time to get a big-ass Oracle or DB2 system along with needed DB partitioning experts.

But even an ebay search may be partitioned by having the search server be separate from the auction detail server(s) themselves. It just might result in a delay between item posts and the time the search server gets the info to search on. The frequency of updates between the search servers and detail servers may have to be adjusted for traffic because during peak times frequent updates may not be possible.

Which brings up another related topic: degrading gracefully. Plan what happens when traffic gets too high. You may want to prioritize services or features, such that some lower-priority features are shut down before higher priority ones if things get steamy. For example, if ebay got flooded, they may want to disallow new items for a while. If you don't plan this, ALL services may go down.


See also: WebStoresDiscussion


CategoryWebDesign


EditText of this page (last edited November 23, 2004) or FindPage with title or text search