Tokio Gives Progress, Not Ordering: Scheduling 1M Tasks
Summary
The article analyzes a high-throughput Rust service using Tokio, where spawning up to 1 million tasks reveals how the runtime's scheduler and memory use interact. It shows that task creation does not guarantee early polling or completion, and demonstrates that bounding concurrency with a semaphore can reduce peak memory without sacrificing throughput, highlighting the need for application-level fairness in asynchronous systems.