The Billion Event Challenge
summary
Attempts to process 1 billion synthetic events move from Node.js + JSON (26 minutes on a single machine) to Rust with binary formats, testing bincode, MessagePack and rkyv and compression (deflate, snappy, LZ4), then heavy parallelization across CPU threads and multiple NVMe SSDs. A local run hits ~32s, a beefy AWS VM with four NVMe drives and tuned readers/writers/processors reaches ~18 seconds end-to-end for 1B events -> 100M read models, demonstrating JSON → rkyv and single-machine batch catch-up as the key levers.
AI-written summary · about
chapters (15)
- 0:00Introduction to talk
- 0:46Background on events and event sourcing
- 7:25Challenges with sequential processing
- 8:28The billion event challenge defined
- 9:51First solution in Node.js
- 13:23Optimizing with Rust
- 16:11Binary serialization formats
- 18:18Testing compression algorithms
- 19:42Parallelizing CPU work
- 21:08Parallelizing disk access
- 27:05Testing multiple SSDs
- 30:14Benchmarking on AWS
- 33:24Future optimization ideas
- 34:30Key learnings and conclusions
- 36:13Q&A session
