Turn a target throughput and retention window into a partition count, cluster storage per broker, and a starter topics config for a new Kafka topic.
–
Paste into a Terraform confluentcloud_kafka_topic, Strimzi KafkaTopic, or feed straight to kafka-topics.sh --create. Retention is emitted in ms as Kafka expects.
| Partitions | Ingress ceiling (MB/s) | Egress ceiling (MB/s, per group) | Headroom vs. peak |
|---|
Rule of thumb. Confluent recommends at most 4,000 partitions per broker and 200,000 per cluster for classic ZooKeeper-mode Kafka; KRaft mode raises the ceiling but the per-partition metadata cost is the same. Under-partitioning caps producer throughput; over-partitioning inflates end-to-end latency and controller work.
Storage. A partition is a sequence of segment files (.log, .index, .timeindex). Index & snapshot files add ~5–15 % depending on segment size and retention. Log compaction can shrink footprint drastically for keyed topics, but this tool assumes a plain time-retained log.
Single-partition ceilings. The write ceiling depends on record size, disk IOPS, RF, and network. 10 MB/s is a widely-cited safe number for RF=3 on SSD; you can push a partition harder with idempotent large-batch producers, but a hot partition remains the single biggest latency risk.