Skip to Main Content

Generative AI: Using artificial intelligence to make human impact.Learn how

Shopper chooses groceries from an app.

Insight

Scaling Grocery E-Commerce to Meet Increasing Consumer Demand

Creating a plan to scale capabilities for both short-term and long-term transformation is the first step towards an e-commerce enabled future.

Grocers are experiencing an e-commerce wake-up call.

As many grocers saw during the height of the COVID-19 pandemic, sudden influxes in e-commerce traffic risks overwhelming backend processes, causing prolonged wait times for delivery slots and website or app crashes in times when customers need service most.

To serve as many customers as possible without disruption, grocers are looking for innovative ways to safeguard against the unexpected while continuing to provide seamless experiences for customers.

Effectively scaling e-commerce capabilities will rely on a combination of non-invasive and disruptive tactics to mitigate short-term, medium-term and long-term impact. Though overall strategies will differ, the fundamental questions grocers must answer are:

  • Platform scalability: Will the existing e-commerce platform support increases in traffic as more customers shift to online ordering? When considering dark stores, which are not open to the public, what kind of scalability is achievable?
  •  Supply chain and operations viability: With uncertainty surrounding the duration of the pandemic, will grocers be able to keep supply chain, DC and store operations moving un-interrupted?
  • New/updated offerings: How can grocers modify or introduce new offerings to maximize customer value, while keeping e-commerce systems running?

Cross-disciplinary squads must be created to identify and implement scalability levers, with appropriate representation from both product and engineering teams to identify opportunities and achieve these goals. These initiatives should be divided into two categories, with respective teams assigned to each project.

Given the risk resulting from surges in online site traffic, effectively scaling e-commerce capabilities will rely on a combination of non-invasive and disruptive tactics to mitigate short-term, medium-term and long-term impact.

Engineering/SRE-Led Initiatives

E-commerce scalability depends on where a grocer is in their cloud and microservices journey and the sophistication of their initial system. Both these concepts provide significant advantages when it comes to on-demand and horizontal platform scalability.

We have found that any platform-level change will fall somewhere along a continuum based on development, architectural complexity and operational overhead.

Changes closer to the origin will result in quick wins, characterized by low disruption and quick time-to-market. Other changes will take more time and will have greater architectural and operational complexities. While quick wins will potentially be the first to hit production, long-term invasive changes must be done in parallel to short-term planning.

Finding the best opportunities for the business comes down to considering a few key scenarios. While these are not necessarily linear steps, each optimization enables new avenues for prioritization and planning.

 People carrying boxes

International Grocery Enterprise Transformation

1. Identify the narrowest pipe in the platform

The narrowest pipe in the platform is often the first place that needs to be looked at for scalability. In a transactional system, for example, potential typically lies in the database (DB). Though stateless layers can horizontally scale relatively easily regardless of cloud or traditional DC setup, these layers are often at risk to face bottlenecks in processes first, posing both a need and an ability to scale.

To mitigate bottlenecks, grocers should review their current system based on the following criteria:

  •  Is the platform using a current version of the DB stack? Major version upgrades typically incorporate enhancements to concurrency and locking efficiencies.
  •  Is there a possibility to direct the read-only traffic to separate instances? This will reduce load on instances serving transactional traffic. For example, if you are using MySQL, ProxySQL provides this functionality.
  • Does the DB provide a partitioning solution, so it can be scaled horizontally? Though a strategy, partitioning might come with operational overhead, and partitions need to be completely decoupled to reduce potential misstep.
  • What can we do in the code to reduce the DB load? Possible strategies include caching, locking mechanisms and batching transactions.

2.  Optimize applications, services and microservices

Once grocers have unlocked the database, other layers, like applications, services and microservices must be considered. Services, whether implemented as microservices or not, are typically powered with auto-scaling technologies. But each new instance or batch of instances needs to be warm before they get traffic. Two aspects to be mindful of when thinking of services are:

  • Startup must be fast and optimized to remove additional or optional steps.
  • Cold starts need to be prevented. For server-based services, they must be primed with necessary cache.

3. Caching

Caching is a double-edged sword. If not done properly, it can lead to an operational nightmare and inconsistent system behavior. Some key aspects of proper caching are:

  • Avoid creating a mix of TTL-based and event-based layered caches.
  • All generic content must be cached on the CDN. Even if it is not hitting a bottleneck right now, it is always advised to minimize origin traffic.
  • Using client-side caching. For example, if you are using Redux, you can pretty much use Redux Cache with appropriate TTL based on frequency on content changes.

Building blocks to signify growth

Keeping Things Moving

To mitigate bottlenecks, grocers should review their database capabilities:

  • Is the platform using a current version of the DB stack? Major version upgrades typically incorporate enhancements to concurrency and locking efficiencies.

  • Is there a possibility to direct the read-only traffic to separate instances? This will reduce load on instances serving transactional traffic. For example, if you are using MySQL, ProxySQL provides this functionality.

  • Does the DB provide a partitioning solution, so it can be scaled horizontally? Though a strategy, partitioning might come with operational overhead, and partitions need to be completely decoupled in order to reduce potential misstep.

  • What can we do in the code to reduce the DB load? Possible strategies include caching, locking mechanisms and batching transactions

4. Review and scale downstream systems

Businesses scaling their e-commerce platform also need to scale their order management systems, warehouse management systems and store operations.

Product-Led initiatives

Alongside engineering-led optimizations, product optimizations allow grocers to keep customer experience in mind by creating more accessible services for shoppers.

  • Curation: Carrefour, for example, built a microsite for curated essential products containing weekly supplies for customers. Curated lists make checkout faster, while also making it easier for the customer to find what they need in quantities that do not risk putting pressure on inventory.
  • Managing wait times: Some companies have set controlled wait times for shoppers to mitigate lags in customer service. This way, customers have clear expectations on when they will be served. CDNs like Akamai provide this feature with minimal configuration.
Carrefour website

Carrefour

Decisions grocers make now will have a long-lasting impact when improving e-commerce for the increasingly digital consumer. Understanding where to optimize and creating a plan to scale capabilities for both short-term and long-term transformation is the first step towards an e-commerce enabled future.

Ravi Shankar
Ravi Shankar
VP of Engineering

Related Reading