Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Capacity Planning

Sizing guidelines and capacity planning for Apache Kafka clusters.


Capacity PlanningComputeStorageNetworkCPUMemoryDisk SizeDisk IOPSDisk ThroughputBandwidthConnections

QuestionImpact
Peak throughput (MB/s)?Broker count, network
Messages per second?CPU, network threads
Average message size?Network, storage
Retention period?Storage size
Replication factor?Storage, network
Consumer count?Network bandwidth
Latency requirements?Hardware tier
Peak produce throughput: 500 MB/s
Average message size: 1 KB
Retention: 7 days
Replication factor: 3
Consumer fanout: 3x (1500 MB/s total reads)

WorkloadThreadsCPU Cores
100 MB/snum.io.threads=84-8 cores
500 MB/snum.io.threads=168-16 cores
1+ GB/snum.io.threads=32+16-32 cores

Formula:

Required cores = (network_threads + io_threads + replica_fetchers) × 1.5
JVM Heap: 6-8 GB (rarely need more)
Page Cache: Remaining RAM
Total RAM = JVM Heap + (hourly_throughput × hours_to_cache)

Example:

Throughput: 500 MB/s = 1.8 TB/hour
Cache 2 hours: 3.6 TB page cache ideal
Practical: 64-128 GB RAM per broker
Brokers = max(
(peak_throughput × replication_factor) / per_broker_throughput,
total_partitions / max_partitions_per_broker,
3 # minimum for HA
)

Example:

Peak throughput: 500 MB/s
Replication factor: 3
Per-broker capacity: 300 MB/s
Brokers = (500 × 3) / 300 = 5 brokers
With 6000 partitions:
Brokers = max(5, 6000/4000, 3) = 5 brokers

Storage per broker =
(daily_throughput × retention_days × replication_factor) / broker_count
+ 20% overhead

Example:

Daily throughput: 500 MB/s × 86400 = 43.2 TB/day
Retention: 7 days = 302.4 TB
Replication: 3× = 907.2 TB total
5 brokers = 181.4 TB per broker
+ 20% = 218 TB per broker
MetricCalculation
IOPS(partitions × 2) + (connections × 0.5)
Throughputpeak_throughput × (1 + replication_factor)

Example:

3000 partitions, 500 connections
IOPS = (3000 × 2) + (500 × 0.5) = 6250 IOPS
500 MB/s produce, RF=3
Throughput = 500 × (1 + 3) = 2000 MB/s
Disk TypeUse Case
NVMe SSDHigh throughput, low latency
SSDGeneral production
HDD (15K RPM)Cost-optimized, cold storage

Network = produce_rate × (replication_factor + consumer_fanout)

Example:

Produce: 500 MB/s
Replication: 500 MB/s × 2 = 1000 MB/s
Consumer fanout: 500 MB/s × 3 = 1500 MB/s
Total: 500 + 1000 + 1500 = 3000 MB/s = 24 Gbps
Per broker (5): 4.8 Gbps → 10 Gbps NICs
# Network threads per broker
num.network.threads = max(3, peak_connections / 1000)

FactorRecommendation
Parallelismpartitions ≥ max consumer instances
Throughput~10 MB/s per partition
Overhead< 4000 partitions per broker
RebalanceFewer partitions = faster rebalance
Partitions = max(
target_throughput / 10 MB/s,
max_consumer_instances
)

MetricThresholdAction
CPU utilization> 70% sustainedAdd brokers
Disk usage> 70%Add storage or reduce retention
Network utilization> 70%Add brokers
Partition count> 3000/brokerAdd brokers
Current: 5 brokers, 500 MB/s
Growth: 25% per year
Year 1: 625 MB/s → 6 brokers
Year 2: 781 MB/s → 7 brokers
Year 3: 976 MB/s → 8 brokers

ComponentSpecification
Brokers3
CPU8 cores
Memory32 GB
Disk1 TB SSD
Network10 Gbps
ComponentSpecification
Brokers5-7
CPU16 cores
Memory64 GB
Disk4 TB SSD
Network10 Gbps
ComponentSpecification
Brokers10+
CPU32 cores
Memory128 GB
Disk10+ TB NVMe
Network25 Gbps

InputValueUnit
Peak produce throughputMB/s
Average message sizebytes
Retention perioddays
Replication factor
Consumer fanout
Target latencyms
CalculatedFormulaResult
Daily volumethroughput × 86400TB
Total storagedaily × retention × RFTB
Network bandwidththroughput × (RF + fanout)Gbps
Minimum brokersSee formulas above