This is a deterministic discrete-event learning model, not a benchmark or production sizing guarantee. Service slots, timings, queues, replication, and bandwidth are explicit inputs. Run comparisons across multiple seeds and measured slow/fast service times before drawing a conclusion.
One primary owns all writes. The DB proxy holds a pool slot for each modeled transaction until its database response. Reader/writer endpoints are selected explicitly. Real proxies may balance by connection and retain session affinity; this model uses short independent operations.
There are 1,000 keys, with a configurable hot set of 10. Staleness compares the returned key version with the primary at read completion. Replicas replay in order with finite apply throughput, sharing service slots with reads. Lag is the age of the oldest unapplied commit. Cache invalidation is instantaneous when selected; real invalidation delivery has additional failure modes.
Kafka is a finite durable-log abstraction with a traditional consumer group and one in-flight record per partition. Acceptance and database completion are separate. Pre-commit consumer failures retry after one second. Overdue accepted work remains pending instead of disappearing at the client deadline. Broker quorum, disk/network replication, duplicate delivery, idempotency, and rebalancing delays are not simulated.
Polling performs a full read on every poll. Push uses one shared source read per source update and a sampled delivery per affected subscriber; it models steady subscription fan-out, not handshake/reconnect storms. Freshness combines polling interval / 2, worst replica lag, and successful p95 latency. It is a conservative heuristic, not measured message age. Source updates are subscription events, not additional database writes.
Requests have a finite deadline. A timed-out write may already be committed. No automatic failover, distributed transactions, sharding, multi-region quorum, autoscaling startup, TLS cost, GC, disk contention, or provider-specific limits are modeled. Egress is one shared queue; responses use configured sizes. Resource utilization is average occupied service capacity.
Live runs continue until paused. Latency keeps the latest 50,000 successful samples. Excessive retained backlog pauses the simulation with a visible explanation. Configuration edits restart the model; moving components, faults and undoing a fault preserve state. Dots represent sampled real routing activity, not one dot per request. The live table remains available with reduced motion. Primary-only and lag-gated policies bypass the cache.
References: PostgreSQL replication · RDS proxy endpoints · Kafka design · Server-sent events