Cloud Analytics

Klaviyo Scales Global Event Infrastructure for Black Friday Peak Performance Using Amazon MSK Express

The rapid evolution of modern e-commerce has placed unprecedented demands on the data infrastructure supporting customer engagement. Klaviyo, a prominent B2C customer relationship management (CRM) platform, recently successfully navigated the high-stakes environment of Black Friday and Cyber Monday (BFCM) 2025 by overhauling its core event-streaming architecture. Managing a staggering volume of roughly 3 billion events per day, the company transitioned its legacy RabbitMQ-based system to Amazon Managed Streaming for Apache Kafka (Amazon MSK) Express brokers. This strategic shift enabled Klaviyo to handle more than 22.7 billion messages during the critical holiday period—a 25 percent increase in volume compared to the previous year—while maintaining seamless operational stability.

The Engineering Imperative: Moving Beyond RabbitMQ

For years, Klaviyo relied on RabbitMQ to facilitate its event-driven ecosystem. As the platform grew, the limitations of this infrastructure became increasingly apparent. The platform manages a diverse array of customer interactions, ranging from routine email opens and website visits to time-sensitive purchase completions and cart abandonments. These events are the lifeblood of Klaviyo’s automated marketing flows.

As event volume climbed, the engineering team encountered significant friction in scaling the legacy infrastructure to accommodate the extreme volatility inherent in holiday shopping seasons. The primary challenge was twofold: the system needed to sustain a baseline of 170,000 events per second while possessing the agility to absorb a seven-fold spike in traffic during peak retail moments. Recognizing that the previous architecture could no longer support the next phase of the company’s growth, leadership initiated a project to re-engineer the event gateway as a foundation for massive, elastic scale.

Architecture and Strategic Re-engineering

The solution centered on a migration to Apache Kafka, specifically utilizing Amazon MSK Express brokers to serve as the high-throughput front door for all incoming customer data. This transition was not merely a "lift and shift" operation; it required a fundamental rethink of how data priorities are handled within a distributed system.

Klaviyo implemented a sophisticated gRPC-based publisher proxy that categorizes traffic into priority tiers—labeled p10, p20, and p30. By segregating events, the system ensures that high-priority actions, such as transactional purchase confirmations, are processed with absolute precedence. Conversely, lower-priority batch analytics updates are handled with flexibility, allowing the system to degrade gracefully under extreme load without impacting the customer experience for revenue-critical tasks.

Crucially, the team consolidated these three priority levels into a single, unified set of processors. This consolidation was a significant win for operational efficiency, resulting in a 30 percent reduction in costs due to improved resource utilization. The architecture further incorporates robust failure-capture mechanisms, including secondary retry topics, dead-letter queues, and automatic S3 failure capture. In a three-month evaluation window, this resilience allowed the system to recover approximately 20,000 events automatically without any human intervention from the total pool of 300 billion processed events.

How Klaviyo processes 3 billion daily events at scale with Amazon MSK Express | Amazon Web Services

Chronology of the 2025 BFCM Scale-Out

The success of the migration was stress-tested during the 2025 holiday shopping window. Klaviyo’s scaling timeline demonstrated the elasticity provided by the new MSK Express infrastructure:

  • Steady-State (Pre-October 2025): The infrastructure operated on 12 brokers, handling the standard daily load of 3 billion events.
  • Capacity Increase (Early October 2025): Recognizing the approaching seasonal surge, the team expanded the fleet to 18 brokers to provide a safety margin.
  • Peak Load (Late October – November 2025): During the critical BFCM window, the cluster was scaled to 60 brokers to accommodate the surge in retail traffic.
  • Post-Holiday Optimization (December 2025): Following the conclusion of Cyber Monday, the cluster was systematically scaled back down to an optimized steady-state fleet of 18 brokers, reflecting the efficiencies of the pay-as-you-go model.

Technical Advantages of MSK Express

The decision to utilize Amazon MSK Express brokers was driven by three specific technical capabilities that addressed Klaviyo’s operational constraints:

  1. Storage Agility: Express brokers eliminate the need for manual storage provisioning. Because the service operates on a consumption-based model, charging per gigabyte stored and ingested, Klaviyo avoided the capital expenditure of over-provisioning storage capacity. All data is automatically replicated across three Availability Zones, ensuring high availability without the overhead of manual data management.
  2. Intelligent Rebalancing: In traditional Kafka deployments, adding new brokers requires a complex, manual process of redistributing partition data, which often results in performance degradation. Amazon MSK Express automates this process. AWS reports that these brokers rebalance partitions up to 180 times faster than standard brokers, allowing Klaviyo to expand its capacity during the busy season without manual rebalancing tasks.
  3. Resilience and Recovery: According to AWS internal benchmarks, Express brokers recover from node failures 90 percent faster than standard counterparts. This allows for a more stable system state, as replacement nodes join the cluster with minimal disruption, preventing the cascading performance issues often seen during rebalancing events.

Broader Industry Implications

Klaviyo’s migration highlights a growing trend among high-growth SaaS companies: the shift from self-managed or legacy messaging queues toward fully managed, elastic streaming backbones. By offloading the operational burden of infrastructure management to a cloud provider, Klaviyo’s engineering team was able to focus on high-value feature development rather than "keeping the lights on."

The implications of this transition extend beyond just the event pipeline. Klaviyo has already begun extending the use of Amazon MSK Express to its change data capture (CDC) infrastructure. Furthermore, the company is actively evaluating the migration of its remaining self-managed Kafka clusters—currently hosted on Amazon EC2 for data lake workloads—to the MSK managed service.

Conclusion and Future Outlook

The migration represents a significant milestone in Klaviyo’s operational maturity. By successfully scaling its event gateway five-fold during the peak of global e-commerce activity, the company has validated the effectiveness of its architecture design. The combination of priority-based routing, automated failure recovery, and the elastic nature of MSK Express provides a scalable blueprint for other enterprises managing massive, real-time data streams.

As e-commerce platforms continue to demand higher levels of personalization and real-time response, the underlying data pipelines must evolve. For organizations facing similar challenges, Klaviyo’s experience offers a clear takeaway: moving to managed, cloud-native streaming infrastructure is not merely a cost-saving measure, but a strategic move that provides the agility required to remain competitive in a volatile digital marketplace. For Klaviyo, the decision to modernize has paid significant dividends, allowing the firm to handle record-breaking traffic volumes while maintaining the operational lean-ness that defines its engineering culture.

Related Articles

Back to top button
Whatvis
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.