---
title: "From Event-Driven Chaos to a Blazingly Fast Serving API"
description: "Zalando replaced an event-driven pipeline that merged Product, Price and Stock events with a central Product Read API (PRAPI)."
url: "https://swe.quest/articles/from-event-driven-chaos-to-a-blazingly-fast-serving-api-515d5b06058dbe2a"
canonical: "https://engineering.zalando.com/posts/2025/03/event-driven-to-api.html"
source: "Zalando Engineering"
published: "2025-03-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["caching","load-balancing","event-driven","performance","ecommerce"]
---

# From Event-Driven Chaos to a Blazingly Fast Serving API

A post on [Zalando Engineering](https://swe.quest/sources/zalando.md), published 2025-03-06, 8 min read, Case study. Original: [https://engineering.zalando.com/posts/2025/03/event-driven-to-api.html](https://engineering.zalando.com/posts/2025/03/event-driven-to-api.html)

## Summary

Zalando replaced an event-driven pipeline that merged Product, Price and Stock events with a central Product Read API (PRAPI). During Cyber Week that pipeline delayed price and stock updates by up to 30 minutes, because over 90% of each payload was unchanged. PRAPI is a Caffeine async-loading cache over DynamoDB, run on Kubernetes with Netty/Epoll non-blocking I/O, and serves millions of requests per second at sub-10ms P99. Consistent hash load balancing in Skipper partitions the catalogue so small per-pod caches hold hot products. Fixed ring positions and a bounded-load cap of 2× the average keep caches warm during scaling and stop hyped products from overloading a pod. Tail latency came down by caching payloads as byte arrays to avoid GC pauses, using LIFO queuing, and splitting DynamoDB clients into a 10ms primary and a 100ms fallback. Adoption across ~350 teams worked because PRAPI served the legacy formats via the Accept header, and the org was restructured along CQRS lines.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- event-driven architecture ([easy posts on Event-driven architecture](https://swe.quest/tags/event-driven.md?difficulty=easy))
- caching basics ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- consistent hashing
- JVM garbage collection ([easy posts on Java & JVM](https://swe.quest/tags/jvm.md?difficulty=easy))

## Keywords

Zalando, Product Read API, DynamoDB, Caffeine, Skipper, Netty, Consistent Hash Load Balancing, Java Flight Recorder

## Related posts

- [Client-Side Load Balancing at a Million Requests Per Second](https://swe.quest/articles/client-side-load-balancing-at-a-million-requests-per-second-9bf178158e4acd04.md): Zalando Engineering · 2026-06-22 · Hard · 28 min read · Load balancing, Kubernetes, Caching, Scaling, Java & JVM
  Zalando moved the high fan-out internal traffic of its Product Read API (over a million requests per second at peak) off the shared Skipper ingress and onto an in-process client-side load balancer.
- [Utilizing Amazon DynamoDB and AWS Lambda for Asynchronous Event Publication](https://swe.quest/articles/utilizing-amazon-dynamodb-and-aws-lambda-for-asynchronous-event-publication-b54b04cd8273be4a.md): Zalando Engineering · 2022-02-02 · Medium · 5 min read · Event-driven architecture, Cloud platforms, Serverless, Resilience, Microservices
  Zalando Payments decoupled event publication from synchronous DynamoDB writes in its Order Store service using the Transactional Outbox pattern, removing the message bus from the request path and raising the availability ceiling from 99.8% to DynamoDB's own.
- [Enhancing Distributed System Load Shedding with TCP Congestion Control Algorithm](https://swe.quest/articles/enhancing-distributed-system-load-shedding-with-tcp-congestion-control-algorithm-c180104e3f071048.md): Zalando Engineering · 2024-04-22 · Medium · 9 min read · Resilience, Event-driven architecture, Queues & messaging, Microservices
  Zalando's customer communication platform applies TCP-style AIMD (Additive Increase Multiplicative Decrease) congestion control at its ingestion point to shed load and prioritize critical messages.
- [Rapidly scaling online storage to serve over 1 billion ChatGPT users](https://swe.quest/articles/rapidly-scaling-online-storage-to-serve-over-1-billion-chatgpt-users-05665dfd2bff721d.md): OpenAI · 2026-09-11 · Medium · 14 min read · Scaling, Python, Concurrency, Performance engineering, Resilience
  Habitat, OpenAI's online storage platform, grew from a client-side Python library over Azure Cosmos DB into a centralized Python service handling 70M+ requests per second and 500+ PB across about 40 regions.
- [Making Shopify’s Flagship App 20% Faster in 6 Weeks Using a Novel Caching Solution](https://swe.quest/articles/making-shopify-s-flagship-app-20-faster-in-6-weeks-using-a-novel-caching-100f1c4cb3fa31e6.md): Shopify Engineering · 2021-09-22 · Medium · 8 min read · Caching, Ruby, Scaling, Deployment, Performance engineering
  Shop's home feed, which aggregated orders and carrier tracking data and accounted for 30% of database load, was moved behind a custom write-through cache in Memcached, cutting database load by 15%, overall GraphQL latency by about 20% and CPU usage by a double-digit percentage.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
