About the Organization:
Established in 1994 and headquartered in Mississauga, Ontario, Walmart Canada is a subsidiary of Walmart and one of Canada’s largest retailers. With over 400 stores and a thriving online presence, Walmart Canada employs approximately 90,000 associates and serves 2.4 million customers daily.
Walmart is not just a huge player in Canada’s brick-and-mortar retail sector — it has also become one of Canada’s largest online commerce providers. With over 900,000 visitors per day, its Walmart.ca site empowers shoppers to choose from millions of items sold by Walmart and by third-party sellers.Walmart Canada wanted to significantly improve the online store experience for users by delivering an immersive, responsive web presence across smartphones, tablets, and laptops. The company also wanted to optimize the cost of its backend infrastructure while gaining flexibility and scalability.
To achieve Walmart Canada’s goals, Simon Rodrigue, Walmart Canada’s VP of eCommerce, knew that the company would need to overcome four key technical challenges.First, it needed a more flexible and iterative development environment. The company’s existing back-end architecture required specialist development teams and long development cycles, which hindered the pace of delivery.”Second, it needed to reduce its dependency on specific infrastructure. The existing platform required expensive hardware to increase capacity and could not use commodity servers to provide burst capacity to meet peak loads.Third, it needed to improve scalability and performance. Walmart’s legacy Java infrastructure could only handle a limited number of simultaneous requests per application server. The company needed a modern event-driven architecture designed to handle many more concurrent processes and end users without requiring additional compute capacity.Finally, it needed a solution that would be easy to integrate into its existing infrastructure with minimal downtime. Any enhancements would need to interoperate with legacy components and enable a safe transition to the target state.
Walmart’s tech leadership opted for a 360-degree upgrade of the eCommerce experience and backend with the help of Knoldus. As big supporters of open-source software projects, we considered various programming languages before deciding on a Scala stack.Because Scala runs Java code natively, Walmart would be able to gently transition away from its legacy stack and towards a modern environment. And by harnessing Lightbend’s Akka Platform reactive programming paradigm, Walmart can leverage modern multi-core architecture capabilities to handle massive numbers of concurrent users without requiring cumbersome multi-threaded Java programming.By separating Scala-powered tasks from those that needed to run on the legacy platform, Knoldus moved Walmart's significant percentage of back-end tasks to commodity virtual machines running on Walmart’s internal private cloud.
“We recognized that we needed to switch to a reactive development environment and decouple critical components to allow for faster development and better scalability. With help from Knoldus, we dramatically improved our performance on mobile devices and saved money by moving to commodity hardware that allowed us to scale on demand instead of building for peak loads.”
- Simon Rodrigue
By rebuilding its entire web application and mobile stack with Scala and Akka Platform, Walmart Canada has achieved dramatic improvements. With its newly optimized backend architecture, the company saw a 20% boost in conversions on web traffic and a 98% increase in mobile orders in the four weeks after launch and enjoyed its most responsive Black Friday ever.The rebuilt backend handled roughly 400,000 page views per hour at peak load times and millions of simultaneous requests from its web frontend. This contributed to a 36% reduction in page load times for Walmart’s visitors.The move to Scala and Akka Platform enables a faster and cheaper development process, as Rodrigue testifies: “The Knoldus development teams were able to function in a far more agile fashion. Startup time for a developer working on the Akka codebase was roughly seven times less than for Walmart Canada’s legacy code environment. Moreover, the Knoldus solution has enabled Walmart to reduce development time by a factor of two to three times.The new architecture has also enabled a shift to commodity cloud-powered compute. Because Scala and Akka Platform were designed from day one to run in multi-tenant environments on small and ephemeral virtual machines, Walmart Canada was able to move roughly 40% of total compute cycles off expensive dedicated hardware and onto commodity x86 servers in Walmart’s internal private cloud—saving Walmart 20% to 50% in web-related infrastructure costs over time.Finally, because Scala runs natively on all Java application servers and integrates seamlessly with Walmart’s legacy Java stack, our team was able to gracefully integrate the new architectural components with the company’s existing systems.Rodrigue concludes: “We saw immediate improvements as the Scala stack came online that translated into faster response times and higher conversion rate. The bottom line is that switching to Scala was good for our bottom line.”