Back to blog

Follow and Subscribe

Don’t let your successes bring you(r site) down

Anna MacLachlan

Content Marketing Manager, Fastly

You put a lot of time and resources into creating successful assets to advertise your brand — whether that’s a Super Bowl ad or your company being featured in a major news publication. Often, the main goal for these successes is to point visitors to your website, and it’s important you’re prepared — 79% of web shoppers who have to wait too long for sites to load say they won’t return.

In many ways, a successful ad (which results in an influx of requests to your site) can mirror a distributed denial-of-service (DDoS) attack. A sudden spike in requests — whether well-intentioned or malicious — can overwhelm your origin, bringing your site down and creating poor experiences for your customers (and counteracting the purpose of your ad).

In this post, I’ll share how Dollar Shave Club launched a successful ad, relying on Fastly to provide web performance and content delivery solutions to see that success all the way through, as well as best practices for making sure your major successes don’t bring you down.

Dollar Shave Club: building an experience

Dollar Shave Club is a men’s grooming company with over three million members who receive monthly shipments of shaving and grooming products. Their mission, according to CEO Michael Dubin, is to help their members “look good, smell good, and ultimately feel good about themselves.” For DSC, “it’s all about the customer” — they need to ensure they understand what customers want, when they want it, and how to get that to them as quickly as possible. It’s a strategy that’s clearly been working: Unilever acquired Dollar Shave Club for $1 billion in July 2016.

DSC strives to create an overall experience for their customers, which includes receiving top-of-the-line shaving essentials each month as well as creating seamless experiences online — whether customers are updating subscription preferences through the mobile app or browsing the latest grooming products on dollarshaveclub.com. Their engineering team works hard to provide great experiences for customers online, part of which is ensuring their site is fast and capable of supporting an influx of visitors. DSC worked with Fastly to redesign part of their website, including their homepage, to deliver “a seamless, secure experience” for members.

In an effort to further increase brand awareness, Dollar Shave Club featured an ad during the 2016 Super Bowl. “The whole country is tuning in,” said Michael Dubin of the Super Bowl. There are over a hundred million people watching during “media’s biggest moment,” and with millions of dollars in media commitment DSC had to ensure it went well. “It has to go right, and that doesn’t just mean getting the spot built, shipped, and aired on time,” said Dubin. “It means making sure that you’re ready for all the traffic that may come to the site.”

What’s your caching strategy?

As you might know, a content delivery network (CDN) can help your site survive high-traffic events. When preparing for a major event, it’s obviously helpful to have a CDN in place, but you should also consider your overall caching strategy. What kind of content makes up your website? How much traffic is going to be absorbed by your CDN? At Fastly, we’ve organized content into three types — static, event-driven, and dynamic. Here’s a quick refresher:

  • Static content doesn’t change very often (and even if it does, it’s predictable). Images, CSS, and Javascript fall into this category.

  • Event-driven content changes frequently and unpredictably, and includes things like wiki pages, sports scores, and stock prices.

  • Dynamic content is truly uncacheable — these objects are unique every time, and usually consist of heavily personalized content such as user logins and credit card information.

Determining what kind of content makes up your site will help you figure out your caching strategy — the more you can cache, the more you can protect your origin from an influx in traffic and prepare for major successes, saving you money while ensuring seamless online experiences. After moving to Fastly, customers often see a dramatic drop in operations expenditures due to the significant decrease in traffic hitting their origin servers.

Dollar Shave Club worked with Fastly to make as much of their site cacheable as possible, preparing to support millions of visitors, just to be safe. When they launched in 2012 their original video went viral, causing the site to crash, (“All your hopes and dreams turn into your worst nightmare,” said Dubin) and they wanted to avoid the same thing this year. “We were literally planning for millions of people to visit the site, and it worked. The Super Bowl creative performed really well. We had tons of traffic and it all held up thanks to Fastly.”

In fact, DSC received 190x more requests than usual after their ad aired, and the site held up perfectly. “That was crucial for us to have a partner we could rely on to help us meet any kind of demand that came through that day,” said Dubin.

Scaling to infinity

Having a caching strategy in place is also key to scaling effectively — both as your business grows and to prepare for an influx in traffic. In Dollar Shave Club’s case, they needed to accommodate Super Bowl visitors as well as a growing customer base; they worked with Fastly to make sure their website was scalable and ready to handle Super Bowl success: “We spent months preparing for this 30-second ad to ensure we were prepared to handle any kind of demand.” As Dubin noted, it paid off: “The critical response to the creative was incredible. The site held up and scaled exactly how we hoped it would, and now we have framework for dealing with high-traffic moments.”

DSC worked with Fastly to “reimagine” their homepage, rebuilding their site with a CDN in mind. By identifying all of the content they planned on caching — and caching as much of their site as possible — they were able to scale both for major events and future growth. We also recommend having a good understanding of cache headers, which will give you fine-grained control of what’s cached, allowing you to efficiently update and remove content based on type.

Caching as much of their site as possible also gives DSC a good cache hit ratio — the more content they cache, the fewer requests go to origin, lowering overall infrastructure costs and helping them “scale to infinity” as necessary. When deciding on a CDN solution, go for one that can both scale quickly as needed — rising to meet the sudden demand of traffic spikes — as well as grow with you as your business flourishes.

Uneventful events

The more content that gets caught by the CDN, the less you’ll feel the impact of traffic spikes, and the more “uneventful” your event will be. In an ideal scenario, you (and your users) won’t even know that something amazing happened. If you’ve prepared well enough, the only impact you’ll notice is on your sales (and not on your infrastructure). As Dubin pointed out, “I think the coolest part for the consumer — and even for me as the CEO — is that Fastly works in the background. The fact that everything was as normal and uneventful as possible meant that Fastly’s product worked exactly how it was supposed to.” By ensuring site uptime during a successful ad, Fastly helped DSC offer seamless online experiences for users, making the Super Bowl a (successful) non-event.

Check out the full story of Dollar Shave Club’s success below, and visit our customers page to hear more.