AWS Startups Blog
Caching the Uncacheable: How Speed Kit Accelerates E-Commerce Websites
Industry knowledge states that three mega trends have changed how e-commerce works today. First, e-commerce exhibits two-digit growth rates, as more and more users shop online. Second, attention spans are declining, due to information overload and the number of screens that surround us. Third, usability expectations are at a maximum, since fast market leaders like Amazon set the benchmark extremely high. As a consequence of these trends, users leave when page loads take too long. This simple fact has complex implications for today’s online shopping, because building fast websites is not as simple as it used to be.
While traditional web caching plays a critical role in content delivery across all industries, the high degree of personalization in modern e-commerce has seemingly outgrown its capabilities. As the HTTP caching model has been designed for distributing static and generic assets under fixed caching times, standard caching does not account for content that changes unexpectedly or is unique for every user. Immutable and generic resources like images or stylesheets are thus usually accelerated with globally distributed content delivery networks (CDNs). Since modern e-commerce relies on product recommendations and other means of personalization, though, the performance-critical website itself (i.e. the HTML) is typically considered uncacheable and therefore extremely difficult to deliver fast.
To fill this gap in the current state of the art, German software startup Baqend has developed Speed Kit as an SaaS solution for accelerating e-commerce websites. Speed Kit is designed for websites of all sizes and trusted by customers ranging from medium-scale online vendors like Stylefile to billion-revenue retailers such as the OTTO daughter Baur or sports retailer Decathlon.
To make adoption as easy as possible, Speed Kit is integrated as a single-line JavaScript code snippet that runs in the browser. Through smart processing within the user device, Speed Kit can thus leverage a unique caching scheme that is impossible to apply for traditional CDNs. In more detail, Speed Kit loads the personalized website for the logged-in user like the browser normally would, but in addition also loads the page as an anonymous user from its caches. Since anonymous users are typically shown a generic version of the page, the anonymous HTML is easily cacheable and can therefore be delivered faster. As a result, the anonymous version of the page (from Speed Kit’s caches) is displayed almost instantly and the personalized elements (from the origin server) are merged as soon as they arrive. To make this work, Speed Kit is built on top of Service Workers, a brand-new browser technology for manipulating browser requests at the network level.
Since it is running as a Service Worker process within the browser, Speed Kit can intercept HTTP requests against slow origins and redirect them to Speed Kit’s fast caching infrastructure instead. For example, third-party resources like the Google Analytics script do not have to be served from Google’s domain over a cold TCP connection, but can be delivered from Speed Kit’s own CDN or even the browser cache. This kind of optimization is impossible for CDNs, because they do not optimize the last mile between the edge server and the user device.
Since measuring the uplift is just as important as achieving it, real-user monitoring (RUM) for statistically sound A/B-testing is already built into Speed Kit. To capture both performance- and business-related KPIs, data from every page load is tracked and sent to a scalable analytics pipeline hosted on AWS. The tracking data is ingested through a Docker-based EC2 cluster, stored in S3, continuously imported into an SQL warehouse based on AWS Athena, and ultimately fed into QuickSight dashboards for visualization. Since the entire analytics stack is built on top of AWS services, it combines automated reporting and complex analyses with low end-to-end latency at massive scale.
Speed Kit promises a new era of web performance and AWS provides the perfect infrastructure to make sure it delivers.