Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zalando Engineering 5 min read Case study mediumAdept

Utilizing Amazon DynamoDB and AWS Lambda for Asynchronous Event Publication

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. DynamoDB Streams act as the outbox, emitting old and new item images to a Python AWS Lambda that builds a data-change event with a diff patch and publishes it to Nakadi. Failed publishes retry with exponential backoff, then land in an SQS dead letter queue that a Kubernetes CronJob drains by rerunning the same code. The tradeoff is that event ordering is no longer guaranteed.

Related posts

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

    Zalando Engineering mediumAdept

    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.

  • Inside Laravel Nightwatch’s Observability Pipeline: Real-Time Event Processing with Amazon MSK and ClickHouse Cloud

    ClickHouse easyNovice

    Laravel Nightwatch, Laravel's first-party observability platform, ingests telemetry through API Gateway and Lambda into Amazon MSK Express brokers, then streams it into ClickHouse Cloud via ClickPipes, with materialized views pre-aggregating raw JSON. Transactional data such as accounts and billing stays in RDS PostgreSQL, keeping it separate from analytical workloads. MSK sustained over 1 million events per second in load testing, and the launch handled 500 million events on day one with 97 ms average dashboard latency. Sub-second queries at billions of rows rely on time-series partitioning, ClickHouse codecs and compute separation, though the write-up stays high-level and reads partly as vendor marketing.

  • Service disruption on October 20, 2025

    incident.io mediumAdept

    The October 20, 2025 AWS us-east-1 outage degraded incident.io through third-party dependencies even though it runs on Google Cloud: its transcription, SAML, telecom and status page providers were all affected. Delayed SMS and phone notifications cascaded because notification queues shared worker capacity, and slow retries stretched jobs to 30s. Fixes were blocked by a hidden Docker Hub base-image dependency in the deploy pipeline. Scaling escalation workers made things worse because dead tuples in a Postgres index made queue acquisition consume about 50% of worker capacity, and a rate-limiter bug applied limits only to the top 10 organisations. Remediations include a self-contained GCP build pipeline, region failover for Scribe, aggressive autovacuum, reworked acquisition logic, and per-provider isolated notification workers.

  • Evolving the Backend Storage for Platform Metrics

    Heroku Engineering mediumAdept

    Heroku migrated the time-series store behind MetaaS, its internal metrics service, from self-managed Apache Cassandra to AWS DynamoDB without user-visible impact. MetaaS ingests a couple hundred thousand observations per second into Kafka and aggregates them with stream-processing jobs, writing tens of thousands of points per second to the database. The migration used parallel dual-writes from Kafka and GitHub Scientist-style shadow reads, ramped to 100% of traffic, to catch edge cases. TTL-based retention meant no data backfill was needed: they waited for old Cassandra data to expire, then incrementally cut reads over. p99 query latency dropped from a variable 20–80 ms to a steady 15 ms, and costs fell.

  • Ensuring reliable OpenTelemetry ingestion at scale

    ClickHouse mediumAdept

    ClickHouse's LogHouse OpenTelemetry pipeline, ingesting 50 million events per second, absorbs database backpressure by failing over to S3 rather than buffering in memory, local WALs or Kafka. Collector file_storage WALs forced StatefulSets, drained slowly (about 4 hours per TiB) and queued fresh data behind backlog in FIFO order. The final design uses the OTel failoverconnector to route to ClickHouse first and spill to S3 only under backpressure, which limits PUT costs to outage windows. A separate scale-to-zero collector replays spilled blobs via SQS event notifications. Key details include disabling the ClickHouse exporter's sending queue so errors reach the connector, keeping inline retries, enabling the queue on the S3 exporter, and spreading keys across a wide keyspace to avoid prefix throttling.

The quest for software engineering knowledge.

Look:
Layout: