axum-core-async-performance
Installation
SKILL.md
Axum Core Async Performance
Overview
The cardinal rule of every Axum service: NEVER block the Tokio runtime in an async handler. This single rule is the most important operational fact about Axum, broader than any other performance concern.
A Tokio multi-threaded runtime has a fixed pool of worker threads, and each worker runs
many request futures cooperatively. A future yields control only at an .await point.
A synchronous blocking call has no .await inside it, so it never yields: while it
runs, the worker thread is frozen and EVERY other request future scheduled on that
worker is starved. Under concurrent traffic this collapses throughput and inflates tail
latency.
The Tokio APIs in this skill are identical on Axum 0.7 and 0.8. This skill has no version-divergent code.