---
title: "Capturing Every Change From Shopify’s Sharded Monolith"
description: "Shopify is replacing Longboat, its query-based change-data capture tool that polls MySQL replicas on an updated_at column, with a log-based CDC platform built on Debezium, Kafka Connect and Kafka that reads the binlog from 100+ MySQL shards."
url: "https://swe.quest/articles/capturing-every-change-from-shopify-s-sharded-monolith-fd5db9b13b97ba9a"
canonical: "https://shopify.engineering/capturing-every-change-shopify-sharded-monolith"
source: "Shopify Engineering"
published: "2021-03-12"
difficulty: "medium"
kind: "Case study"
reading_minutes: 23
tags: ["event-driven","data-pipelines","mysql","messaging","analytics"]
---

# Capturing Every Change From Shopify’s Sharded Monolith

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2021-03-12, 23 min read, Case study. Original: [https://shopify.engineering/capturing-every-change-shopify-sharded-monolith](https://shopify.engineering/capturing-every-change-shopify-sharded-monolith)

## Summary

Shopify is replacing Longboat, its query-based change-data capture tool that polls MySQL replicas on an updated\_at column, with a log-based CDC platform built on Debezium, Kafka Connect and Kafka that reads the binlog from 100+ MySQL shards. Polling caps data freshness at about an hour and cannot capture hard deletes, intermediate row states, or updates that skip updated\_at. It also produces snapshots with mismatched high-water marks. The new design merges per-shard Debezium output into one Kafka topic per logical table, so a single CDC pipeline can serve both the internal data warehouse and the merchant analytics platform with near-real-time change events.

Written by swe.quest, not by the author.

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

## Topics

- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [MySQL](https://swe.quest/tags/mysql.md) (Data & databases)
- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)

## Prerequisites

- Change data capture
- MySQL replication and binlog ([easy posts on MySQL](https://swe.quest/tags/mysql.md?difficulty=easy))
- Apache Kafka basics ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

Debezium, Kafka Connect, Apache Kafka, Longboat, MySQL binlog, Shopify

## Related posts

- [Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 2](https://swe.quest/articles/change-data-capture-cdc-with-postgresql-and-clickhouse-part-2-2123f803752f2e9d.md): ClickHouse · 2023-06-15 · Medium · 22 min read · Event-driven architecture, PostgreSQL, Analytics & OLAP, Data pipelines, Replication
  A Postgres-to-ClickHouse CDC pipeline is built with Debezium, Kafka Connect and a ClickHouse materialized view, keeping a ReplacingMergeTree table in sync with the 28M-row UK property price dataset under a mix of inserts, updates and deletes.
- [Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 1](https://swe.quest/articles/change-data-capture-cdc-with-postgresql-and-clickhouse-part-1-10e3d601e2748dab.md): ClickHouse · 2023-06-15 · Medium · 23 min read · Event-driven architecture, PostgreSQL, Analytics & OLAP, Replication, Queues & messaging
  Postgres-to-ClickHouse CDC can be built by streaming row changes from Postgres logical decoding (pgoutput plugin, replication slots, LSN ordering) through Debezium and Kafka, then applying them in ClickHouse with the ReplacingMergeTree engine.
- [How Spyne simplified their CDC pipeline with ClickPipes and ClickHouse Cloud](https://swe.quest/articles/how-spyne-simplified-their-cdc-pipeline-with-clickpipes-and-clickhouse-cloud-44d67da08e6e4dbc.md): ClickHouse · 2026-06-22 · Medium · 6 min read · Event-driven architecture, Data pipelines, Analytics & OLAP, Schema migrations
  Spyne replaced a self-managed Debezium → Kafka → ClickHouse Kafka-engine/materialized-view CDC pipeline with ClickPipes on ClickHouse Cloud.
- [MySQL CDC connector for ClickPipes is now Generally Available](https://swe.quest/articles/mysql-cdc-connector-for-clickpipes-is-now-generally-available-67d5bc9ddaf5dc04.md): ClickHouse · 2026-09-02 · Easy · 6 min read · Event-driven architecture, MySQL, Analytics & OLAP, Replication, Data pipelines
  ClickPipes' MySQL CDC connector, which replicates MySQL and MariaDB into ClickHouse Cloud, is generally available after moving over 1PB for hundreds of customers.
- [Build a Real-time Materialized View from Postgres Changes using Confluent’s ksqlDB](https://swe.quest/articles/build-a-real-time-materialized-view-from-postgres-changes-using-confluent-s-cfa507d6c7070e59.md): Neon · 2024-02-28 · Medium · 10 min read · Event-driven architecture, PostgreSQL, Stream processing, Queues & messaging
  Postgres logical replication can feed a Debezium-based CDC connector on Confluent Cloud that streams changes from Neon tables into Kafka topics, where ksqlDB aggregates them into a continuously updated materialized view.

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)
