Rust Programming Language
Guides, benchmarks and product news on reverse proxying, caching, Rust and Linux.
Building a Reverse Proxy in Rust with Axum 0.7, Tower-HTTP and rustls
A hands-on guide to the building blocks of a real reverse proxy in Axum 0.7: serving static files with ServeDir and nest_service, forwarding requests with a hyper HTTP client, terminating TLS with rustls 0.23 and axum-server, and extracting the client's real address with into_make_service_with_connect_info.
Read more →
Graceful Shutdown in Axum and Tokio
Stopping a server correctly is where the subtle bugs live. This article shows how to implement graceful shutdown in Axum 0.7 and Tokio — catching both SIGINT and SIGTERM, draining in-flight requests with a bounded timeout via with_graceful_shutdown and axum-server handles, and cancelling background tasks cleanly on every deploy.
Read more →
In-Memory Caching in Rust with DashMap
The fastest request is the one you never compute. This guide covers DashMap, a sharded concurrent hash map for Rust, why it beats Mutex<HashMap> under load, and how to build a practical in-memory cache with TTL expiry, background eviction, and the same-shard deadlock pitfall to avoid.
Read more →
Rate Limiting in Axum and Tower
Rate limiting protects your service from abuse, floods, and runaway clients. This article builds it into Axum 0.7 — first a token-bucket Tower middleware from scratch keyed on the client IP, then the production-ready tower_governor crate — and explains where in the request path to enforce limits for the most protection.
Read more →
Automatic HTTPS in Rust: Let's Encrypt / ACME with a Dynamic SNI Cert Resolver
Never renew a certificate by hand again. This article shows how to automate the full TLS lifecycle in Rust — driving ACME (Let's Encrypt) with an HTTP-01 challenge, and a dynamic rustls SNI certificate resolver that swaps in freshly issued certs for many domains without ever restarting the server.
Read more →
Building a Blazing Fast HTTP File Server in Rust with Axum in Under 15 Lines of Code
This article demonstrates how to create a simple, high-performance HTTP file server in Rust using the Axum framework and Tower HTTP, all in under 15 lines of code. You'll learn how to serve files from a directory and handle HTTP requests efficiently using asynchronous programming with the Tokio runtime.
Read more →
How to set up an Axum server with SNI configuration to handle TLS connections for multiple domains with rustls?
Learn how to configure an Axum server with Server Name Indication (SNI) to handle TLS connections for multiple domains using rustls. It covers configuring TLS certificates for different domains, setting up SNI in Rust, and ensuring secure connections across multiple virtual hosts.
Read more →