Description
Axum is a web application framework that focuses on ergonomics and modularity,
built with Tokio, Tower, and Hyper.
Variants
- PostgreSQL using
SQLx
, tokio_postgres
, and deadpool
.
- MongoDB with
mongodb
.
Test URLs
Notable Points (both performance and build)
- Use of
async
.
- Use of the most recent versions of Rust,
axum
and dependencies.
- (Disabled by default) Compile-time swap-in of
simd-json
instead of serde_json
for faster JSON serialization.
- Release binaries are stripped and compiled with CPU native.
- Sockets configured with
TCP_NODELAY
and to support an increased number of pending connections.
- For very simple benchmarks, use of a separate, single-threaded Tokio runtime for each thread.
- Server configured to serve HTTP/1 only, with no need for websockets.
- Separation of build and deployment containers using multi-stage builds.
- Deployment into Google's minimal
distroless-cc
container.
- Use of pipelined database queries (where supported).
- Streaming database queries (where supported).
- Use of PostgreSQL prepared statements cache (where supported).
- Use of PostgreSQL arrays to execute multi-row database updates with a single
UPDATE
query.
- More performance improvements are to be expected in version 0.8: