11. Request/Response Cycle (Apache Prefork) Apache Main Process Apache Main Process Request on port 80 ForkChild Child Process SendRespond
12. Request/Response Cycle (Apache Prefork) Request/Response Cycle (Apache Prefork) Apache Main Process Apache Main Process Child Process Child Process
22. Challenges : Component Failure # Failure Hardware failure RAID fails Node in cluster fails Learning : Design for 60% usage KISS
23. Challenges : Peaks in traffic # Failure Successful marketing campaigns Radio Station – 10 stations announcement TV Personality – News agency interviews
24. Challenges : Peaks in traffic # Failure Successful marketing campaigns Radio Station – 10 stations announcement TV Personality – News agency interviews Learning Try to stagger your communications Soft launch when you can
28. Challenges : Unproven code # Failure Third party libraries can go wrong Learning Beware of 3rd party libraries Profile all new code Profile all new code Profile all new code
30. Challenges : Unproven code # Failure Updated System libraries Memcached client libraries update GD2 Client library update Learning Beware when updating production servers Always have a Hot backup to rollback
32. Challenges : Stress tests # Failure Stress tests the false insurance Learning Correct planning of test scenarios Correct estimation of your traffics shape Replicate a production environment as closely as possible
37. Optimization Optimization is not about code Optimization is not about RAIDed disks Optimization is not about software architecture Optimization is not about caching systems Optimization is not about load
38. Optimization Optimization is not about code Optimization is not about RAIDed disks Optimization is not about software architecture Optimization is not about caching systems Optimization is not about load Optimization is about all the pieces working in unison Optimization is an ongoing process
40. Optimization : Finding the bottleneck Optimization starts with Risk Set the Assumptions # Users Mix of traffic Connection speed ....
41. Optimization : Finding the bottleneck Optimization starts with Risk Set the Assumptions # Users Mix of traffic Connection speed .... Define your System metrics Page load time Page weight Memory usage CPU Usage Load average
46. Look at %Optimization starts with Risk Set the Assumptions # Users Mix of traffic Connection speed .... Define your System metrics Page load time Page weight Memory usage CPU Usage Load average
51. Load test your systemOptimization starts with Risk Set the Assumptions # Users Mix of traffic Connection speed .... Define your System metrics Page load time Page weight Memory usage CPU Usage Load average
63. Etc ...Optimization starts with Risk Set the Assumptions # Users Mix of traffic Connection speed .... Define your System metrics Page load time Page weight Memory usage CPU Usage Load average
64. Optimization : Finding the bottleneck Conclusion I am more riskconscious I think before I code I profile, and profile, and profile I define my test scenarios Development environment as close as possible to the Production environment I test my deployments And always have a Plan B in case I forget something!
Notes de l'éditeur
What can cause these Apache children to slow down or completely stall ?
Mon Cinema – NFS Failed on writesCvendu – Clustering (That famous 4 am call)
Try to stagger your communicationsSoft launch when you can
Estimate your peak and design for it
Zend_Cache’s default config.NET Component
Beware when updating production serversAlways have a Hot backup to rollback
Correct planning of test scenarios# Visitors, Average Time on page, # Concurrent usersCorrect estimation of your traffics shapeRead/Write ratio, Cache Hits/Miss ratio
Correct planning of test scenarios# Visitors, Average Time on page, # Concurrent usersCorrect estimation of your traffics shapeRead/Write ratio, Cache Hits/Miss ratioReplicate a production environment as closely as possibleMake sure that you have correct amounts of data