
Prayog
A simulated stock exchange and bot arena. Simulated traders move the market; you trade by hand or with your own bot.
- why it exists
- my 2021 induction win was an algo strategy for an exchange I could not see inside, so I built one I could
- key decision
- one single-threaded matcher, journal first: replay gives a byte-identical event log, and Kafka downtime never stops trading
- hardest bug
- p99 hit 445 ms with 3.5 s spikes. Traced it to Serial GC pauses in a memory-starved container; ZGC made it 5x worse, so I kept the default and wrote down why
- numbers
- ~100 ns per command matching · 20,000 commands/s with fsync · live p99 14 ms · 23 ADRs
Why an engineer at a bank builds his own exchange, and why the disk, not the code, sets the latency.

