Tokio
11 posts

The Rust Async Trap Everyone Steps On Once
It compiles. It runs. It even passes stress tests… until production catches fire. Let’s talk about that classic async Rust pitfall everyone hits.
Running Rust Async on Windows? Meet the Little Devil in the Closet: Device Afd
Why does Rust async work on Windows? Unveiling Microsoft’s undocumented AFD driver with real-world analogies to understand Windows async programming under the hood

Build Your Own Mini Actor Framework: Run Concurrency Like a Coffee Shop
A hands-on guide to building a usable mini Actor framework in Rust from scratch: Actor, Addr, spawn, supervise, a simple registry, message passing, and HTTP interaction.

Rust Async Microservices, Tamed: Rate Limiting, Backpressure, Batching, and Middleware
When traffic surges like a flood, equip your Rust microservices with four gates—rate limiting, backpressure, batching, and middleware—using Tokio + Tower. Keep P99 steady and make speed happen in order.
Rust + Axum Async Microservice Guide: Job Queue, Retries, and Graceful Shutdown
Build a production-ready async microservice with Rust and Axum: job queue, background workers, exponential backoff retries, and graceful shutdown. Includes full project structure and Docker example.

Rust Axum Graceful Shutdown, The Ultimate Guide: Fix the pitfall 99% of engineers hit
Master graceful shutdown for Rust Axum services: listen for SIGINT/SIGTERM, refuse new connections with with_graceful_shutdown, stop background tasks via CancellationToken, set timeouts, and integrate with Docker/Kubernetes termination — protect data integrity and user experience.

Rust + Axum, from zero to hero: build a high‑performance Web server the LEGO way
A step‑by‑step Axum guide to build a modern high‑performance Web service: routing, path and query parameters, JSON, shared state, and middleware (tracing, CORS) with complete code samples and best practices.

Stop treating tokio::spawn as a thread! I launched 1000 tasks in 2 seconds and the system stayed calm
tokio::spawn is not a thread but a lightweight task. Under Tokio’s scheduler you build highly concurrent services with sleep, timeout and select — 1000 tasks in 2 seconds with negligible overhead.

Rust Async State Machine, Unmasked: How Future, poll, and Waker Really Work
A practical deep dive into Rust async: why calling an async function doesn’t run it, how the compiler turns async into a state machine, and how executors drive tasks forward with poll and Waker. Understand the real mechanics behind async/await.

Hands-On Code! Perfect WebSocket + Actor System Implementation - I Pulled Another All-Nighter
Last article too theoretical? Here’s hardcore code to get your Rust distributed system running