OSS TanbouSign in with GitHub

add tracing, compression, timeouts, and other HTTP behavior as Tower middleware

OSS scale score 211.8OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
920
Primary language
Rust
License
MIT
Repository last updated
Oct 3, 2026
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]

Share middleware across frameworks that use the Rust http crate

Tower HTTP uses the http crate as its interface, allowing middleware to work with libraries and frameworks using the same request and response types. The repository includes Axum, Tonic, and Warp examples.

Sources: [2][3]

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.

Sources: [2][4]

Official sources

  1. [1]tower-rs/tower-http — GitHub repository(2026-10-06)
  2. [2]Tower HTTP 0.7.1 — README(2026-10-06)
  3. [3]Tower HTTP 0.7.1 — Axum key/value store example(2026-10-06)
  4. [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. 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. 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. 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
Check the official README

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
Stars
920
Forks
232
Watchers
21
Open issues
40
Contributors
113
Owner type
Organization
Primary language
Rust
License
MIT
Repository last updated
Oct 3, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?