SlideShare a Scribd company logo
1 of 23
Download to read offline
CASE STUDY 
www.distinct.ro 
How Distinct helped evoMAG.ro handle Blackfriday 2013 traffic spike 
Traffic is coming ! โ€œOMGโ€ moments
Summary: 
1. Who 
2. The Challenge 
3. The Work 
4. Aftermath 
www.distinct.ro
www.distinct.ro 
1. Who :: Bogdan Belu - Distinct 
Bogdan Belu - www.bogdanbelu.com 
๏‚ง19+ years of technical and business experience (network administration, programming, datacenter services) 
๏‚งsince 2001, CEO of Distinct (www.distinct.ro), managed services and datacenter provider under "plus through responsibility" motto 
๏‚งhelps clients handle their mission critical Internet infrastructure 
Clients
1. Who :: evoMAG 
online retailer with IT-related products focus 
2013 total revenue: 15.5 mil EUR 
BIG Blackfriday promotional sale on Nov, 22, 2013 (up to 99% price cuts) 
www.distinct.ro
2. The Challenge 
โ€œkeep the www.evomag.ro site 100% up during the Blackfriday 2013 eventโ€ 
www.distinct.ro
www.distinct.ro 
2. The Challenge :: Context 
๏ฑ a warehouse full of products waiting to be sold 
๏ฑ uptime problems in the previous years 
๏ฑ same web application (more or less) as the previous years 
๏ฑ better marketing campaign from evoMAG team compared to the past 
๏ฑ marketing and inventory disaster if something goes wrong
www.distinct.ro 
www.distinct.ro
2. The Challenge 
Distinct's role in this project: 
โ€ข datacenter services (servers, networking) 
โ€ข managed services (system administrators) Gladly accepted the challenge since is consistent with our mission: โ€œDistinct provides infrastructure and maintenance of Internet services and applications. Distinct's offer include datacenter hosting, managed services and SaaS. The success of our clients depends on the proper functioning of computer applications such as content services, e-commerce, internet banking or email.โ€ 
www.distinct.ro
3. The Work :: Analysis 
โ€ข new client for Distinct 
โ€ข started work about 40 days before the event (late start) 
โ€ข got historic metrics from the previous Blackfridays 
โ€ข got the traffic estimates from evoMAG's marketing departament (number of visitors, number of orders, estimated user path in site, etc) 
โ€ข analyzed the site thoroughly (technical point of view) 
โ€ข efficient budget because of the low margins (more of a marketing event) 
www.distinct.ro
www.distinct.ro 
3. The Work :: Targets 
โ€ข translated marketing estimates into technical metrics (HTTP hits per site feature, bandwidth, etc) 
โ€ข better to overestimate than sorry 
โ€ข further translated technical metrics into an infrastructure proposal (network, servers, software stack) 
Example for the Homepage: 
โ€ข estimated the number of visitors per day: 600 000 
โ€ข estimate the peak number of unique visitors per hour: 200 000 
โ€ข total size of homepage: 1 MB 
โ€ข total needed bandwidth for homepage for one user: 8 Mbps 
โ€ข HTTP hits per homepage for one user: 100 (first visit, no browser caching) 
โ€ข average unique visitors per second (peak): 55.56 
โ€ข estimated hits pers second: 5555.56 
โ€ข estimated bandwith needed: 444 Mbps 
โ€ข after that, overestimated about 2.5x in order to handle instant peaks/stay safe 
Orders: prepared for 50 orders/s (peak)
3. The Work :: Roles 
โ€ข Distinct (datacenter and managed services): systems and network 
โ€ข Customsoft (the web application developer): special Blackfriday web pages, code optimizations, application insights 
โ€ข evoMAG (the client): marketing data, constant feedback and rapid approvals 
www.distinct.ro
3. The Work :: Technical Keypoints 
โ€ข URL analysis (load impact, predicted usage, usefulness) and classification, separate static (eg: product description, content page) and dynamic content (eg: shopping cart) into 'content classes' 
โ€ข explicit URLs in order to ease classification 
โ€ข took the responsibility for URLs (hardcoded caching and routing rules in load balancer), more than 1000 lines of configurations 
โ€ข suggested to temporary eliminate unnecessary stuff for Blackfriday or make it client side, if possible (popups, cookies, background processes - crons not critical) 
โ€ข request small but with big load impact software modifications whenever possible (due to short time frame) 
โ€ข tried not to modify the existing setup core too much (to avoid the 'joys' of refactoring in such a short time), built around it 
โ€ข move most of the dynamic bits on AJAX 
www.distinct.ro
www.distinct.ro 
3. The Work :: Technical Keypoints 
TOPOLOGY: 
Layer 1: Caching/Load Balancing 
โ€ข those are the the systems client browsers connect to 
โ€ข 16 IPs in DNS for www.evomag.ro at peak (load balancing via DNS) 
โ€ข roles: caching, hits spikes load bearing 
โ€ข scalable (easily add more on demand) 
โ€ข HTTP caching, lots of (> 90% hit rate) 
โ€ข automated health checks of the next layer 
Layer 2: Caching/LoadBalancing/Routing 
โ€ข 2 servers (active/active configuration) 
โ€ข cache aggregation 
โ€ข permitted quick/realtime request routing changes (automatic or manual) 
โ€ข automatic health checks for the next layer (webservers) and exclude the 'bad' servers from production for a while (ex: 30s) 
โ€ข even if the webserver behind is unavailable deliver cached content (when appropriate, we frozen static pages modifications for the day)
www.distinct.ro 
3. The Work :: Technical Keypoints 
Topology (continued): 
Layer 3: Webservers 
โ€ขcloned the existing webserver into multiple copies 
โ€ขroute the important requests (eg: orders, stock availability) into the designated master server 
โ€ขdesigned a master server for 'sensitive' operations in order to workaround possible stock synchronization problems (because 'out of stock' condition could be triggered in matter of seconds for certain 'hot' items, each item had limited stock) 
Layer 4: Database Servers 
โ€ขused replication + R/W splitting component 
โ€ขmanaged to avoid MySQL clustering (risky) 
โ€ขoptimized sql tables usage, temporary eliminate less important ones 
โ€ขeach webserver paired with a SQL server
3. The Work :: Technical Keypoints 
Hardware/Network: 
โ€ข used 21 separate servers (not counting multiple virtual machines on each server) 
โ€ข hybrid cloud approach (evoMAG owned original servers + Distinct dedicated servers + cloud servers available to scale the frontend caching) 
โ€ข Software Stack: Linux (OS), Openvz (virtualization), Nginx (webserver), Mysql (database), PHP (programming language), memcached (sessions), Varnish (caching/reverse proxy) 
โ€ข extensive use of SSDs for databases 
โ€ข avoided use of a distributed file system (simpler stack, application permitted that), used periodic sync to clones + automatic request rerouting in case of errors (via load balancers) 
โ€ข did load testing scenarios (we could have used more) 
www.distinct.ro
www.distinct.ro 
3. The Work :: Technical Keypoints 
1. Redundancy: 
โ€ข DNS (automatic) 
โ€ข Reverse Proxy/Load Balancers (automatic but first layer semiautomatic) 
โ€ข Webservers (automatic) 
โ€ข SQL Servers (automatic, except master SQL server; plan: manually promote replica if failure happens) 
โ€ข reduce to minimum the SPFs (Single Points of Failure) 2. Scalability: 
โ€ข on every layer we could add more resources (horizontally) 
โ€ข except master SQL server (which handled a limited set of requests by design) 
3. Security: 
โ€ข prevent possible security infiltrations masked be the high traffic 4. Monitoring: 
โ€ข extensive monitoring, 94 key sensors (including error rate checks and automated simulated order of products) 
โ€ข sms/phone/messenger alerting
T0-4 days 
T0-7h T0 - 00:20, Black Friday (22 Nov 2013) 
3. The Work :: Black Friday Timeline 
โ€ข started adding servers (traffic build-up, as expected) 
โ€ข everybody on duty (Distinct, programmers, evoMAG) and in constant communication 
โ€ข launched teaser homepage + newsletter signups 
โ€ข so many newsletter signups we thought something is wrong ( > 100 000) 
โ€ข tried to hold any last minute modifications of the system (not so successfully) 
Traffic is coming ! โ€œOMGโ€ moments 
โ€ข last minute glitch in the customized homepage (heavy ajax), masked by using a manual LB rule in a matter dozens of seconds 
โ€ข exceeded 10 000 users on site about 20 minutes after T0 (source: Google Analytics, 'Right Now' visitors on site) 
โ€ข about 20 000 HTTP hits per second peak (within estimates) 
โ€ข servers load ~ 25% (good) with some spikes 
www.distinct.ro
3. The Work :: Black Friday 
www.distinct.ro
www.distinct.ro 
4. Aftermath :: Numbers 
โ€ข T0 + 9h: 65% percent of inventory sold 
โ€ข T0 + 9h: 145.317 visits 
โ€ข T0 + 9h: ~ 9000 orders 
โ€ข T0 + 12h: 1.1 Million EUR sales 
415 000 total visits 
1.6 Million EUR sales 
(~ 10% of year's revenue) 
number visitors growth compared to the previous Blackfriday: +66% 
newsletter total subscribers: +35.5% up (as many as gathered in the previous 4.5 years) 
(data source: evoMAG) 
T0 + 26 minutes: orders 'golden minuteโ€˜: 
โ€ข 365 orders / minute 
โ€ข10 000 unique visitors on site according to Google Analytics 
Blackfriday totals:
4. Aftermath :: Feedback 
โ€ข positive feedback from the customer, Mihai Patrascu, CEO, evoMAG: โ€œI am sending to everybody in the team a sincere THANK YOU !โ€, 
โ€ข positive feedback from Internet users (blog comments/forum posts), random sample: 
Translation: โ€œEvomag was decent until now, haven't crashed at all. We'll see eMAG by morningโ€ 
Source: http://www.buhnici.ro/2013/11/22/lista-evomag-black-friday-2013/ 
www.distinct.ro
4. Aftermath :: Feedback 
โ€ขPositive mass media feedback, example PRO TV / โ€œI like ITโ€ (special edition about Blackfriday), starting from 4m:40s: 
http://stirileprotv.ro/stiri/ilikeit/secretele-vanzarilor-black-friday-vor-fi-dezvaluite-live-greii-emag-evomag-sambata-la-ilikeit.html 
www.distinct.ro
Q & A 
www.distinct.ro
www.distinct.ro 
Thanks ! 
This presentation (slides + video) available on www.bogdanbelu.com 
Thanks also to our partners 
Bogdan Belu, CEO Distinct 
Email: bogdan.belu@distinctgroup.net

More Related Content

Similar to Bogdan Belu @IMWORLD 2014. Case study: How Distinct helped evoMAG.ro handle Blackfriday 2013 traffic spike

Business Track: How Criteo Scaled and Supported Massive Growth with MongoDB
Business Track: How Criteo Scaled and Supported Massive Growth with MongoDBBusiness Track: How Criteo Scaled and Supported Massive Growth with MongoDB
Business Track: How Criteo Scaled and Supported Massive Growth with MongoDB
MongoDB
ย 
Mobile web performance dwx13
Mobile web performance dwx13Mobile web performance dwx13
Mobile web performance dwx13
Avenga Germany GmbH
ย 
Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...
Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...
Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...
DataStax Academy
ย 

Similar to Bogdan Belu @IMWORLD 2014. Case study: How Distinct helped evoMAG.ro handle Blackfriday 2013 traffic spike (20)

Suning OpenStack Cloud and Heat
Suning OpenStack Cloud and HeatSuning OpenStack Cloud and Heat
Suning OpenStack Cloud and Heat
ย 
Web Analytics Primer
Web Analytics PrimerWeb Analytics Primer
Web Analytics Primer
ย 
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web ApplicationsUsing Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web Applications
ย 
Business Track: How Criteo Scaled and Supported Massive Growth with MongoDB
Business Track: How Criteo Scaled and Supported Massive Growth with MongoDBBusiness Track: How Criteo Scaled and Supported Massive Growth with MongoDB
Business Track: How Criteo Scaled and Supported Massive Growth with MongoDB
ย 
Tools. Techniques. Trouble?
Tools. Techniques. Trouble?Tools. Techniques. Trouble?
Tools. Techniques. Trouble?
ย 
How Criteo Scaled and Supported Massive Growth with MongoDB (2013)
How Criteo Scaled and Supported  Massive Growth with MongoDB (2013)How Criteo Scaled and Supported  Massive Growth with MongoDB (2013)
How Criteo Scaled and Supported Massive Growth with MongoDB (2013)
ย 
Dubbo and Weidian's practice on micro-service architecture
Dubbo and Weidian's practice on micro-service architectureDubbo and Weidian's practice on micro-service architecture
Dubbo and Weidian's practice on micro-service architecture
ย 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.
ย 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
ย 
4D Pubs - Distributed Dynamic Document Dsplay
4D Pubs - Distributed Dynamic Document Dsplay4D Pubs - Distributed Dynamic Document Dsplay
4D Pubs - Distributed Dynamic Document Dsplay
ย 
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
ย 
Otimizando servidores web
Otimizando servidores webOtimizando servidores web
Otimizando servidores web
ย 
Experience with Kafka & Storm
Experience with Kafka & StormExperience with Kafka & Storm
Experience with Kafka & Storm
ย 
Developing of a high load java script framework
Developing of a high load java script frameworkDeveloping of a high load java script framework
Developing of a high load java script framework
ย 
Mobile web performance dwx13
Mobile web performance dwx13Mobile web performance dwx13
Mobile web performance dwx13
ย 
Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...
Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...
Cassandra Summit 2014: Turkcell Curio, Real-Time Targeted Mobile Marketing Pl...
ย 
Website & Internet + Performance testing
Website & Internet + Performance testingWebsite & Internet + Performance testing
Website & Internet + Performance testing
ย 
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
ย 
Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0
ย 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
ย 

Recently uploaded

( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
ย 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
ย 
๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
nirzagarg
ย 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
SUHANI PANDEY
ย 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
ย 
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
nirzagarg
ย 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
SUHANI PANDEY
ย 
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
nirzagarg
ย 

Recently uploaded (20)

APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
ย 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
ย 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
ย 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
ย 
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
ย 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
ย 
๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Salem Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
ย 
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
ย 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
ย 
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort ServiceBusty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
ย 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
ย 
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
ย 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
ย 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
ย 
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
ย 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
ย 
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
ย 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
ย 
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
ย 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
ย 

Bogdan Belu @IMWORLD 2014. Case study: How Distinct helped evoMAG.ro handle Blackfriday 2013 traffic spike

  • 1. CASE STUDY www.distinct.ro How Distinct helped evoMAG.ro handle Blackfriday 2013 traffic spike Traffic is coming ! โ€œOMGโ€ moments
  • 2. Summary: 1. Who 2. The Challenge 3. The Work 4. Aftermath www.distinct.ro
  • 3. www.distinct.ro 1. Who :: Bogdan Belu - Distinct Bogdan Belu - www.bogdanbelu.com ๏‚ง19+ years of technical and business experience (network administration, programming, datacenter services) ๏‚งsince 2001, CEO of Distinct (www.distinct.ro), managed services and datacenter provider under "plus through responsibility" motto ๏‚งhelps clients handle their mission critical Internet infrastructure Clients
  • 4. 1. Who :: evoMAG online retailer with IT-related products focus 2013 total revenue: 15.5 mil EUR BIG Blackfriday promotional sale on Nov, 22, 2013 (up to 99% price cuts) www.distinct.ro
  • 5. 2. The Challenge โ€œkeep the www.evomag.ro site 100% up during the Blackfriday 2013 eventโ€ www.distinct.ro
  • 6. www.distinct.ro 2. The Challenge :: Context ๏ฑ a warehouse full of products waiting to be sold ๏ฑ uptime problems in the previous years ๏ฑ same web application (more or less) as the previous years ๏ฑ better marketing campaign from evoMAG team compared to the past ๏ฑ marketing and inventory disaster if something goes wrong
  • 8. 2. The Challenge Distinct's role in this project: โ€ข datacenter services (servers, networking) โ€ข managed services (system administrators) Gladly accepted the challenge since is consistent with our mission: โ€œDistinct provides infrastructure and maintenance of Internet services and applications. Distinct's offer include datacenter hosting, managed services and SaaS. The success of our clients depends on the proper functioning of computer applications such as content services, e-commerce, internet banking or email.โ€ www.distinct.ro
  • 9. 3. The Work :: Analysis โ€ข new client for Distinct โ€ข started work about 40 days before the event (late start) โ€ข got historic metrics from the previous Blackfridays โ€ข got the traffic estimates from evoMAG's marketing departament (number of visitors, number of orders, estimated user path in site, etc) โ€ข analyzed the site thoroughly (technical point of view) โ€ข efficient budget because of the low margins (more of a marketing event) www.distinct.ro
  • 10. www.distinct.ro 3. The Work :: Targets โ€ข translated marketing estimates into technical metrics (HTTP hits per site feature, bandwidth, etc) โ€ข better to overestimate than sorry โ€ข further translated technical metrics into an infrastructure proposal (network, servers, software stack) Example for the Homepage: โ€ข estimated the number of visitors per day: 600 000 โ€ข estimate the peak number of unique visitors per hour: 200 000 โ€ข total size of homepage: 1 MB โ€ข total needed bandwidth for homepage for one user: 8 Mbps โ€ข HTTP hits per homepage for one user: 100 (first visit, no browser caching) โ€ข average unique visitors per second (peak): 55.56 โ€ข estimated hits pers second: 5555.56 โ€ข estimated bandwith needed: 444 Mbps โ€ข after that, overestimated about 2.5x in order to handle instant peaks/stay safe Orders: prepared for 50 orders/s (peak)
  • 11. 3. The Work :: Roles โ€ข Distinct (datacenter and managed services): systems and network โ€ข Customsoft (the web application developer): special Blackfriday web pages, code optimizations, application insights โ€ข evoMAG (the client): marketing data, constant feedback and rapid approvals www.distinct.ro
  • 12. 3. The Work :: Technical Keypoints โ€ข URL analysis (load impact, predicted usage, usefulness) and classification, separate static (eg: product description, content page) and dynamic content (eg: shopping cart) into 'content classes' โ€ข explicit URLs in order to ease classification โ€ข took the responsibility for URLs (hardcoded caching and routing rules in load balancer), more than 1000 lines of configurations โ€ข suggested to temporary eliminate unnecessary stuff for Blackfriday or make it client side, if possible (popups, cookies, background processes - crons not critical) โ€ข request small but with big load impact software modifications whenever possible (due to short time frame) โ€ข tried not to modify the existing setup core too much (to avoid the 'joys' of refactoring in such a short time), built around it โ€ข move most of the dynamic bits on AJAX www.distinct.ro
  • 13. www.distinct.ro 3. The Work :: Technical Keypoints TOPOLOGY: Layer 1: Caching/Load Balancing โ€ข those are the the systems client browsers connect to โ€ข 16 IPs in DNS for www.evomag.ro at peak (load balancing via DNS) โ€ข roles: caching, hits spikes load bearing โ€ข scalable (easily add more on demand) โ€ข HTTP caching, lots of (> 90% hit rate) โ€ข automated health checks of the next layer Layer 2: Caching/LoadBalancing/Routing โ€ข 2 servers (active/active configuration) โ€ข cache aggregation โ€ข permitted quick/realtime request routing changes (automatic or manual) โ€ข automatic health checks for the next layer (webservers) and exclude the 'bad' servers from production for a while (ex: 30s) โ€ข even if the webserver behind is unavailable deliver cached content (when appropriate, we frozen static pages modifications for the day)
  • 14. www.distinct.ro 3. The Work :: Technical Keypoints Topology (continued): Layer 3: Webservers โ€ขcloned the existing webserver into multiple copies โ€ขroute the important requests (eg: orders, stock availability) into the designated master server โ€ขdesigned a master server for 'sensitive' operations in order to workaround possible stock synchronization problems (because 'out of stock' condition could be triggered in matter of seconds for certain 'hot' items, each item had limited stock) Layer 4: Database Servers โ€ขused replication + R/W splitting component โ€ขmanaged to avoid MySQL clustering (risky) โ€ขoptimized sql tables usage, temporary eliminate less important ones โ€ขeach webserver paired with a SQL server
  • 15. 3. The Work :: Technical Keypoints Hardware/Network: โ€ข used 21 separate servers (not counting multiple virtual machines on each server) โ€ข hybrid cloud approach (evoMAG owned original servers + Distinct dedicated servers + cloud servers available to scale the frontend caching) โ€ข Software Stack: Linux (OS), Openvz (virtualization), Nginx (webserver), Mysql (database), PHP (programming language), memcached (sessions), Varnish (caching/reverse proxy) โ€ข extensive use of SSDs for databases โ€ข avoided use of a distributed file system (simpler stack, application permitted that), used periodic sync to clones + automatic request rerouting in case of errors (via load balancers) โ€ข did load testing scenarios (we could have used more) www.distinct.ro
  • 16. www.distinct.ro 3. The Work :: Technical Keypoints 1. Redundancy: โ€ข DNS (automatic) โ€ข Reverse Proxy/Load Balancers (automatic but first layer semiautomatic) โ€ข Webservers (automatic) โ€ข SQL Servers (automatic, except master SQL server; plan: manually promote replica if failure happens) โ€ข reduce to minimum the SPFs (Single Points of Failure) 2. Scalability: โ€ข on every layer we could add more resources (horizontally) โ€ข except master SQL server (which handled a limited set of requests by design) 3. Security: โ€ข prevent possible security infiltrations masked be the high traffic 4. Monitoring: โ€ข extensive monitoring, 94 key sensors (including error rate checks and automated simulated order of products) โ€ข sms/phone/messenger alerting
  • 17. T0-4 days T0-7h T0 - 00:20, Black Friday (22 Nov 2013) 3. The Work :: Black Friday Timeline โ€ข started adding servers (traffic build-up, as expected) โ€ข everybody on duty (Distinct, programmers, evoMAG) and in constant communication โ€ข launched teaser homepage + newsletter signups โ€ข so many newsletter signups we thought something is wrong ( > 100 000) โ€ข tried to hold any last minute modifications of the system (not so successfully) Traffic is coming ! โ€œOMGโ€ moments โ€ข last minute glitch in the customized homepage (heavy ajax), masked by using a manual LB rule in a matter dozens of seconds โ€ข exceeded 10 000 users on site about 20 minutes after T0 (source: Google Analytics, 'Right Now' visitors on site) โ€ข about 20 000 HTTP hits per second peak (within estimates) โ€ข servers load ~ 25% (good) with some spikes www.distinct.ro
  • 18. 3. The Work :: Black Friday www.distinct.ro
  • 19. www.distinct.ro 4. Aftermath :: Numbers โ€ข T0 + 9h: 65% percent of inventory sold โ€ข T0 + 9h: 145.317 visits โ€ข T0 + 9h: ~ 9000 orders โ€ข T0 + 12h: 1.1 Million EUR sales 415 000 total visits 1.6 Million EUR sales (~ 10% of year's revenue) number visitors growth compared to the previous Blackfriday: +66% newsletter total subscribers: +35.5% up (as many as gathered in the previous 4.5 years) (data source: evoMAG) T0 + 26 minutes: orders 'golden minuteโ€˜: โ€ข 365 orders / minute โ€ข10 000 unique visitors on site according to Google Analytics Blackfriday totals:
  • 20. 4. Aftermath :: Feedback โ€ข positive feedback from the customer, Mihai Patrascu, CEO, evoMAG: โ€œI am sending to everybody in the team a sincere THANK YOU !โ€, โ€ข positive feedback from Internet users (blog comments/forum posts), random sample: Translation: โ€œEvomag was decent until now, haven't crashed at all. We'll see eMAG by morningโ€ Source: http://www.buhnici.ro/2013/11/22/lista-evomag-black-friday-2013/ www.distinct.ro
  • 21. 4. Aftermath :: Feedback โ€ขPositive mass media feedback, example PRO TV / โ€œI like ITโ€ (special edition about Blackfriday), starting from 4m:40s: http://stirileprotv.ro/stiri/ilikeit/secretele-vanzarilor-black-friday-vor-fi-dezvaluite-live-greii-emag-evomag-sambata-la-ilikeit.html www.distinct.ro
  • 22. Q & A www.distinct.ro
  • 23. www.distinct.ro Thanks ! This presentation (slides + video) available on www.bogdanbelu.com Thanks also to our partners Bogdan Belu, CEO Distinct Email: bogdan.belu@distinctgroup.net