Switch language한국어
Back to the list

I Was Wrong About Events for Three Years—Until I Learned What Async Runtime Was Really Costing

TL;DR AI

Key summary

2 min read
  1. A Rust game backend handling 2M+ events/sec suffered tail latency, memory growth, and outages despite GC tuning and code fixes.

  2. Profiling showed the async runtime, not the app logic, was stalling on syscall-heavy queue handling in the hot path.

  3. The team switched from tokio to smol, added a lock-free bounded queue, and isolated network writes.

  4. The changes cut allocations, stabilized memory, and improved determinism under sustained load.

  5. The case shows async runtime design can shape latency and memory as much as garbage collection or application code.

Read the original