A Sale Gone Right.
Last week, there was a 24-hour sale going on for a client of Scandiweb’s. During the sale 5,000 orders were placed.
This is how order distribution looks through the day:
There are 3 spikes:
- at midnight, when the sale begins
- in the morning, when people arrive at work (and what do they do there? right, shop)
- and, most notable, in the evening from 20:00 till midnight, with up to 17 orders per minute
While shopping, the customers generated a load of up to 40 requests per second.
Thanks to the properly written code most of the requests were cached and only 1 out of 5 requests reached Magento (blue vs green line).
The better you write the code, the cheaper it is to run it and the more pleasant the experience for customers!
Before the sale, the client provisioned more resources and scaled infrastructure from the regular 2 front-end servers to 15. Normally, autoscaling does that automatically, but if the rapid increase in traffic is planned (marketing emails, sales), it is safer to provision manually. By the way, the client managed it completely on their own using this simple 4-step guide, created by us.
Step 1 — finding your footing:
Step 2 — creating a scheduled action for scaling up:
Step 3 — scheduling an end action to scale back down:
Step 4 — Double-check if everything’s in order:
And that’s it! It’s that simple and the client did not have to involve any developers.
After the sale, the infrastructure was scaled back down to 2 front-end servers.
This sale will add only 30$ to the monthly bill.
AWS Cloud is expensive comparing to bare metal (where you will need to pay all the time for over-provisioned resources), but it allows us to build decoupled infrastructure where we can scale application components individually (database, front-end, back-end, varnish, redis) and for some resources even automatically.
Check out more of our Magento development services here! Curious how Scandiweb’s solutions can help you take your business to the next level? Drop us a line at email@example.com and we’ll be happy to tell you!