A good website should provide a seamless user experience from the home page through to the "Your order has been successfully placed" notification. The seamless experience is critical as only 1 in 40 visitors makes a purchase.
Even being at the checkout stage doesn't guarantee a successful sale, as only 1 in 3 customers at the checkout stage makes a purchase. This makes the checkout the most critical step, meaning sellers need to optimize the experience accordingly.
The shopping cart is one of the most important parts of a user e-commerce session. The resiliency and latency of these sessions are the two aspects we'll focus on in this blog post.
But First, What is a Session?
A session is a period of time when a user interacts with an app. While the user is interacting with an app, this interaction data is stored both on the client side and on the server side to provide a connected user experience. On the client side, we call them cookies, on the server side we call them sessions. For a seamless experience, these two separate groups of data must be in sync.
Sessions are critical to providing a personalized, consistent, and seamless experience that helps to move the customer down the sales funnel.
If the server loses session data, it cannot serve a stable experience to the client. Therefore it’s important to efficiently save and resurrect the session data for unhandled exceptions and server failures, along with zone and region outages.
In a service-driven economy, stability scores and latency metrics are two of the top metrics to monitor in this situation.
High Availability, Business Continuity, and Disaster Recovery are (and should be) critical terms for every serious e-commerce website.
99% uptime sounds pretty good. But what about 99.9%?
Let's detach ourselves from the illusion of numbers and delve into reality.
In a year, 99% uptime means 87 hours, and 40 minutes of downtime while 99.9% uptime means 8 hours, and 46 minutes of downtime. 99.999% uptime translates to only 5 minutes and 16 seconds of downtime in a year.
For Amazon, revenue loss for one hour is roughly $13m, for Walmart, it is $2.5m, for Lowes $350k–the list goes on. Practically, for every second the website is not 100% functional, it's losing money. The picture is even more dramatic during the holiday season.
Every dollar spent on enhancing session stability is worth it–not only for the seamless customer experience but also for the bottom line.
If a single microservice becomes a bottleneck in the funnel, that service alone will define the whole experience. The shopping cart, for example, is where the transaction happens. That's the stage that deals with the operational and transactional data. Any additional millisecond of latency there will translate into revenue loss and degrade the user experience. Since we're in an era where "it's the fast that eats the slow'', latency means losing against to your competitors.
Distributed applications require a distributed architecture so that they can serve their users wherever and whenever. Like CDNs, application servers, and database servers, session cache servers cannot be considered differently. They need to be distributed and located close to application servers.
Why use Azure Cache for Redis Enterprise for your session store?
Redis is an in-memory data store delivering multiple data models with best-in-class performance. It provides low latency and high throughput to ensure responsive applications and websites. Azure Cache for Redis Enterprise provides performance that can increase the user experience and ensure retail applications and e-commerce sites are always fast and responsive.
Azure Cache for Redis Enterprise provides persistence to endure server failures and is the only active-active geo-distributed Redis database based on Conflict-Free Replicated Data Types (CRDT) technology, which provides high availability and business continuity not only among zones but also across regions. Redis Enterprise can seamlessly manage conflicts from individual application servers allowing customers to have a continual and seamless multi-channel shopping experience.
Azure Cache for Redis Enterprise Active Geo-Replication provides 99.999% availability.
Azure Cache for Redis Enterprise provides a way to ensure a 99.999% SLA. Enabling Active Geo-Replication and Zone Redundancy will make sure that you get the continuity that your business requires. By providing automated failure detection, failover, and cluster recovery, Redis Enterprise helps ensure that retailers can continue operating even after experiencing bursts of traffic during seasonal peaks or unexpected surges in demand.
By storing your sessions on Azure Cache for Redis Enterprise, your sessions can be more stable and simultaneously achieve lower latency.
The above architecture depicts the architecture used for a retail/e-commerce site on Microsoft Azure. We used Azure Front Door as our global load balancer to distribute traffic between two regions.
Magento is an open-source e-commerce platform. It can be deployed to Azure Kubernetes Service (AKS) or VMs. Azure Marketplace has Magento images through various providers.
Each of the Virtual Machines that hold Magento is connected to the cache layer created in the same region. The cache layer is implemented with Azure Cache for Redis Enterprise and is using Active Geo-Replication. In other words, each time the user starts a session in a region the session will be automatically synchronized and stored in the caches in both regions, allowing the user to move around the world and not lose the session and the items in the shopping cart. It doesn’t matter if you move from one region to another or if there’s a disaster that causes one region to go down, the user will always have a consistent user experience. This ensures business continuity, something that every retail business must have.
Regardless of a monolithic or microservice architecture, the majority of e-commerce software, application frameworks, and API gateways do have a session caching layer and have integration to work with Redis. Whether it’s a commerce suite like HCL, WooCommerce, BigCommerce, Magento or application framework like Rails, Flask, or Django, or an API gateway like MuleSoft, Kong, or Apigee, they all integrate and work out-of-the-box with Redis to store the user sessions.
Retail is more competitive than ever. A responsive, seamless, and personalized experience across all channels is the norm now. This has produced a lot of changes in retail/eCommerce customer behaviors. Shopping carts are a good example. E-commerce customers have started using shopping carts to bookmark their intended purchases. They start shopping on one channel and complete the purchase on another one. These are just a couple of reasons why shopping carts need to be rock solid and responsive.
For low latency, high availability, and effective multi-channel and omnichannel experience, retail applications, and e-commerce websites should consider Redis Enterprise. Redis Enterprise, with its active-active geo-replication feature, provides 99,999% (5-9s) availability which means only 5 minutes of downtime in a year.
All major e-commerce software or development frameworks already have integration with Redis. If you are serious about your retail/e-commerce business, you need to factor in the resiliency and latency elements at every layer of your architecture. Application layer, data layer, and cache layer.
In summary, Azure Cache for Redis Enterprise is a core piece of technology to provide real-time and highly connected retail customer experience. Microsoft Azure provides the rest of what retailers need to build and run their core business 24x7, 365 days a year including peak times like Black Friday and Cyber Monday with state-of-the-art logging and monitoring services, agile deployments through Dev Ops services, and always available customer support.
To learn more about Redis solutions in retail or try out Redis Enterprise technologies, here are a few links to get you started: