Have you ever wondered where did Black Friday got its name from? It's the day when many businesses used to turn “black” after being “red”. Black refers to turning a profit, while red refers to incurring losses, hence the name.
The international phenomenon nowadays is becoming an increasingly big challenge for companies selling their products online. The incoming traffic can be truly overwhelming for the IT systems, especially since the vast majority of transactions are now digital. This is especially true with ever-increasing “Cyber Monday” offers.
This post was written in collaboration with Maciej Gos, Cloud Architect, Team Leader, and DevOps Competence Leader at ITMAGINATION, who takes us through the different cloud capabilities and architectures we can use to ensure the best scalability and stability of our IT systems on Black Friday & Cyber Monday.
When people respond to the promises of extraordinarily low prices, network and compute power consumption rise to big numbers. In e-commerce and banking & fintech, specifically payment processing providers, cloud can help a lot. There are a few ways in which one can keep their stores up and working without breaking the bank.
As a first step, we can utilize concepts of scaling compute services. As an example, we can use the Autoscaling feature from Azure App Services, where you can set Autoscaling to be active for certain dates only. During exceptionally busy periods of time, such as Black Friday, Cyber Monday, and the Winter Holidays (specifically Christmas), opt-in to this option, while opting out on other days.
The option allows you to not only scale up when needed, but to also automatically scale down when resources are not being actively utilized to save on possibly skyrocketing infrastructure costs.
You may enable it from your Dashboard. Simply go to “Monitor - Autoscale”, and then go to “Autoscale setting.” Scroll down to see the option we highlight.
You may use the settings to fulfill different scenarios. As Microsoft specified in the documentation, you may:
AWS, the cloud leader, also allows you to easily autoscale. Furthermore, the platform also allows you to scale your resources based on patterns seen in the past. The documentation specifies everything precisely, and is available natively for a set of services, such as EC2.
You may enable autoscaling by going to the AWS Console > AWS AutoScaling console or by clicking here.
The nature of event-driven architectures and serverless is to scale depending on real demand rather than forecasted demand. This means that we are provisioning in real-time or near-real-time vs. pre-provisioning resources and compute capacity based on our forecasts.
During Black Friday and Cyber Monday, demand is high and, even worse, unpredictable: it comes in waves, and previous years may not be great indicators of traffic this year. This means you can end up having to process millions of events per second for an hour once your discounts go live, then scale back down a hundred times once people finish their purchases.
To achieve that, we can change our architecture to utilize Azure Functions, AWS Lambda, or Cloud Functions to deal with this kind of dynamic demand. As a point of reference, we can utilize the architecture proposed by Microsoft in the section dedicated to building a scalable e-commerce web app.
If our organization utilizes Kubernetes (K8s) as the compute engine for our operations, the Burst architecture can save us when high-traffic spikes hit us.
Managing high traffic using K8s is similar everywhere. Kubernetes has its own Autoscaling built-in features, other cloud providers such as AWS (EKS) and GCP (GKE) also offer similar managed solutions as Kubernetes is notoriously difficult to set up and configure.
For example, AKS has both Horizontal Pod Autoscaling, and Cluster Autoscaling, where more nodes are added. These managed features are also available by other cloud providers.
Your cluster can be configured using the Autoscaling and Serverless functions that we mentioned previously as well. You don’t need to pre-provision resources there, and it can all automatically scale up and scale down depending on the current needs.
Make sure, however, that you include a safety margin and that you slightly over-provision to safeguard your application against crashing at any time. This will ensure that your users will always be able to use your services, and you don’t miss out on any transaction.
Black Friday does not have to be hard to handle from the IT side. The three options we have demonstrated above may ease your mind, and make you sleep comfortably at night.
After all, the first wave of traffic hits seconds after midnight. Even seconds of downtime mean the difference of clients going to your competitor for a purchase, instead of going to you.
If you need a hand leveraging the depth of cloud solutions, drop us a line and let’s talk about your project!
Looking for a new role in DevOps & Cloud? Make sure to talk to Maciej Gos, Cloud Architect, Team Leader, and DevOps Competence Leader, directly on LinkedIn!