NGINX0.2 CPU · 20MB
Rinha de Backend 2024/Q1 · Rust execution lane
Blazingly fast.
Eventually compiled.
A compact Rust banking API built for brutal limits: two Actix workers, one NGINX balancer, PostgreSQL stored procedures, and a full k6 evidence trail.
Rust 1.94Actix-web 4SQLx 0.8PostgreSQL 16
Challenge budget
1.5 CPU and 550MB RAM, fully accounted for.
The homepage now leads with the constraint that makes the implementation interesting: every service earns its share of a tiny resource envelope.
CPU share Memory share
API 10.4 CPU · 100MB
API 20.4 CPU · 100MB
PostgreSQL0.5 CPU · 330MB
Runtime topology
NGINX feeds two Rust workers. Postgres owns the transaction law.
NGINX:9999least_conn
webapi1-rust:80800.4 CPU · 100MB
webapi2-rust:80800.4 CPU · 100MB
PostgreSQLstored proceduresInsertTransacao() · GetSaldoClienteById()
Implementation proof
Small surface, hard edges, measurable behavior.
single-file API surface
compile-time query cache
write path tuned for throughput
balances both API workers
Evidence archive
Stress reports stay inspectable.
The archive is treated like audit material: latest run first, every artifact linked, and the CI workflow one step away.