Tokio: How we hit 88mph
summary
Tokio claims to be an unusually fast async I/O stack, showing very high requests/sec on benchmark charts by combining the futures crate with mio and a zero-cost futures design. It replaces heap-allocated callbacks with a poll/task model: futures implement poll returning Ready or NotReady, the ambient task notify mechanism wakes work without per-transition allocations, and async/await (nightly) composes this neatly. Tokio targets cross‑platform sockets, runs in production at several companies, and keeps state transitions cheap and thread‑compatible.
AI-written summary · about
chapters (45)
- 0:00Intro
- 5:10Async IO
- 6:06Whats happening here
- 6:36A very difficult world
- 7:12Futures
- 8:07Future example
- 9:53Tokio
- 10:45Tokyo
- 11:19Futures Crate
- 12:17Async await
- 15:00Writing a future
- 15:16Threadsafe future
- 15:41Trace
- 16:03sentinel
- 16:20callback
- 16:54objectsafe
- 17:39if statement
- 17:53local solution
- 18:13more cases
- 19:04elfin
- 19:16fn
- 22:56API Cost
- 23:51Drawbacks
- 24:36Recap
- 25:32Server Design
- 26:24Tasks
- 26:37Concurrency
- 27:09A task
- 28:35Approach
- 29:11Future
- 30:23Timeout
- 30:33Moments
- 30:56Unit
- 31:08Poll
- 31:24TaskNotify
- 32:14Design Overview
- 36:01Notifications
- 37:37Transform
- 37:48Pole Read
- 39:00Wake Up
- 39:21Event Loop
- 39:53Questions
- 40:58Sink Read
- 46:02Reschedule
- 47:04Poll event
related talks
47mA Tale of Two Asyncs: Open Source Language Design in Rust and Node.js
32mLook Ma, No Sidekiq: A peek into async future
36mNetwork I/O for a More Civilized Age: The New Akka I/O
33mReaching Ludicrous Speed
23mHolding on to Your Performance Promises
23mAsync Iterators: a new future for streams
49mNode JS
39mAsynchronous and Non-Blocking IO with JRuby
