On this page
Overview
Tower HTTP is a collection of Tower middleware and utilities for Rust HTTP clients and servers. It adds tracing, compression and decompression, redirects, timeouts, static-file services, and other HTTP-specific behavior to Tower Service stacks.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Add tracing, compression, decompression, and redirects around HTTP traffic
The README highlights Trace, Compression and Decompression, and FollowRedirect as common middleware. Cross-cutting HTTP behavior can live in Layers instead of application handlers.
Sources: [2]
Best fit
Fits Axum and Hyper backends centralizing common HTTP policy
It is useful for separating logging, timeouts, compression, sensitive-header handling, and similar concerns from routing and business logic while reusing a consistent stack across services.
Sources: [3]
Before adoption
Review MSRV and static-file or decompression changes during upgrades
The README documents Rust 1.65 as the MSRV. Version 0.7.1 changes some ServeDir filesystem error behavior and fixes range and decompression handling, so services using those modules should run regression tests when upgrading.
Official sources
- [1]tower-rs/tower-http — GitHub repository(2026-10-06)
- [2]Tower HTTP 0.7.1 — README(2026-10-06)
- [3]Tower HTTP 0.7.1 — Axum key/value store example(2026-10-06)
- [4]Tower HTTP 0.7.1 release(2026-10-06)
Supplemental curator note
Tower HTTP reduces repeated cross-cutting HTTP code by packaging tracing, compression, timeout, and related behavior as Tower middleware. Enable only the modules you need and review release behavior carefully when static-file serving is involved.
Try it in 3 steps
- 1
Clone the reviewed Tower HTTP release
Clone the reviewed Tower HTTP 0.7.1 tag. A Rust toolchain with Cargo is required.
git clone --depth 1 --branch tower-http-0.7.1 https://github.com/tower-rs/tower-http.git && cd tower-http - 2
Start the Axum key/value store example
Start the official example with tracing enabled. It combines Tower HTTP tracing, timeouts, compression, and header middleware and listens on port 3000 by default.
RUST_LOG=axum_key_value_store=trace,tower_http=trace cargo run --bin axum-key-value-store - 3
Exercise the POST and GET flow
From another terminal, store and retrieve a value and inspect both the response and Tower HTTP trace output.
curl -fsS -X POST --data 'hello' http://127.0.0.1:3000/demo && curl -fsS http://127.0.0.1:3000/demo
Growth
Growth trends · Last 30 days
920 Stars
Trend data is still being collected.
Built with
Categories and tags
GitHub data
GitHub dataView detailed GitHub data
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Axum27,382 Stars
4 shared tag(s) · 1 shared category(s) · Same language
build Rust HTTP APIs with routing, extractors, and Tower middleware
Rust - Actix Web24,855 Stars
3 shared tag(s) · 2 shared category(s) · Same language
build high-performance HTTP APIs and WebSocket services in Rust on the Tokio async ecosystem
Rust - async-graphql3,682 Stars
3 shared tag(s) · 1 shared category(s) · Same language
build type-safe GraphQL schemas, resolvers, and subscriptions in Rust
Rust - aiohttp16,569 Stars
3 shared tag(s) · 1 shared category(s)
build asyncio HTTP clients, servers, and WebSockets with one Python framework
Python - Loco9,397 Stars
3 shared tag(s) · Same language
bootstrap Rust backends with Rails-style conventions, generators, ORM, jobs, and storage
Rust - Lapin1,237 Stars
2 shared tag(s) · 3 shared category(s) · Same language
connect Rust services to RabbitMQ over AMQP 0-9-1 with runtime-agnostic async APIs
Rust
Report incorrect information
Tell us if any listing information is incorrect or outdated.