Tokio Gives Progress, Not Ordering: Scheduling 1M Tasks
pranitha_m
55 points
5 comments
July 27, 2026
Related Discussions
Found 5 related stories in 354.7ms across 15,062 title embeddings via pgvector HNSW
- The Tokio/Rayon Trap and Why Async/Await Fails Concurrency LAC-Tech · 33 pts · July 16, 2026 · 50% similar
- Task Paralysis and AI MrGilbert · 219 pts · May 10, 2026 · 44% similar
- The Tsundoku Trap: Why AI Makes You Start Everything and Finish Nothing dvaughan · 12 pts · April 25, 2026 · 44% similar
- In Japan, the robot isn't coming for your job; it's filling the one nobody wants rbanffy · 148 pts · April 05, 2026 · 42% similar
- Temporal: The 9-year journey to fix time in JavaScript robpalmer · 597 pts · March 11, 2026 · 41% similar
Discussion Highlights (2 comments)
jandrewrogers
I think everyone learns these lessons the hard way. I know I did. The difficulty of designing robust schedulers in real systems comes from the confluence of two properties: a theoretically optimal schedule guarantees no bound on task latency and runtime scheduling is AI-complete. In practice, we need latencies to be bounded, often tightly. The scheduler implementation must operate within a limited memory and compute budget, which is not a property of anything that requires "AI-complete" algorithms -- best you can do is extremely narrow and very loose approximations. Because of these constraints, any general purpose scheduler will be brittle or have poor efficiency (typically both). At the same time, designing a bespoke implementation-specific scheduler is exceedingly non-trivial for all but the simplest applications. Closest simple examples with literature are cache replacement algorithms, which are a very narrow case of scheduling where unbounded latency is not a problem. Solving these kinds of design problems has historically fallen under the rubric of "latency-hiding" (e.g. in HPC). There is vanishingly little literature for software and hardware has many constraints and properties that don't apply to software.
excerionsforte
You learn very early that Tokio doesn't order, ordering is one of the enemies of high performance. Roll your own solution or use a third party solution, pay the tax, but you get what you expect. futures_orchestra ( https://crates.io/crates/futures_orchestra ) handles the problem of limiting concurrency, queuing and ordering. I think I'm underselling it really, haha.