Jan 11

6 Steps To Optimize Black Friday Website Performance

Preparing a website for Black Friday is challenging because there are a lot of unpredictable variables. Your website will likely see at least a 50% increase in traffic, and you don’t know how it will handle that additional traffic on various devices and across different regions.

If your website does slow down or crash, you'll miss out on the additional revenue. Since Black Friday can account for a disproportionate amount of overall revenue this can be catastrophic. Further, it will also frustrate your loyal customers as they won't be able to purchase the products they want.

In this post, we’ll explain how to prepare your website for Black Friday so that users never experience performance interruptions and so you can maximize revenue on Black Friday.

How To Prepare Your Website For Black Friday

Here are the most impactful actions you can take to improve Black Friday website performance.

Implement Edge Caching 

Caching is one of the most basic things you can do to improve Black Friday website performance. It reduces server load by saving a copy of the requested data in a cache, which prevents the server from constantly being asked for the same data. 

Edge caching takes caching to the next level as it leverages a network of servers across the globe so that you can send the data from the server that is physically closest to the end user. 

As a result, the end user receives the data faster because it doesn't have to travel as far to reach them. 

Reducing load times for users increases conversions for ecommerce stores, and given the high volume of transactions that occur on Black Friday, even a small conversion lift on Black Friday can significantly increase your total revenue for November. 

Edge caching also creates redundancy so that even if one or many servers go down, there are always other copies available. 

The only problem is that caching GraphQL requests isn't nearly as simple as caching static data with a REST API. This is because GraphQL requests can contain many resources in a single request, each potentially with its own caching strategy.

Caching GraphQL requests require you to first determine the types of entities requested and which ones are in that response. Based on that, you'd need to decide how long you can cache an entity.

While you can build your own caching infrastructure, this is a very costly endeavor. It requires a lot of the engineering team's resources and pulls them from improving your business's core value.

Even after building a proprietary caching solution, it will still require a lot of resources to scale and maintain. In addition, if the engineers who built the original caching solution leave the company, you may lose visibility into the system and waste more time and resources trying to figure out how to update and maintain it. 

To solve these problems, we built Stellate, the first GraphQL edge caching solution. It makes GraphQL edge caching easier and eliminates the need to build caching infrastructure. It also makes it super easy to maintain with automatic mutation based cache purging, an advanced purging API as well as great metrics and change management features.

It also offers fine grained cache control to easily optimize your caching strategy. For example, you can create custom rules to dictate specific GraphQL query results you want to cache and for how long based on types and fields.

It also offers advanced cache purging. You can choose to either auto invalidate based on mutations or manually invalidate cache entries from the API. Stellate also offers a detailed metrics dashboard that shows when data is being purged and the type of data being purged from the cache. 

Stellate also provides detailed observability metrics out of the box that make it easy to maximize your cache hit rate. You’ll also have detailed error tracking, alerting, and even user engagement metrics.

Leverage Rate Limiting 

Rate limiting improves Black Friday website performance in a few different ways.

If you're doing a product drop, you might have users constantly refreshing the page to see the latest discounts. Fulfilling all of these requests can slow down the website, so implement request-based rate limiting so that users can only refresh the page a certain number of times. This helps prevent the server from being overloaded.

Stellate makes it super easy to implement request-based rate limiting.

Rate Limiting Hero Image
Rate Limiting Hero Image

Another challenge that ecommerce stores often face on Black Friday is a single person (or bot) snatching all the deals and reselling the items at a higher price. 

Stellate can help you prevent this situation by allowing you to implement mutation specific request-based rate limiting. For example, you can limit the operation "add to cart" to be executed only once every five seconds so that resellers can't snatch up all the products at once and legitimate customers have a chance to purchase the product. 

Set Up Alerts And Track Errors

It's essential to set up alerts for each step of your sales funnel so that you immediately know when users are having difficulty purchasing products and can prioritize those issues.

For most ecommerce stores, this means setting up alerts for errors around:

  • The product pages

  • The add to cart functionality

  • The signup/sign-in page

  • The checkout page

You should also track timeouts, as these prevent people from purchasing the product and deliver a very frustrating user experience. As a result, you'll lose the sale and leave the user with a negative impression of your brand.

While you can build out your own error tracking system, this is again a time-consuming task that doesn't contribute to improving your company's core value.  

So we built Stellate to solve this problem. 

With Stellate, you can set up granular, automated alerts in just a few minutes.

First, define the specific features or user workflows you want to track (product pages, add-to-cart, etc.). 

Then, you can add filters, like the type of error you want to track and the threshold of the error rate percentage within a given timeframe. 

For example, you can set up an alert to notify your team when the 4xx error rate increases more than 5% within 5 minutes on the product page.

This makes it easy to prioritize high-impact errors that could negatively affect sales.

Stellate also offers detailed information on each error, including the device it occurred on, the country, and other specifics so that you spend less time diagnosing the issue and can resolve it faster. 

On Black Friday, your team can’t afford to waste time guessing why errors are occurring, so access to this data is invaluable. 

Ensure You Have Backups And A Recovery Plan

Backups of your databases, codebases, and assets are essential best practices, though as you prepare for Black Friday, you may want to have more frequent backups. 

For example, instead of just scheduling backups once every few hours, you can schedule backups to occur once every few minutes. 

In the event that something happens, frequent backups can help you minimize lost data and retain as many orders as possible. 

It's also critical to have a recovery plan in place. 

The first step to a good recovery plan is actually testing it out. Unfortunately, a backup strategy that has never been used to recover data is not a backup plan. If you don't test it out, you may not know how to do the backup or realize that your backups are in the wrong format. This has happened to the best of companies and can be easily avoided by simply testing your backup strategy before you need it. 

When you test the recovery plan, ensure it is fast and reliable, and have some prepared scripts and instructions. This is important because you may be unable to reach some of your dev ops engineers on Black Friday, and your junior engineers might have to do it. So are the instructions clear enough that even they can perform the backups?

It's also a good idea to have some read replicas that keep portions of your site running and only disallow mutations (like ordering products). 

Stress Testing

Stress testing is also a good idea to ensure your system is ready to handle the traffic spike on Black Friday. 

This allows you to identify issues that could occur on Black Friday and solve them before the event. 

As you're stress testing, be sure you aren't just running the same requests repeatedly, as this can lead to heavily optimized execution and won't reflect a real-world scenario. For example, if you always request the same user and the same page, that data will become cached. Therefore,  it wouldn't surface potential issues that might occur in a more realistic scenario where thousands of unique users are changing data. 

Black Friday Website Performance Case Studies

Now that you've seen some of the best practices for improving Black Friday website performance, here are a few case studies of how ecommerce stores have actually improved their performance on Black Friday.

Italic – Case Study

Italic allows consumers to save up to 75% by connecting them directly to high-end manufacturers. The company was founded in 2018 and has experienced rapid growth. On Black Friday in 2020, the high demand for their products caused the website to slow and eventually crash every few hours as the backend wasn't prepared to handle the overwhelming traffic spike. 

This cost the company substantial revenue and resulted in a poor experience for their loyal customers.

To solve the problem, the team knew they would have to change their tech stack.

The original version of Italic's marketplace relied heavily on third parties like Shopify and Yotpo, though these weren't really designed for Italic's specific use case. 

So they decided to build their own product and collection management and product and customer reviews services from scratch so that website performance wasn't negatively impacted.

Today, Italic stack is based on Go, Node, and TypeScript, and the communication between client and server happens through a central GraphQL API. 

However, they weren't caching anything in the backend. After researching various caching solutions, they decided to implement Stellate's GraphQL edge cache and found that it was just what they needed to prepare for Black Friday.

Stellate automatically turns POST requests into cacheable requests and provides the features necessary to optimize your caching strategy, like automatic cache purging, detailed observability metrics, and alerting.

After implementing Stellate, they reduced server load by 61% and database load by 90%. They also reduced page load times by over a second, which significantly improved their user experience and boosted conversions.

Though most importantly, Stellate's edge caching prepared the website to handle the traffic spike that would undoubtedly occur on the next Black Friday.

Prepare Your Website For Black Friday Now

There are many variables you can't control on Black Friday, but you can prepare your website to handle high traffic spikes so that all of your users have a seamless experience.

So follow the tips above to prepare your website. If you're a GraphQL user, manually executing the tips above is resource intensive, costly, and doesn't contribute to improving your core business. Therefore, consider using Stellate, the first GraphQL CDN that allows you to automate caching and provides the tools necessary to easily improve your caching strategy. 

You can learn more by scheduling a demo or trying it out for yourself today.