Information Technology Reference
In-Depth Information
Chapter 5. Design Patterns for Scaling
The only real problem is scaling. Everything else is a sub-problem.
—O'Dell's Axiom
A system's ability to scale is its ability to process a growing workload, usually measured in
transactions per second, amount of data, or number of users. There is a limit to how far a
system can scale before reengineering is required to permit additional growth.
Distributed systems must be built to be scalable from the start because growth is expec-
ted.Whether youarebuilding aweb-based service orabatch-processing data analytics plat-
form, the goal is always to be successful, which usually means attracting more users, uses,
or data.
Making sure a service is fast and stays fast is critical. If your service does not scale, or if
it gets too slow as it becomes more popular, users will go elsewhere. Google found that an
artificial 400-ms delay inserted into its search results would make users conduct 0.2 to 0.6
percent fewer searches. This could translate into millions or billions of dollars of lost reven-
ue.
Ironically, a slow web service is more frustrating than one that is down. If a site is down,
usersunderstandthatfactimmediatelyandcangotoacompetingsiteorfindsomethingelse
to do until it comes back up. If it is slow, the experience is just painful and frustrating.
Buildingascalablesystemdoesnothappenbyaccident.Adistributedsystemisnotauto-
matically scalable. The initial design must be engineered to scale to meet the requirements
of the service, but it also must include features that create options for future growth. Once
the system is in operation, we will always be optimizing the system to help it scale better.
In previous chapters we've discussed many techniques that enable distributed systems to
grow to extreme sizes. In this chapter we will revisit these techniques in greater detail. We
will review terminology related to scaling, examine the theory behind scaling techniques,
and describe specific techniques used to scale. Mathematical terms used to describe how
systems perform and scale can be found in Appendix C .
5.1 General Strategy
Thebasicstrategyforbuildingascalablesystemistodesignitwithscalabilityinmindfrom
the start and to avoid design elements that will prevent additional scaling in the future.
The initial requirements should include approximations of the desired scale: the size of
databeingstored,thethroughputofthesystems thatprocessit,theamountoftraffictheser-
Search WWH ::




Custom Search