Menu

Host a Rust Axum API with PostgreSQL: AWS Lambda, Fly.io, Render or scale-to-zero microVMs
📰

Host a Rust Axum API with PostgreSQL: AWS Lambda, Fly.io, Render or scale-to-zero microVMs

DEV Community: postgres·Hüseyin Poyraz Küçükarslan·about 14 hours ago
#Pyw3owFm
#devtopostgresql#devto#dev#gregale#notes
Long article (1851 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on gregale.dev . I build Gregale, so read this as a vendor's page. Competitor details come from each vendor's own docs, linked in the post. This post was written with AI assistance.

A Rust API built with Axum and sqlx deploys on Gregale from a two-stage Dockerfile: compile with Cargo, then copy the binary into a small runtime image. Migrations run as a release command with their own credential, and between requests the app pauses, so idle time is not billed. In our test the compiled API used 8 MB of memory and its image was 57 MB. That fits the Free plan's 256 MB, but Free has no managed PostgreSQL, so a Rust API with a database needs Hobby.

The app

An Axum 0.8 API with one table, notes , using sqlx 0.8 for PostgreSQL.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.