{{ summary.title }}
{{ summary.primary }}
{{ summary.detail }}
{{ badge.label }}
Producer Brokers Consumers RF {{ model.replicationFactor }}
Kafka partition sizing inputs
Shown in exported rows only; it does not change the math.
Start with the closest production topic shape, then replace the rates with benchmarked values.
Changing the basis changes which target fields are used for the same partition formula.
Replace the default with a benchmark from your producer-perf-test or production metrics.
MB/s
Use application-specific consumer throughput; it is often lower than broker fetch capacity.
MB/s
Enter the maximum active instances or threads expected in the busiest consumer group.
consumers
Use the number of brokers eligible to host this topic.
brokers
Production Kafka topics commonly use 3 when the cluster has enough brokers.
replicas
Choose the posture that matches producer keys and downstream ordering expectations.
Raise this when topic growth is likely or keyed repartitioning would be disruptive.
%
Buffer slider {{ formatPercent(model.safetyBufferPct, 0) }}
Broker-balanced is the conservative default for topic creation planning.
Leave 0 for a new topic.
partitions
Enter groups that read the full topic during peak to estimate aggregate broker read load.
groups
Common RF 3 topics often use min ISR 2 when producers require committed replicas.
replicas
Leave 0 when no topic-specific broker guardrail is defined.
leaders/broker
Use this when platform teams reserve a maximum count for new topic growth.
partitions
Use this to flag plans that need broker benchmarks, tiering, or topic redesign before creation.
partitions
Plan itemValueSizing detailCopy
{{ row.item }} {{ row.value }} {{ row.detail }}
Footprint checkValueBroker contextCopy
{{ row.check }} {{ row.value }} {{ row.context }}
BufferBuffered needRounded targetLeaders per brokerNoteCopy
{{ row.buffer }} {{ row.buffered }} {{ row.rounded }} {{ row.leaders }} {{ row.note }}
CheckpointSignalActionOperator noteCopy
{{ row.checkpoint }} {{ row.signal }} {{ row.action }} {{ row.note }}
Customize
Advanced
:

Kafka partitions set the basic parallelism shape of a topic. A topic with too few partitions can bottleneck producers, leave consumers idle, and make catch-up slower than the service target. A topic with too many partitions can raise broker metadata load, file-handle pressure, recovery time, and rebalance cost. The right count is a capacity decision, not just a round number picked at topic creation time.

Each partition is an ordered log with one leader replica and zero or more follower replicas. Producers write to partition leaders, brokers replicate the log according to the replication factor, and consumers in the same consumer group divide partitions among themselves. Because one active consumer in a group owns a partition at a time, partition count becomes a hard ceiling for parallel processing in that group.

Producer write MB/s Partitions leaders on brokers replicas multiply footprint Consumers group limit Partition count must satisfy write rate, read rate, and consumer parallelism before growth and balance rounding.

Partition planning usually starts with measured rates rather than product names. Producer throughput depends on batching, compression, acknowledgement policy, record size, broker disks, network, and replication. Consumer throughput depends on application processing, downstream calls, commits, and retry behavior. A slow consumer group can need more partitions even when brokers have enough write capacity.

Keyed topics need extra caution because partition count affects key-to-partition mapping. Increasing partitions after production traffic starts can move keys to different partitions and change the order seen by downstream processors. Over-partitioning before launch may be acceptable for an ordering-sensitive stream, while a small unkeyed event topic may benefit from a tighter count and simpler operations.

Replication factor improves fault tolerance, but it does not multiply consumer parallelism. It multiplies broker storage and replication work. A partition count that looks modest for one topic can become expensive when replication, many consumer groups, retention, compaction, and cluster-wide topic growth are considered together.

How to Use This Tool:

Model one Kafka topic and the busiest consumer group that must keep up with it. Start from a preset only as a starting point, then replace default rates with benchmark or production measurements.

  1. Enter a topic label, choose the closest workload preset, and pick whether sizing is based on direct throughput or on event rate and average event size.
  2. Set the producer write target and the busiest consumer-group read target. When using event-rate mode, the tool converts messages per second and average KiB per message into MB/s and applies the read multiplier.
  3. Enter measured producer capacity per partition and consumer capacity per partition. These values should include the chosen producer settings, broker class, message shape, and consumer application work.
  4. Set peak consumers in one group, broker count, replication factor, keying posture, growth buffer, and the preferred rounding mode.
  5. Use advanced inputs for current partition count, active consumer groups, minimum in-sync replicas, leader warnings, cluster partition budget, and a preferred topic maximum.
  6. Review Partition Plan, Broker Footprint, Buffer Ladder, Partition Drivers, Capacity Brief, Topic Command, and JSON before using the count in a rollout plan.

If validation reports a problem, fix it before reading the recommendation. Replication factor must not exceed broker count, minimum in-sync replicas must not exceed replication factor, and throughput values need to be positive for a meaningful partition calculation.

Interpreting Results:

Recommended partition count is the rounded whole-partition result after the write-throughput floor, read-throughput floor, consumer-parallelism floor, growth buffer, and selected rounding policy are applied. The highest raw driver is often more important than the final number because it tells you why the topic needs that many partitions.

Broker Footprint translates the topic count into leaders per broker, replica partitions per broker, modeled write/read per partition, approximate broker write footprint after replication, follower replication traffic, and aggregate broker read egress. These are planning signals, not a substitute for cluster-specific load tests.

Kafka partition result interpretation
Result signal Meaning Check before acting
Base formula result Largest of write, read, and consumer-parallelism requirements. Confirm per-partition throughput measurements match the same producer and consumer behavior.
Buffer Ladder How alternative buffer percentages change the rounded target. Use it to see whether one more buffer step causes a large divisibility jump.
Current partition delta Difference between an existing topic count and the modeled result. Kafka can increase partitions, but decreasing requires a replacement or migration plan.
Capacity Brief Operational notes for consumer count, keying risk, broker footprint, and benchmark needs. Treat warnings as review gates before creating or altering a production topic.

A warning does not always mean the count is wrong. It means the count has an operational consequence: a high leader count, a keyed-topic migration risk, a cluster budget breach, or a minimum in-sync replica setting that could stall producers during maintenance.

Technical Details:

The partition model separates three floors. The write floor asks how many partitions are needed so producer ingress stays within measured per-partition write capacity. The read floor asks how many partitions are needed so the busiest consumer group can process its target throughput. The parallelism floor keeps the partition count at least as high as the peak active consumers in one group.

After the largest floor is chosen, a growth buffer is applied and the result is rounded according to the selected balance policy. Broker-count rounding can make leader placement cleaner. Consumer-count rounding can make assignments within a full consumer group cleaner. Broker-and-consumer least-common-multiple rounding satisfies both but can overshoot badly when the numbers do not share factors.

Formula Core:

Throughput inputs are expressed in MB/s. Event-rate mode first converts messages per second and average event size in KiB into write MB/s.

Wevent = events×avgKiB1024 Pwrite = WCproducer Pread = RCconsumer Pbase = max(Pwrite,Pread,consumers) Pbuffered = Pbase×(1+bufferPct100)

With 60 MB/s write target, 60 MB/s read target, 12 MB/s producer capacity per partition, 18 MB/s consumer capacity per partition, and 12 peak consumers, the raw floors are 5, 4, and 12. The base requirement is 12 partitions. A 25% buffer raises that to 15, and broker-count rounding on 6 brokers returns 18 partitions.

Kafka partition rounding and warning rules
Rule Boundary Operational effect
Broker balance Round up to a multiple of broker count. Helps distribute leaders evenly across eligible brokers.
Consumer balance Round up to a multiple of peak consumers. Helps a full consumer group divide work evenly.
Broker and consumer LCM Round up to the least common multiple of brokers and consumers. Can add many partitions when the multiple is much larger than the raw need.
Replication footprint Total replicas equal partitions multiplied by replication factor. Raises storage, metadata, replication traffic, and recovery work.
Keyed-topic alteration Increasing partitions can remap keys under common partitioning approaches. Ordering-sensitive streams need a migration and consumer-impact review.

The generated topic command uses the modeled partition count and replication factor, but operational acceptance still depends on the cluster version, controller capacity, broker limits, rack placement, quota policy, retention, compaction, failover tests, and the application's tolerance for rebalances.

Worked Examples:

Balanced production topic

A topic targeting 60 MB/s for both writes and the busiest read group, with 12 MB/s producer capacity per partition and 18 MB/s consumer capacity per partition, is not limited by throughput. The 12-consumer group sets the base floor. A 25% buffer and broker rounding on six brokers turn the plan into 18 partitions.

Event-rate sizing

At 8,000 events per second and 3 KiB per event, write throughput is about 23.44 MB/s. If the busiest read group must keep up at the same rate and consumer capacity is 12 MB/s per partition, the read floor is 2 partitions. Peak consumers and rounding may still drive the final target above that.

Existing keyed topic

If an ordering-sensitive topic already has 12 partitions and the model recommends 18, the difference is not a simple capacity edit. The partition increase can change key placement, so consumers, replay plans, and ordering assumptions should be reviewed before running an alter command.

FAQ:

Should I size from total read traffic across all consumer groups?

No. Partition count limits parallelism inside each consumer group. Use the busiest single group for the read-throughput floor, then use active consumer groups as broker egress context.

Does replication factor increase consumer capacity?

No. Replication factor creates follower copies for durability and availability. It increases broker footprint and replication traffic, but consumers still read from assigned partitions.

Why does the final count jump after rounding?

Rounding uses whole multiples. Broker-and-consumer LCM rounding can be much larger than the base count, especially when broker count and consumer count do not share useful factors.

Is any topic data sent away for this calculation?

The partition math runs in the browser from the values on the page. The topic label, throughput assumptions, broker count, and generated command are not sent to a dedicated calculation service.