Monedula
Writing & open source

§ 01 · An interactive simulator for Apache Kafka

Apache Kafka,
made visible.

Change a Kafka setting, break the cluster, see exactly why producers, brokers, replicas, consumers — and the metrics that watch them — react the way they do.

Apache Kafka 4.3 semantics. Deterministic, seeded, replayable. Browser-only — no backend, no telemetry of your scenarios.

Open the playground

13 scenarios, free-play sandboxes, single-DC clusters. No signup, runs in your browser.

Three-broker Kafka cluster with replication factor 3 A producer on the left writes to a partition leader; followers replicate from the leader. The in-sync replica set spans all three brokers, placed across three racks. The high watermark marks the committed offset. producer acks=all idempotent consumer position 16 reads ≤ HW RACK-A RACK-B RACK-C broker-1 rack-a p0 p1 p2 broker-2 rack-b p0 p1 p2 broker-3 rack-c p0 p1 p2 leader (epoch 4) ISR — in-sync replicas high watermark — committed offset rack-aware placement · replicas across distinct racks seed=mon-43 · t=00:00.420 · leader · follower · LEO · HW
Fig. 1 · The simulator at rest · RF=3 · min.ISR=2 · acks=all

§ 02 · The canonical demo

Watch acks=all cross the durability boundary.

RF=3, min.insync.replicas=2, acks=all. Kill one broker; the cluster degrades but writes still commit. Kill a second; durability cannot be satisfied, and produce fails with NotEnoughReplicas.

b-1 a b-2 b b-3 c producer acks=all ack ISR=3/3
Panel I · t+0.0s · Healthy
b-1 a DOWN b-3 c producer acks=all ack ISR=2/3 ✓ minISR
Panel II · t+5.2s · Broker 2 dies
b-1 a DOWN b-3 c producer acks=all ack ISR=2/3 ✓ minISR epoch+1
Panel III · t+9.0s · New leader
b-1 a DOWN DOWN producer acks=all NotEnough Replicas
Panel IV · t+14.8s · Broker 3 dies
b-1 a DOWN DOWN producer acks=all NotEnough Replicas
Panel V · t+15.1s · Teaching moment
[t+14.802] produce_request → orders/p1
[t+14.803] leader: broker-1 (epoch 3)
[t+14.803] isr: [broker-1]
[ERROR]   NotEnoughReplicas — acks=all needs 2 in-sync replicas,
          but only 1 is currently in ISR.
MetricΔWasNow
UnderReplicatedPartitions+303
IsrShrinksPerSec+1.20.01.2
FailedProduceRequestsPerSec+4.20.04.2
LeaderElectionRateAndTimeMs03 · 38ms

§ 03 · The curriculum

Eight modules.

  1. 01 Anatomy 6 scenarios
  2. 02 Producers & EOS 4 scenarios
  3. 03 Replication & ISR coming soon · v1.3
  4. 04 Consumer groups 3 scenarios
  5. 05 Share groups coming soon · v2.0
  6. 06 KRaft & controllers coming soon · v1.6
  7. 07 Tiered storage coming soon · v1.9
  8. 08 Disaster recovery coming soon · v1.8

§ 04 · Day-one scenarios

13 scenarios, each with a frozen golden trace.

These 13 picks are the v1.0 Fundamentals starter pack — the first public wave of a planned 125-scenario library, and the foundations every later pack builds on. The remaining packs (replication, transactions, storage, ops, chaos, multi-DC DR and the platform domains) roll out on a roughly biweekly cadence; the changelog tracks what has shipped and what is next.

01 intro · 1 min
b1 b2 b3 RF=3 3 racks

Anatomy baseline

ANATOMY

RF=3 across 3 racks. Read ISR, leader, follower, LEO, and HW on a healthy cluster.

03 core · 2 min
acks=0 acks=1 acks=all tput / latency

acks trade-off

PRODUCER

Same workload at acks=0 / 1 / all. Throughput, latency, durability — the triangle.

05 core · 2 min
retry under failure idempotent=off ← dup idempotent=on

Idempotence retry

PRODUCER

Retry under failure — with and without idempotence. Watch a duplicate appear, then disappear.

08 core · 2 min
cleanup.policy=compact a b a c a b c a b latest value per key + tombstone

Compaction

ANATOMY

Repeated keys to a compact topic. Then a tombstone, and the key is gone.

Browse all 13 in the playground More scenario packs coming on a roughly biweekly cadence — see the roadmap

§ 05 · The lab

Frozen at the moment broker-2 just died.

Every scenario opens in the same playground you build free-play clusters in: brokers, partitions, RF, min.ISR, racks, regions, timing and a deterministic seed are all yours to set, then share by URL.

Monedula · KAFKA SIMULATOR scenario / 03.2.1 Canonical failure build · 1.0.0 ◐ light ⚐ report issue ⓘ help share scenario ↗ about Free play NEW SANDBOX CLUSTER TYPE Single DC SCENARIO LIBRARY COLLAPSE ALL Anatomy 14 Producers & EOS 23 Consumer groups 13 Replication 25 03.1.2 min.ISR boundary 03.1.3 Slow follower 03.2.1 Canonical failure 03.2.2 Leader balancing 03.2.3 Unclean leader Tiered storage 5 Disaster recovery 31 Schema Registry 3 Share groups 9 producer acks=all blocked broker-1 rack-a p0 p1 p2 DOWN broker-2 rack-b broker-3 rack-c p0 p1 p2 consumer lag = 0 NotEnoughReplicas · acks=all · min.insync.replicas=2 ISR=2/3 — one more loss crosses the boundary. why? → open in WHY tab → steps inspector metrics why Under-replicated partitions 3 UnderReplicatedPartitions was 0 · 3 partitions → inspect event ISR health 2/3 UnderMinIsrPartitionCount 0 below min.insync.replicas ✓ (still ok) Failed produce 4.2 /s FailedProduceRequestsPerSec was 0.0 · last 30s → inspect event Leader elections 1 LeaderElectionRateAndTimeMs 38 ms · b-2 → b-1 → inspect event FRAMES frame 15 of 15 · t+14.802s · ▶ playing scenario produce_request high_watermark_advance broker_down b-2 (hard) isr_shrink leader_elect (b-2 → b-1) produce_error ⏮ ◀ step ▶ play step ▶ ⏭ speed 0.25× / 0.5× / [1×] / 2× / 4× auto-loop ☑ · interval.ms 1000 clear state · reset config DID YOU KNOW? KRaft mode replaces ZooKeeper with a built-in Raft quorum, so the controllers live inside the brokers.
Fig. 2 · /playground · scenario 03.2.1 canonical failure · seed mon-43 · paused at t+14.802
This is a still. The real one plays — open the playground

§ 06 · Fidelity & honesty

An honest simulator says what it doesn't model.

+ What it models

  • Producer → leader → follower fetch → HW/LEO advance, across multiple topics
  • Producer tuning — acks, idempotence & max.in.flight ordering, compression (zstd/gzip/snappy), buffer.memory backpressure, byte-rate quotas
  • Transactions & EOS — PIDs, sequences, LSO, zombie fencing
  • ISR membership, leader epoch, unclean leader election, throttled reassignment (replication.throttled.rate)
  • Retention — time- & size-based (retention.bytes), compaction & tombstones, tiered storage with local.retention.ms (KIP-405)
  • Consumer groups (eager & cooperative rebalances), static membership (KIP-345), share groups (KIP-932)
  • Control plane — KRaft quorum, controller epoch & failover, plus a gated ZooKeeper-vs-KRaft comparison
  • Multi-DC DR — stretched MRC, MirrorMaker 2 & Cluster Linking, active-passive & active-active failover — on the roadmap, shipping in a later pack
  • Schema Registry — subjects, versions, compatibility modes — on the roadmap
  • Authorization — ACLs & RBAC — on the roadmap
  • Hard kill, graceful shutdown, restart, slow follower, network partition
  • Real Kafka metric names, calibrated and directionally correct

− What it does not

  • GC pauses, OS page cache, network buffers, byte-exact sizes
  • SASL, mTLS, encrypted transport — the auth handshake & wire crypto (ACL/RBAC authorization itself is modeled)
  • Kafka Streams & Connect — core broker/client protocol only
  • Magnitudes of metric movement — calibrated direction, illustrative scale

Modeled baseline: Apache Kafka 4.3. Not for production-as-is.

Your move

Go break a cluster.

13 scenarios and free-play sandboxes, all in your browser. No signup, no backend — just open it and start pulling things apart.

Open the playground

Built by Monedula. Apache Kafka and Kafka are trademarks of The Apache Software Foundation. Monedula Kafka Simulator is an independent educational tool and is not endorsed by or affiliated with The Apache Software Foundation.