🇪🇸 Cambiar a la versión en español: Calculadora de Tamaño y Particiones Kafka
Calculate exact storage retention (TB with 20% headroom), partition count, total cluster network bandwidth (MB/s), and minimum broker count for Apache Kafka or Redpanda clusters cleanly inside your browser.
Apache Kafka & Redpanda Sizing Formula
Following storage and partitioning mechanics documented in the official Apache Kafka documentation, cluster disk footprint and east-west replication bandwidth scale with Replication Factor (RF) and active consumer fan-out:
Compressed Daily Ingest (GB/day) = (Events/s × Payload_KB × Compression_Ratio / 1,024) × 86.4
Cluster Disk (TB) = (Daily_GB × Retention_Days × RF / 1,000) × 1.20 | Total Bandwidth (MB/s) = Ingest_MB/s × (1 + (RF - 1) + Consumer_Groups)
Compression & Partitioning Trade-Off Table
| Compression Codec | Typical JSON/Avro Ratio | Broker CPU Cost | Best-Fit Production Profile |
|---|---|---|---|
| ZSTD | 0.30× – 0.40× | Moderate | Default sweet spot for shrinking NVMe disk & cross-AZ egress |
| LZ4 | 0.45× – 0.55× | Very low | Strict P99 latency targets on CPU-constrained producers |
| Snappy / None | 0.55× – 1.00× | Minimal | Already compressed binary payloads (Protobuf / Parquet) |
Frequently Asked Questions
Why reserve 20% disk headroom on Kafka brokers?
Log compaction, unscheduled traffic spikes, segment rollover delays, and partition reassignments require free disk capacity; hitting 100% full halts the broker immediately.
How many partitions should a production Kafka topic start with?
Match your peak parallel consumers: assuming ~10 MB/s per partition consumer thread, scale up partitions cleanly in multiples of broker count (e.g., 6, 12, 24) without spawning thousands of idle partitions per cluster.
RF - 1) and consumer groups cross cloud availability zones.