
Health Checks Readiness and Liveness for Rust Services
Liveness says the process is stuck, readiness says it cannot take traffic yet. Implement both in Axum, decide what each checks and avoid the restart loops a bad probe causes.
Axum, Actix and Tower in anger: routing, middleware, APIs, and WebAssembly when the code has to run in a browser.

Liveness says the process is stuck, readiness says it cannot take traffic yet. Implement both in Axum, decide what each checks and avoid the restart loops a bad probe causes.

Accept and return JSON in Axum with the Json extractor and Serde: validate input, set status codes, handle bad bodies and avoid common content type mistakes.

Add structured logs and a request id to every Axum request with tower-http TraceLayer, SetRequestIdLayer and tracing spans that carry the id into your code.

Make every Axum handler return Result with one AppError enum that implements IntoResponse, so the question mark works and clients get consistent JSON errors.

Test an Axum API against a real Postgres started by Testcontainers: one container per test binary, one migrated database per test, the leaks and version traps that bite, and measured timings for each isolation strategy.

Wire Axum 0.8 and SQLx 0.9 into a typed database layer: a pool in state, a db module of compile-time checked queries, one error type, a transaction, offline builds and tests on throwaway databases.

Server sent events push updates from Axum to the browser over plain HTTP. See Sse, Event, KeepAlive, streams from channels, reconnect with Last-Event-ID and proxy gotchas.

Build a chat room over WebSockets in Axum 0.8, using a Tokio broadcast channel to fan messages out, two tasks per socket, size limits and an integration test that drives real clients.

Limit requests per client in Axum with a small middleware, then see when to switch to tower_governor or a Redis counter. Includes fixed windows, token buckets and 429 responses.

Protect an Axum service from slow and oversized requests: TimeoutLayer, DefaultBodyLimit, header limits and what a reverse proxy should add on top.

Handle HTML forms and multipart file uploads in Axum 0.8: Form, Multipart, size limits, content type checks, safe filenames and streaming to disk.

Tower defines Service and Layer, the two traits behind every Axum middleware. See poll_ready, call, how layers wrap services and when to write one.
We send one email when a new post is published. No spam.