Kafka & CDC sizing calculator
Enter your change rate and event size. Get partitions, brokers, disk and network for a Debezium CDC setup, with the formulas shown so you can check every number.
Estimate
Planning a CDC pipeline for real?
I design and build fail-closed CDC pipelines from MySQL or Postgres into ClickHouse or Snowflake. Fixed price from $1,900.
The maths, in the open
Every number on this page comes from the inputs on the left. Nothing is hidden, and the formulas are below. Decimal units: 1 MB = 1,000,000 bytes.
Throughput
avg rows/s = rows per minute ÷ 60, peak rows/s = avg × peak multiplier, MB/s = rows/s × event bytes ÷ 1,000,000.
Storage
raw GB/day = avg rows/s × 86,400 × event bytes ÷ 10⁹. On disk: raw GB/day × retention days ÷ compression × replication factor × (1 + headroom).
Partitions
Debezium writes one topic per table, so I assume one partition for each quiet table. The busiest table gets max(⌈peak MB/s × share ÷ MB/s per partition⌉, ⌈peak rows/s × share ÷ rows/s per consumer⌉). A partition is read by at most one consumer in a group, so consumer speed often decides this, not bytes.
Brokers
The largest of: 3 (a KRaft quorum that survives one failure), the replication factor, ⌈disk ÷ disk per broker⌉, ⌈peak compressed MB/s × RF × (1 + headroom) ÷ write budget⌉ and ⌈partition replicas ÷ max per broker⌉.
What it leaves out
Connect workers, Schema Registry, CPU for TLS, and very large initial snapshots. If you key messages by primary key, ordering per row survives repartitioning, but ordering across rows in one table does not. That matters for some consumers. Treat the result as a starting point and load-test it.
Questions about this tool
How many partitions does a CDC topic need?
For most tables, one is enough, and it keeps ordering simple. Only the busiest tables need more, and usually because one consumer can't write fast enough to the warehouse, not because of bytes. The calculator shows both limits.
Why at least 3 brokers?
In KRaft mode, a 3-node controller quorum keeps working when one node is lost. With replication factor 3 and min.insync.replicas 2, a write survives one broker failure.
What compression ratio should I use?
Measure it on your own topics: bytes in divided by bytes on disk. Debezium JSON compresses well because the same field names repeat in every message. 4× is just a starting assumption.
Is this how you size production clusters?
It's the same arithmetic I start with. Then I load-test with real change data, because consumer write speed and message size are always different from the guess.
One senior engineer, start to finish
I'm Danish Rajpoot (Muhammad Danish Ishfaq), a data architect and principal data engineer with nearly 9 years on data platforms and a master's in computer science from the University of Eastern Finland. I do the work myself and write the handover so your team can run it without me.