FASTr

 

How does Walmart fulfill the promise of delivering goods in record time?

 

Speed and accuracy are the keys to fulfilling customer expectations.

Online shopping is such a hit because of the ease and comfort it showers on customers. However, it is a fast-paced world where customer expectations are forever evolving. Brands have to be on their toes to optimize processes and offer the best service to customers.

 

So, how does Walmart Labs India accomplishes this feat?

When a customer looks for a product on the Sam’s Club website, they see an optimal delivery option alongside the product. The delivery option is the earliest possible delivery date along with the lowest possible delivery rate. Besides the optimal delivery option, there’s also a list of alternatives that the customer can avail.

 

While this is the norm on all eCommerce sites, what really is the scale-tipper is the accuracy with which the estimated delivery date is calculated. Promising a short delivery time, and meeting it successfully is the key to retain customers’ trust. To achieve this objective, we designed FASTr.

 

Room for optimization - the need for FASTr

Prior to implementing FASTr, the average time to deliver an order to the customer was 6 days. The existing algorithms only calculated the aerial distance from the customer’s address to the nearest fulfillment center to source an estimation. Parameters like carrier capacity, carrier transit time and carrier rates were not considered. Thus, the sourcing decision was sub-optimal; the result was neither cost-effective nor accurate.

The criticality of the situation heightens when the customer is a merchant and the order size is enormous as in Sam’s Club. The need for an agile and quick-responding system that can compute estimated delivery time by considering a variety of parameters is paramount in B2B businesses. Responding to the need, we created FASTr.

 

Without further ado, let’s discuss parameters that FASTr considers for estimating accurate delivery options.

 

FASTr -- Meeting customer expectations

It is a solution that calculates multiple factors (listed below) to provide an accurate, cost-effective, and fast delivery option while honoring a response time of less than 100 milliseconds. It aims to improve on-time delivery and optimize the capacity of fulfillment centers (FCs), all with the bigger goal of providing the best customer experience.

 

Parameters FASTr considers

Carrier rate cards: Different carrier agencies have different delivery options. For instance, a carrier agency might deliver via road, air or a combination of both. Delivery charges and delivery time for each of these options vary from agency to agency.

A complex permutation and combination of these factors have to be taken into consideration to ensure that the customer receives their order at the earliest and at the cheapest possible rate. 

 

Calculating the capacity: Both the factors - the number of orders a fulfillment center (FC) can process in a day and the loading capacity of each trailer that comes to the fulfillment center are considered while estimating the delivery date.

Taking these parameters into consideration is crucial because if we take more orders than we can fulfill in a day, they get pushed to the day after. The backlog at the FC creates a bad customer experience.

 

Counting the clock: Each stage in the process takes a stipulated time and it needs to be calculated to estimate the optimal delivery date. Factors such as time to process an order, working hours of the FCs, and their holidays are considered to arrive at an optimal delivery option.

 

Preparing for the unforeseen: Natural disasters like cyclones and tornadoes don’t always announce their visit, but there can be delays due to them. FASTr accommodates these potential delays while promising a delivery date to the customer.

 

Need to scale - helping hand from other technologies

No technology can perform at its best in a silo. Moreover, FASTr is a high-priority application that cannot have a single millisecond of downtime. There are powerful technologies that underpin FASTr.

 

Cassandra: FASTr needs a distributed storage system, with optimum performance, that can be easily called to action. Casandra is the answer; it’s an architecture that scales horizontally. It meets all the requirements in terms of data intensity, query performance, and fault tolerance.

Sam’s Club receives around 1800 orders/ minute which implies that there’re 38,000 views of product pages and cart pages every minute. To support these requests, we send 100k requests per second to Casandra DB. 

 

Kafka: FASTr is a hotbed of updates for all subsystems like carrier capacity, FC capacity, item attribute, etc. Hence a lot of data flows into the Cassandra datastore from these multiple channels. This requires high throughput and low latency data streaming to ensure data is up to date for accurate sourcing. FASTr uses Kafka queues for its data feeds to ensure accuracy.

 

Testing the field - going live

We conduct quality checks for every new application and system before taking it live. FASTr was no exception.

We conducted a functional parity test between the old and the new systems with a comparator that we designed for this purpose. This system simulated live production traffic on to the new platform and captured the results from both the systems. The result was as expected - FASTr performed better.  It helped us validate millions of live transactions before even taking FASTr live. 

 

We faced an issue with the Cassandra database as it was not scaling at the peak hour during a sale simulation test. This was a major risk for Sam’s upcoming sales event. The team lived up to the challenge; they rolled out query optimizations in the app and tweaked Cassandra clusters -- (table compression, JVM parameter) to improve the Cassandra query latency. This proved beneficial and we were able to easily scale Cassandra to take over 100k requests/sec.

 

Optimization never stops - the way ahead

Our aim to optimize on-time delivery is not going to stop with designing FASTr. We’re already working on designing a digital twin for FASTr. This will simulate live and past production traffic with a data set of different permutations and combinations to forecast the outcome. This will enable us to change levers like capacity in a few FCs, etc. These changes are first to run in a simulated environment to gauge the outcome; it will help us in arriving at an optimal value for the levers.

 

We are also working on further optimizing the FASTr algorithms. For instance, FCs can process only a limited number of items to be shipped in a day. The capacity also depends on the size of the items. As such, the handling time for a bunch of coke tin cans would be lesser than that of a sofa set. We intend to add this as a parameter for FASTr. Besides on-time delivery, it will also optimize FC capacity. We will continue to work on such enhancements in the future to meet the promise of delivering exceptional customer experiences.

#f2f2f2