victor-xok-gFjGZ2qRZOo-unsplash-scaled-1200x800

Handling 270M+ Black Friday/Cyber Monday Queries Without Breaking a Sweat

Share on facebook
Share on google
Share on twitter
Share on linkedin

This year, Black Friday and Cyber Monday were both massive successes for Constructor. 

We wanted to share some of our results with you in this article, as well as give you a bit of insight into how our architecture is structured in a way to handle these large events with ease. 

Here’s how it went: 

Taking a step back, 2020 was an awesome year for Constructor as a whole. We partnered with many great brands this year, and to say that we noticed an increase in traffic/queries on Black Friday/Cyber Monday this year compared to last would be an understatement. 

In 2019, our Black Friday query numbers were 30M, and for Cyber Monday, we saw 32M queries. 

Here are the results for 2020: 

143 Million Queries on Black Friday & 128 Million Queries on Cyber Monday

In total, we saw a 530% increase in Black Friday queries compared to 2019, and a 300% increase compared to 2019’s Cyber Monday: 

Note: 2020 was special in that our partners received more traffic on Black Friday than Cyber Monday — even after 8 months, we’re still seeing the effects of COVID-19 on online retailing.

Lastly, we’re happy to report that, just like every other Black Friday and Cyber Monday we’ve been a part of, we experienced no downtime or performance degradation across any of our customer sites and servers despite these vast increases in traffic and queries.  

So, what sort of preparation went into ensuring the holidays were a success for Constructor? 

Our partners and other retailers were certainly slammed in the weeks leading up to the holidays, and you’d think we’d be too, right? 

In reality, a large majority of our prep work came not in the weeks prior to Black Friday in Cyber Monday — it happened every day, spread throughout the entirety of 2020. 

Load tests are conducted with every new release, not just in preparation for large events. 

At any given moment, we have thousands of unit and integration tests running to ensure our newest releases run without issue. Once the unit tests are complete, each of our releases are put into staging to test not only how the releases perform on our regular production traffic, but also how they’d perform in circumstances similar to this year’s Black Friday and Cyber Monday. 

We know what one instance can do, and we know what load we can handle by multiplying that up. We do this on a smaller scale to ensure we don’t have bottle necks so that when we do scale, we know we won’t run into any issues. 

In short, we believe each part of our platform and the pieces under it need to be prepared for Black Friday-level traffic. 

The ability to handle any level of traffic doesn’t only sit on the practice of unit, integration, and load testing, however. Our architecture is also built for this purpose. 

One of the most important aspects of our architecture is actually something it lacks: a single point of failure. 

Each of our servers run on their own index, and can continue running even when disconnected from every other part of the infrastructure. This means that even in the worst case scenarios (like losing big chunks of entire regions), each one can still serve results individually. 

Moreover, we built our architecture from scratch with a special focus on autoscaling. 

Our front-line servers that serve requests essentially act as databases. We don’t have bottlenecks in scalability — in a couple of minutes, we can scale to several hundred servers across any of our services. When there’s more traffic, we just add more instances — and adding and removing instances is completely automated all year round. 

That works fine, but for days like Black Friday and Cyber Monday when we know traffic will be higher, we also overprovision ahead of time based on the traffic multiple we’re expecting. Autoscaling would work fine too, but for days as important as Black Friday, it’s good to be extra careful.

So, we start seriously overprovisioned. Our number one goal is to ensure our partners have the smoothest service possible. 

To summarize, we built the architecture to ensure we can utilize as many servers as we need to handle our estimated traffic, scaling horizontally without a single point of failure, and we watch closely for bottlenecks. Everything else is handled by autoscaling. 

What’s next? 

Our Black Friday and Cyber Monday this year were fantastic all around, and we want to ensure 2021 is even better. 

The main areas we’re focused on ahead of that are making the system even more robust to black swan events. Our testing processes with each deploy will continue to improve. We’ll place even more focus on ensuring our architecture can scale to meet any demand. We’ll grow and continue to hire engineers specifically focused on improving and optimizing our infrastructure and all-around performance. For anyone interested, you can apply here.

It’s a cycle of learning and improving and learning again, and it never stops. We’re excited to see what 2021 brings!