Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Learning to Fly: How Angry Birds Reached the Heights of Store Performance |…


Published on

Published in: Technology
  • Be the first to comment

Learning to Fly: How Angry Birds Reached the Heights of Store Performance |…

  1. 1. Learning To Fly: How AngryBirds Reached the Heights ofStore Performance
  2. 2. Insert photo of speakerhere891 pixels h x 688 pixels wLearning To Fly:How Angry BirdsReached theHeights of StorePerformanceLead Magento DeveloperFabrizio Branca
  3. 3. San Francisco, CAJanineFionathat’s meIt’s a boy!
  4. 4. AOE media, a Magento Gold Partner and leading provider forOpen Source-based Portal development, Web ContentManagement and e-Commerce with its headquarters in SanFrancisco, California and Wiesbaden, Germany and more than120 people in seven offices world-wide.
  5. 5. MagentoImagine2012 MeetMagento2012 MeetMagento2011Part II Part I
  6. 6. Lessons Learned...from running aHigh PerformanceMagento Storeoriginal title ofthis presentation!
  7. 7. PCgames (download)Plushtoys, shirts, ...
  8. 8. >24.000.000 likes >500.000 followersSocial MediaImpact
  9. 9. 1.000.000unique visitors. per day.
  10. 10. concurrent users.
  11. 11. Orders.105 6789per second.Yes, per second!
  12. 12. S3Assets StorageVarnish ArrayEC2Frontend ArrayCloudFrontCDN for SkinRDSMySQLS3DeploymentCacheELBLoad BalancerCloudFrontCDN for AssetsMonitoringBackend ArrayEC2 EC2EC2Worker ArrayEC2BraintreeMailDRMGiftcardsLoggingEC2Route
  13. 13. Varnish ArrayFrontend Array Worker ArrayEC2Deployment xELBLoad BalancerVEC2FroBackend ArrayEC2 EC2EC2EC2Deployment x+1Release YELBLoad BalancerRoute 53DNS-Serviceshop.angrybirds.comDeployment
  14. 14. DowntimeNumber oflost cartsNumber oflost sessionsand logins
  15. 15. Stores…and GeoIPredirection!
  16. 16. Themes
  17. 17. GrowingDataTrimmingthe fat!OrdersPromotionscms / bannersAoe_CacheCleanerAoe_QuoteCleaner
  18. 18. VarnishReverse ProxyMagentoProtectingMagentomore traffic,more stores,more products,more urls,…less requestshitting Magento!
  19. 19. 90%VarnishTweakingCache Hitrate
  20. 20. 80%VarnishTweakingCache Hitrate
  21. 21. 98.6%VarnishTweakingCache Hitrate
  22. 22. Request a page (HTTP Request)deliver static pageRequestDelivering static contentPlaceholders for dynamic parts.Cache-Control headersAjax call request dynamic partsand transfers the id of the currently visited productJSON response with dynamic contentReplace placeholderWrite session id to cookieRender the pageBrowser Varnish MagentoAoe_Static
  23. 23. ReduceNumber of RequestsDo ajax requests instead of full page loads!»Add to basket»Displaying the mini cartDon’t do ajax requests!»Login status and username»(Number of) cart items»Geo locationCache 404 pages and redirects!Normalize urls!… hitting MagentoUse cookies orlocalStorage
  24. 24. Cache ina CacheMagentoVarnishAoe_AsyncCache Aoe_VarnishAsyncCacheUpdates
  25. 25. BottleneckDatabase
  26. 26. DatabaseTuningdb.m2.4xlargeProvisioned IOPS StoragePercona ToolkitThis is notan iPhone!“High-MemoryQuadrupleExtra Large DBInstance”
  27. 27. RDS(MySQL)RDS(MySQL)Cache BackendAoe_DbCacheDatabaseSplitting
  28. 28. SessionsFPCRDS(MySQL)RedisCache BackendRedis
  29. 29. BottleneckFile I/O
  30. 30. libcommunitycorelocalNumber of *.php files by locationLess fileoperations
  31. 31. Aoe_ClassPathCacheMagentoCompilerSolutionFile I/O…also checkMagento 2!
  32. 32. ReportGenerationDon’t try this at home!on productionRead Replica BackgroundProcessDelta Pre-processing
  33. 33. ProcessingCronscron.shcron.phpAoe_Scheduler with multiple cron groupswill block other cronsperformance issues,race conditions!SCHEDULER_WHITELIST=a,b,c’ cron2.phpSCHEDULER_BLACKLIST=a,b,ccron.shAoe_Scheduler
  34. 34. Code QualityModulesDon’t let thembring you down!Uh-Oh!
  35. 35. Code QualityModulesNot enterprisereadyNot productionreadyNot cloudreadyBadperformanceSecurity
  36. 36. ContinuousQuality AssuranceCode Reviews Profiling,stress testsAutomateAoe_ProfilerEverything sounds betterwith “continuous”Questioneverything!Part of the dev process!
  37. 37. BrokenTestcasesSwitch toSelenium 2Nobody pays attentionto test resultsMenta
  38. 38. Lesson LearnedPlan extra time!Number ofunexpectedproblemsNumber ofcomponents
  39. 39. What’s next?Move quotes Cache Backend+ php-fpm+ PHP 5.4Web server EC2 instancesizesMySQL?MongoDB?Less bigger instancesvs.more smaller ones?
  40. 40. Thank you,Team!You’re awesome!
  41. 41. Thank you!Any questions?fabrizio.branca@aoemedia.comhttp://www.aoemedia.com me on twitter!My blog