Upload
srijan-technologies
View
350
Download
0
Embed Size (px)
Citation preview
Architectural DecisionsServing the Thundering Herd
Supreet Sethi @djinn
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil- Donald Knuth
Stats
l 28000 requests per minutel Page load of 7s including imagesl 14th most visited site in India
Sizing and planning
lPlan forlnetworkltraffic split on different pageslIOPSlCPU/RAMlUnderstand the beast
Toolset and Services
lMemcachelRedislMCRouterlMessage Queues (AMQP, Kafka)lVarnishlAWS ServiceslCDNslCouchBaselAerospike
All site features are not used equally
Discover services on top of the funnel and optimize first
lJabong funnel viewlHome pagelCatalog PagelProduct pagel80% of traffic gravitates to these pages
Following structured design changes
will optimize key pages on top of the funnel. It will contribute also in speeding other pages by reducing resource consumption.
Speed - relation to funnel
Programming Strategy
lDefine bottlenecklFind candidate solutions
lTest each candidate one at a timelDeploy in productionlRinse and Repeat
Unit Testing
lClear plan to test every piece of platformlSeparating web-handler from business LogiclTesting with and without web-handlersl Abstract Request and Response interfaces very useful
Staging and Deployment
lLog capture on load balancelReplay the logs on staging server for load testlFormal verification of code
Lessons Learnt
lThings will fail.lScale surfaces bugs.l Key to success is understanding what the system is actually doing. Know if your system is in a healthy state or about to crash.l Have a strategy
Lessons Learnt …
lMake it work.lMake it visible.lMake it DevOps.
Supreet Sethi@djinn
Thank You!