« All posts

PostgreSQL Benchmark: AWS RDS vs Self-Hosted Hetzner (2026)

In a 2026 2 vCPU/4GB PostgreSQL 16 benchmark, Hostim led on writes, Hetzner won reads on raw CPU, and RDS trailed once hidden costs are counted.

A 2026 benchmark compared three ways to run a small production Postgres at the same size (2 vCPU / 4 GB, PostgreSQL 16): managed Hostim, AWS RDS, and a self-hosted Hetzner box, all tested with pgbench. Hostim delivered roughly 2.5x the write throughput of RDS and 2.1x that of a stock-configured Hetzner node, mainly due to lower fsync latency on the commit path. On reads, Hetzner's raw per-core CPU speed won outright, while RDS's burstable instance type left it trailing in both write and read tests.

The results also expose how misleading list prices can be. RDS's roughly $48/month covers only the compute instance; storage, IOPS, backups and data transfer are billed separately, and a single storage-tier choice can add around $300/month to the bill. Factoring in high availability changes the picture further: Hostim's €50 already includes automatic failover, RDS's Multi-AZ setup nearly doubles the cost while slowing down writes, and a self-hosted Hetzner setup requires engineers to build and operate failover themselves.

The takeaway for engineers is that raw throughput numbers alone can be misleading, since storage architecture, instance type (burstable vs. sustained), and HA requirements substantially affect both performance and true total cost. Choosing a small production Postgres setup means weighing commit latency, hidden metered charges, and who owns failover operations - not just headline TPS figures.