Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Capacity Planning:
An Essential Tool for
Managing Web Services
S
peed, around-the-clock availability, and That’s why planning e-business service capacity
security are the most common indicators requires more than just adding extra hardware
of quality of service on the Internet. based on intuition, ad hoc procedures, or rules of
Management faces a twofold challenge. thumb. Many possible alternative architectures
On the one hand, it must meet customer expec- can implement a Web service; you must determine
tations in terms of quality of service. On the other the most cost-effective architecture and system.
hand, companies have to control IT costs to stay This is where a quantitative approach and capac-
competitive.Therefore, capacity, reliability, avail- ity planning techniques come into play. Capacity
ability, scalability, and security are key issues to planning offers much more than just performance
Web services managers. E-business sites are com- prediction—it is actually a powerful technique for
plex system architectures with multiple intercon- managing Web services.
nected layers composed of many software and
hardware components, such as networks, caching MANAGING WEB SERVICES
proxies, routers, load balancers, high-speed links, The term Web service describes specific business
and large-database mainframes. The e-business functionality exposed by a company, usually
workload—composed of transactions and through an Internet connection, for the purpose of
requests submitted to e-business services—is also providing a way for another company or software
complex because of its bursty and highly skewed program to use the service.As the Web evolves into
load characteristics. Security and authentication a network of service providers, companies offer
requirements, payment protocols, and the unpre- Web-based services to potentially tens of millions of
dictable characteristics of Internet service users via hundreds of thousands of servers. Users
requests add to the complexity. and customers count on the ability to access any
For example, it is common for Web sites to service at any time. Customers’ increasing reliance
experience, without warning, a manifold increase on information-based services imposes three
in traffic volume. This type of load spike, also requirements—availability,scalability,and cost effi-
known as a flash crowd, creates terrible perform- ciency—on the services provided by online busi-
ance problems and slow download nesses.
times. Such Web delays frustrate cus- Availability means that users and customers can
Inside tomers and cost online business over count on accessing any Web service from any-
$4 billion each year, according to a where, anytime, regardless of the Web site or net-
report from IntelliQuest, a market work loads. Availability also means that the site
Resources
research firm (http://www.intelliquest. provides services meeting some measure of qual-
com). ity, such as a short and predictable response time.
Tools and services that drive system decisions.We begin by first defining and
Several companies offer tools and services to aid in quantifying the customer behavior that affects system per-
capacity planning. We list some of them in Table 1. formance.A customer model helps navigational and work-
load prediction. Models can answer what-if questions about
DEFINING CUSTOMER BEHAVIOR the effects of site layout changes or content redesign on
The workload model describes the workload of an e- user behavior. They can potentially predict future user
business service in terms of workload intensity (such as movements and prefetch objects to improve performance.
transaction arrival rates) and service demands on the var-
ious resources (such as processors, I/O subsystems, and net- Bookstore example
works) that make up the service.The workload model can Consider an online bookstore in which customers can
be derived from the customer model, which captures ele- perform the following functions:
ments of user behavior in terms of navigational patterns, e-
business functions used, frequency of access to the various • Connect to the home page and browse the site by fol-
e-business functions and times between access to the var- lowing links to bestsellers and promotions of the week
ious functions provided by the service. It takes a bit of plan- per book category.
ning to translate customer behavior into workload models • Search for titles according to various criteria including key-
these session CBMGs can group into CBMGs that repre- bottleneck that cannot be sped up. Irremovable bottlenecks
sent similar types of sessions (see Daniel Menascé and make the system nonscalable in terms of performance.
Virgílio Almeida, Scaling for E-Business, chapter 11, Managers must know their systems’ capacity limitations in
Prentice Hall, 2000, for a method to obtain clusters of advance.With their unpredictable traffic spikes,business sites
CBMGs out of Web logs).This clustering analysis can iden- bring new challenges to performance modeling. Detailed
tify interesting customer patterns, such as heavy buyers or and costly modeling analysis might not be worthwhile when
window shoppers. Companies could improve site revenue a capacity-planning analyst faces many possible future sce-
giving higher priority (for example, better quality of serv- narios.Quick bounding studies might be the right solution for
ice) to customers who are more likely to make a purchase. these cases.
The set of all these CBMGs and the session arrival rates
for each type of session constitute the workload model. Example
Consider an online business that is preparing for a surge
SIMPLE PERFORMANCE MODEL of customers because of a special event, such as soccer’s
In capacity planning, performance models are an impor- World Cup, or because of an advertising campaign.
tant class of models that are most useful in answering ques- Management does not know how many customers the site
tions about the behavior of a system and can determine a will attract during the World Cup games. Some market ana-
system’s scalability. First, consider what people mean when lysts estimate that the number of visitors varies from game
they say that a system is “scalable.”We consider a system to to game, depending on which teams are playing. However,
be scalable if there is a straightforward way to upgrade the they expect about 30 to 40 million visitors during the two-
system to handle an increase in traffic while maintaining ade- hour period right before the final game.
quate performance. By straightforward, we mean that scal- Developing a detailed model to calculate that the proposed
ing the system shouldn’t require any changes to the system system can support 5,555 visitors per second may be overkill.
or software architecture. Examples of straightforward Simply knowing that the site can serve approximately 1,000
changes are adding more servers to a system that already visitors/s for one alternative or 8,000 visitors/s for another
employs multiple servers, adding more CPUs to a multi- alternative is the right level of information to select one option
processor, or replacing existing servers with faster servers over another. Consider the following example of bounding
that use the same architecture. analysis. The e-business search function requires 0.005 s of
One approach to upgrading capacity is scaling horizon- disk I/O on average,and disk I/O at the database server is the
tally or scaling out, which means adding more servers of the bottleneck for this type of transaction.Then,according to the
same type. Scaling vertically or scaling up means replacing bounding analysis models, the maximum e-business service
existing servers with faster ones. Scalability is a key issue for throughput is 1/(service demand at the bottleneck resource)
Web services. Mission-critical business sites require careful = 1/0.005 s = 200 transactions/s.Suppose that 2 percent of the
planning and design to ensure that the application delivers search requests generate a sale and that each sale generates
reliable and scalable services. You must analyze the entire an average of $25. Thus, the upper bound on “revenue
end-to-end system to understand and document the char- throughput” is $100/s. Managers might find this type of met-
acteristics and performance of applications, servers, net- ric more meaningful, and it gives them an indication on how
works,load balancers,and firewalls.However,in many cases, the IT infrastructure can limit business revenue.
scalability is not achievable because of bottlenecks, such as
T
hardware or software resources that limit a system’s overall he bottom line in managing Web services is guarantee-
performance. ing performance,availability,and return on investment.
This is possible only if the IT infrastructure is ready to
Performance analysis provide customers with high-quality service. Web services
Performance analysis is a key technique to understanding IT infrastructure is complex enough to preclude any guess-
scalability problems in e-business. Because estimating traf- work when it comes to capacity planning. When planning
fic is difficult, an e-business designer must know beforehand site capacity,it is very important to make sure that the site can
the system’s limits, keeping scalability in mind. For instance, handle the peak and not just the average load. ■
a designer must know the maximum number of transactions
per second the system can process or the maximum response Virgilio A.F. Almeida is a professor of computer science at
time that the business site can tolerate.Performance-bound- the Federal University of Minas Gerais (UFMG), Brazil.
ing techniques allow you to calculate optimistic and pes- Contact him at virgilio@dcc.ufmg.br.
simistic bounds. Throughput upper bounds and response
time lower bounds are optimistic bounds. Daniel A. Menascé is a professor of computer science at
George Mason University, director of the MS in e-commerce
Scalability analysis program, and codirector of its E-Center for E-Business.
Scalability analysis refers to techniques that find a single Contact him at menasce@cs.gmu.edu.