Skip to main content

Manage Traffic for a Hype Sale

Learning Objectives

After completing this unit, you’ll be able to:

  • List the hype sale best practices.
  • Explain the risk of releasing product IDs ahead of a hype sale.
  • Explain how the Salesforce B2C Commerce Web Services framework helps with hype sales.
  • Describe top bot mitigation strategies.
  • Explain why setting a waiting room on the home page isn’t a good idea.

What’s a Hype Sale?

When Cloud Kicks marketing wants to generate ecommerce revenue fast, it schedules a hype sale (also known as a high volume or flash sale). A hype sale drives a large amount of traffic to a storefront for a limited number of products, such as a celebrity-endorsed sneaker. Like with a brick-and-mortar event of this type, traffic management is a key planning consideration.

Sneaker graphic

That’s where Linda Rosenberg, Cloud Kicks admin, steps in. She knows that while a hype sale can put a huge load on site resources, with the right preparation, her systems can handle it. In prep for a hype sale, she uses these important best practices.

  • Engage Salesforce early.
  • Disable or reschedule jobs.
  • Schedule replication and caching activities well before the sale.
  • Block unwanted traffic via the built-in eCDN.
  • Use the Web Services framework for third-party integrations.
  • Avoid making product IDs available before the sale.
  • Set up real-time rate limiting capabilities.
  • Plan for bot mitigation.
  • Consider a PDP lite version.
  • Manage when inventory reservation occurs.
  • Set up a raffle or reservation system.
  • Create a virtual waiting room.

Implement hype sale best practices.

Engage Salesforce Early

When Linda first learns of a hype sale, she immediately engages her Salesforce team. Well in advance of the event, she opens a case in the Support Portal. Ensuring that Salesforce knows about an upcoming spike in traffic and orders means a smoother experience for the shoppers. Salesforce can guide her through best practices and help with factors unique to her site.

Jobs

Linda disables or reschedules all noncritical jobs until after the sale to make sure that critical resources are available when shoppers visit the storefront at that time. This includes code and data replications, order export jobs, catalog and inventory imports, and index rebuilds.

Replication and Caching Activities

To ensure cache has adequate time to warm up before the sale begins, Linda does not clear or invalidate page cache close to sales start time. She schedules replication activities at least four hours prior, so they won’t interfere. See the Salesforce B2C Commerce Replication Trailhead module for best practices and troubleshooting tips.

Block Unwanted Traffic

She configures the built-in eCDN functionality with an increased threat level before the sale, and enables Under Attack mode while an attack is happening. Under Attack mode presents a CAPTCHA to every unique shopper before they're allowed to see the storefront.

The Web Services Framework

When planning for the spikes that come during a hype sale, it’s easy to overlook third-party integrations. Linda contacts all third-party providers ahead of the sale, to eliminate surprises. Because these integrations might not be designed for high scalability, she uses the Web Services framework to configure and monitor each of them.

When performance degrades for an integration, the Web Services framework performs a nondisruptive failover and rate limits. It wraps requests to these services within guardrails such as:

  • Rate limiter: Allows a maximum number of calls to a web service in a specified time period. Its timeout is similar to a circuit breaker.
  • Circuit breaker: Suspends calls to a web service if a certain number of calls fail within a specified time period.

A third-party service can have a significant impact on a site if it stops responding or responds slowly. With the Web Services framework, Linda can adjust response timeouts and lock settings for individual services, or disable a service altogether. 

Linda sets timeouts for third-party service requests based on what’s typical for each. Salesforce recommends 2 seconds or less for non-checkout services, and 5 to 10 seconds or less for checkout services.

Best practice: To prevent overloading database resources if a third-party integration stops working, avoid placing web services in business logic that opens a database transaction.

Bot Mitigation

Hype sales, which offer deeply discounted or strictly limited stock, attract malicious users who want to amass a large inventory of the discounted or unique products to resell later for a profit. The deeper the discount and the more limited the inventory, the higher the risk of bot traffic overwhelming the site. 

Linda monitors site behaviors as soon as the sale is announced, and watches for endpoints that bots might exploit or patterns they might use on the day of the sale. There are lots of things that Linda can do to keep malicious bots at bay. Here are some of them.

Keep Product IDs Secret

Linda waits until just before the sale to push new product IDs to production. Making product IDs available before the sale gives bot creators time to research and bypass normal page and checkout flows, giving them an unfair advantage. When malicious bots grab as many products as they can in the first few seconds of the sale, the site can stumble. This is because requests to add a product to a cart and checkout are resource intensive. During the sale’s first few minutes, bots can consume all the resources and push out the intended shoppers.

Use Real-Time Rate Limiting

Bots can make a large number of requests in a short period of time, faster than human shoppers. To protect against this, Linda configures rate limiting to limit the requests to the storefront and adjust the limits in real time. When properly configured, rate limiting impacts only the bot or script requests and not real shoppers. Many CDNs rate limit incoming requests based on a number of configuration parameters. Linda also configures the Web Application Firewall (WAF) to perform real-time analysis of incoming requests based on a predefined set of rules.

Implement PDP Lite

Prior to the sale, Linda rolls out a lightweight version of the PDP with no Add to Cart button, for example. She pushes the change to production 24 hours before the sale to allow enough time for caching. This approach supports the caching of key page elements prior to the products being available for purchase, to help improve page performance during the sale.

Offer a Raffle or Reservation System

Earlier that year, Linda implemented a raffle or reservation system to generate hype around a promotion, but with reduced traffic to specific hype sale products. Only certain shoppers, such as raffle winners or those with reservations, were granted access.

Use a Virtual Waiting Room

To help ensure her backend systems aren’t overwhelmed by hype sale demands, Linda creates a virtual waiting room that limits the number of shoppers allowed to purchase products at a given time. When the waiting room reaches the maximum number of shoppers for a designated page, new shoppers receive a waiting page that doesn’t access backend systems.

Malicious shoppers know to avoid the homepage, an obvious waiting room placement. So Linda implements the waiting room on any page a shopper might visit on their way to a hype sale product. She might add a waiting room right in front of the storefront.

Third-party products, such as the Visitor Prioritization Cloudlet from Akamai, let Linda configure the number of shoppers allowed in a waiting room at a given time. For example, she can specify that only 1% of shoppers are allowed into the waiting room. If there are 100,000 shoppers on the site, only 1,000 are allowed into the waiting room.

Inventory Reservation

A best practice for hype sales is to avoid reserving inventory when a shopper adds a hype sale product to the cart. Reserving products when they are merely in the cart tends to result in a higher number of abandoned carts and aborted checkouts, compared with reserving inventory at order submission. Moving the inventory calculation to the end of the checkout process helps ensure high order throughput and low contention. 

Sites that have business requirements for in-cart reservations can try this.

  • Make the reservation time as short as possible.
  • Use a different checkout flow for hype sale products. Carts with a mix of hype sale and regular products add overhead, because all items in the cart are reserved.

Let’s Wrap It Up

This module is all about getting your B2C Commerce systems ready for resource-intensive sales events, both big (the holiday season) and small (a hype sale). Now take this final quiz and earn a new badge.

Resources

¡Siga aprendiendo gratis!
Regístrese para obtener una cuenta y continuar.
¿Qué hay para usted?
  • Consiga recomendaciones personalizadas para sus objetivos profesionales
  • Practique sus habilidades con retos prácticos y pruebas
  • Siga y comparta su progreso con empleadores
  • Póngase en contacto para recibir asesoramiento y oportunidades laborales