Andrew James 4454a766ee [rust/axum] Axum performance improvements (#9484) 9 months ago
..
src 4454a766ee [rust/axum] Axum performance improvements (#9484) 9 months ago
templates 472e245199 Rust Axum using sqlx 3 years ago
.gitignore dc7a3d11ad Update axum to 0.6.1 and update other packages (#7784) 2 years ago
Cargo.lock 4454a766ee [rust/axum] Axum performance improvements (#9484) 9 months ago
Cargo.toml 4454a766ee [rust/axum] Axum performance improvements (#9484) 9 months ago
README.md 4454a766ee [rust/axum] Axum performance improvements (#9484) 9 months ago
axum.dockerfile 4454a766ee [rust/axum] Axum performance improvements (#9484) 9 months ago
benchmark_config.json 992475cec3 Axum perf improvements (#9379) 11 months ago
config.toml 44a869e49f feat: upgrade axum & dependencies, refactor, and add code and build optimisations (#9237) 1 year ago
run.sh 13f1dc7c4f Rust axum optimizations (#6939) 3 years ago
rustfmt.toml 307a0ff45a Rust Axum using sqlx and bb8 3 years ago

README.md

Axum

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: