Learning To Fly: How Angry Birds Reached the Heights of Store Performance
|
|
- Christopher Edwards
- 8 years ago
- Views:
Transcription
1
2 Learning To Fly: How Angry Birds Reached the Heights of Store Performance
3 Learning To Fly: How Angry Birds Reached the Insert photo of speaker here 891 pixels h x 688 pixels w Heights of Store Performance Fabrizio Branca Lead Magento Developer
4 It s a boy! Janine that s me San Francisco, CA Fiona
5 AOE media, a Magento Gold Partner and leading provider for Open Source-based Portal development, Web Content Management and e-commerce with its headquarters in San Francisco, California and Wiesbaden, Germany and more than 120 people in seven offices world-wide.
6 Part II Part I Magento Imagine 2012 Meet Magento 2012 Meet Magento 2011
7
8 Lessons Learned...from running a original title of this presentation! High Performance Magento Store
9
10 Plush toys, shirts,... PC games (download)
11 Social Media Impact > likes > followers
12 unique visitors. per day.
13 concurrent users.
14 Orders. per second Yes, per second!
15
16 shop.angrybirds.com CloudFront CDN for Assets S3 Assets Storage Route 53 DNS-Service CloudFront CDN for Skin ELB Load Balancer Monitoring Logging EC2 EC2 Varnish Array EC2 Backend Array EC2 EC2 Frontend Array EC2 Worker Array S3 Deployment Cache RDS MySQL DRM Giftcards Mail Braintree
17 shop.angrybirds.com Route 53 DNS-Service ELB Load Balancer ELB Load Balancer Varnish Array Deployment x Deployment x+1 Release Y EC2 EC2 V Frontend Array EC2 Worker Array EC2 Backend Array EC2 EC2 Fro Deployment
18 Downtime Number of lost carts Number of lost sessions and logins
19
20 and GeoIP redirection! Stores
21 Themes
22 Growing Data Aoe_CacheCleaner Aoe_QuoteCleaner Trimming the fat! Orders Promotions cms / banners
23 more traffic, more stores, more products, more urls, Protecting Magento Varnish Reverse Proxy Magento less requests hitting Magento!
24 Varnish Tweaking Cache Hitrate 90%
25 Varnish Tweaking Cache Hitrate 80%
26 Varnish Tweaking Cache Hitrate 98.6%
27 Browser Varnish Magento Request a page (HTTP Request) Request Aoe_Static Render the page deliver static page Delivering static content Placeholders for dynamic parts. Cache-Control headers Ajax call request dynamic parts and transfers the id of the currently visited product Replace placeholder Write session id to cookie JSON response with dynamic content
28 hitting Magento Reduce Number of Requests Do ajax requests instead of full page loads!»add to basket»displaying the mini cart Don t do ajax requests!»login status and username»(number of) cart items»geo location Cache 404 pages and redirects! Normalize urls! Use cookies or localstorage
29 Aoe_AsyncCache Aoe_VarnishAsyncCache Updates Magento Cache in a Cache Varnish
30 Bottleneck Database
31 Database Tuning This is not an iphone! High-Memory Quadruple Extra Large DB Instance db.m2.4xlarge Provisioned IOPS Storage Percona Toolkit
32 Database Splitting RDS (MySQL) RDS (MySQL) Cache Backend Aoe_DbCache
33 Redis Sessions RDS (MySQL) Redis FPC Cache Backend
34 Bottleneck File I/O
35 community local lib Less file operations core Number of *.php files by location
36 Solution File I/O Magento Compiler Aoe_ClassPathCache also check Magento 2!
37 Don t try this at home! on production Report Generation Read Replica Delta Preprocessing Background Process
38 cron.sh cron.php will block other crons Processing Crons performance issues, race conditions! Aoe_Scheduler Aoe_Scheduler with multiple cron groups SCHEDULER_WHITELIST='a,b,c cron.sh cron2.php SCHEDULER_BLACKLIST='a,b,c' cron.sh
39 Code Quality Modules Don t let them bring you down! Uh-Oh!
40 Code Quality Modules Security Not enterprise ready Not production ready Not cloud ready Bad performance
41 Everything sounds better with continuous Continuous Quality Assurance Question everything! Aoe_Profiler Code Reviews Profiling, stress tests Automate Part of the dev process!
42 Broken Testcases Menta Nobody pays attention to test results Switch to Selenium 2
43 Lesson Learned Plan extra time! Number of unexpected problems Number of components
44 What s next? Less bigger instances vs. more smaller ones? MySQL? MongoDB? + php-fpm + PHP 5.4 Web server EC2 instance sizes Move quotes Cache Backend
45 Thank you, You re awesome! Team!
46 Thank you! Any questions? My blog Follow me on twitter!