capacity planning for web sites. promoting a web site thoughts on increasing web site traffic but…...

24
Capacity planning for web sites

Post on 22-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Capacity planning for web sites

Promoting a web site

• Thoughts on increasing web site traffic but…

• Two possible scenarios…

Scenario 1: sudden traffic increase

• Web site causes its own surge – new marketing

• New link to another popular site

• Site mentioned by popular index – slashdot effect

• Site hosts a web application used by other applications

Scenario 2: cumulative increase

• Occurs as site becomes more widely known

• Introduction of new technologies e.g. XML increases load

• Network effect – increase in connections to a site from other sites

ResultWeb server inundated with requests

Resulting processes cause memory overload

Web server slows then crashes

Performance issues

• Speed is first problem

• Components of web systems –possible bottlenecks

• Content – one web page = many files

• Increased web services- increased no of hits

• Web traffic – randomness of accesses

• User’s perception of performance

Solution – capacity planning

• Estimates space, hardware, software, infrastructure needed over future period

• Takes into account projected growth in site usage

• “Just in time” – add the capacity just before it is needed – no unused resources

Answers the questions

Future needs? “What if..” scenarios

e.g. is bandwidth adequate?

e.g. can system handle load spikes?

Will performance be scalable?

What monitoring tools are available?

How can more capacity be provided?

Why is capacity planning important?

• Ensure positive user experience• Maximise productivity• Avoid financial surprises• Maintain stability and availability• Arrange for emergency capacity• Assess performance of new

applications/architecturesTittel (2002) “Why plan web capacity?”

“Because capacity problems can’t be solved instantaneously…”

(Menasce & Almeida (2001))

Planning capacity

• Some definitions

• Clarifying requirements

• Planning activities– Monitoring– Predicting– Estimating

• Action and review

Some definitions

• Relating to server– Service level

– Service time

– Waiting time

• Relating to network– Latency

– Throughput

– Bandwidth

– Utilization

– Quality of service•Relating to web site

–Hits per second

–Errors per second

–Time-out rate

Clarifying requirements

• What is the purpose of the site? How available should it be?• How tolerant are the users?• Have you analysed log files?• How many HTTP operations per unit time expected?• What is the average transfer size going to be?• Will you provide any streaming media?• Will the web server spawn additional processes?• What other processes need to be run on the web server or over the

network?• What sort of scalability do you need?• What is your budget? Can you force suppliers to compete?• Future traffic and usage growth – spare capacity levels?

Killelea (2002)

Planning activities

Understand environment

Workload characteristics

Performance prediction

Cost/performance analysis

Workload prediction

Monitor performance

Cost model

Workload model

Performance model

PlansAdapted from Menasce & Almeida (2001)

Workload prediction

• Differentiate between types of workload

• Characteristics, e.g.– “Burstyness”– Large transfers

• Analysis– Capacity trending– Analytical modelling

Measuring and predicting performance

• Which are the critical web site IT resources

• Average & “under-load” response times

• Web server performance benchmarks and monitoring tools

• Scenario data sets

• Load testing and modelling

Plan for…

• How much bandwidth?– Hits/second x average size of hit in bits = bits/second

• How fast a server?– Load balancing

– Load clustering

– Mirror servers

• How much memory?– Memory-using components of server:

– Operating system, web server configuration, web content, server-side programs

And…

• Establish upgrade process for resources

• Scalability – capacity interdependencies between infrastructure components

• Monitor actual traffic growth and resource usage

• Revise plan when any component changes (kit, traffic or market)

Ways of providing capacity/improving performance

• Reconfigure network

• Rewrite critical applications

• Reduce content load

• Proxy, caching and mirror servers

• Test using your performance model

What influence can you have as a web administrator?

– Can’t directly influence Internet– May not be able to influence resource decisions

• Write down capacity requirement

• Monitor performance, keep records

• Alter server configuration – performance and content

• Plan for future scalability