Free tool · Open source
Kafka Perf Kit
Find out how much load your Kafka cluster can take before payments slow down. Plan the test, get the exact commands, run them on your own servers, then paste the results here for charts and a clear pass or fail.
How it works: a browser can't connect to Kafka, so the load always runs where your cluster is (your laptop, a VM or CI). This page plans and analyzes. Your results never leave your browser.
Capacity check
Your commands
Run these from a machine that can reach the cluster, in this order. Option A uses the scripts that ship with Kafka (in its bin folder; on Windows use the .bat versions). Option B uses the free Kafka Perf Kit runner.
Option A: Kafka's own tools
Every Kafka download includes performance scripts in its bin folder. They give the most accurate producer numbers and support every compression type.
- Log in to a machine close to the cluster (same network or region). Not your laptop over VPN: the network would become the bottleneck.
- Use a Kafka download that matches your cluster version, from https://kafka.apache.org/downloads.
- Copy the commands from step 1 and run them in order: create the topic, then producer, consumer and end-to-end latency.
- Copy everything the command prints, and paste it into step 3.
Option B: Kafka Perf Kit runner
A small open-source tool (Node.js 18+) that runs producer, consumer and true end-to-end latency tests, checks your targets, and saves a report for this page. Ideal for CI pipelines.
Download Kafka Perf Kit 1.0.0 (zip)
unzip kafka-perf-kit-1.0.0.zip
cd kafka-perf-kit
npm install
node bin/kpk.js --help
Free under the MIT License. Put passwords in the KPK_PASSWORD environment variable, never on the command line. Reports never contain passwords.
Run it safely
- Never load-test production without a change ticket and the platform team's agreement. Use a performance or staging cluster sized like production.
- Use a dedicated test topic. Never write test messages into a real payments topic.
- Watch the brokers while the test runs (see “How to test Kafka”). Stop at once if under-replicated partitions appear.
- Never use real customer or account data in test messages.
Paste your results
Works with the output of kafka-producer-perf-test, kafka-consumer-perf-test, kafka-e2e-latency, or a Kafka Perf Kit report (--json). Nothing is uploaded: everything is analyzed in your browser.
Latency percentiles ms
What we found
Throughput over time msgs/s
Latency over time ms
Show the numbers as a table
Summary for your status report
How to performance-test Kafka, step by step
A Kafka performance test answers three questions: how many messages per second the cluster takes (throughput), how long each message waits (latency, especially the slowest 1%, called p99), and what breaks first when you push harder.
- Write down the goal in numbers. For example: “Handle 5,000 payment events per second at peak with p99 under 50 ms and zero message loss.” Use your busiest real day plus headroom (usually 2–3×).
- Use a cluster like production. Same broker count, disks, Kafka version and settings (
min.insync.replicas, retention, quotas). A tiny test cluster gives misleading numbers. - Copy production client settings. For payments:
acks=all,enable.idempotence=true,min.insync.replicas=2with replication 3. Results withacks=1look faster but don't reflect safe production behaviour. - Use realistic messages. Real message sizes (look at an ISO 20022 or JSON payment event) and keys that spread like real ones. Masked or synthetic data only.
- Baseline first. Run at today's normal rate for 10 minutes. This is your reference.
- Step up the load. Increase the rate step by step (1×, 2×, 3×, then max). Note where p99 starts to climb sharply: that knee is your real capacity.
- Measure end to end. Producer latency only covers the write. End-to-end latency (producer → broker → consumer) is what a payment actually experiences.
- Soak test. Run at expected peak for 1–4 hours. Memory leaks, log cleanup, disk filling up and slowly growing consumer lag only show up over time.
- Test failure. During a run, restart one broker. Check that producers keep going, nothing is lost, and how long latency spikes. Payments must survive a broker restart.
- Watch the brokers, not just the client. CPU, disk I/O and network per broker; request latency;
UnderReplicatedPartitions(must stay 0); ISR shrinks; request queue size; consumer lag; JVM garbage collection pauses. - Report and repeat. Record settings, results and pass/fail against the goal. Rerun after every Kafka upgrade, config change or big volume change.
Reading the numbers
- Throughput below target while brokers are idle → the client is the bottleneck: add producer instances, raise
linger.ms/batch.size, use compression. - p99 much higher than the median → tail latency: garbage collection, disk flushes, a hot partition or a slow follower.
- Errors or timeouts → check broker logs, quotas,
message.max.bytesand network. - Consumer slower than producer → consumer lag grows without limit: add partitions and consumers in the group.