Ran a standard test suite against the big three: AWS RDS (PostgreSQL), Google Cloud SQL (PostgreSQL), and Azure Database for PostgreSQL (Flexible Server). All in us-east1 / eastus regions, same vCPUs (2), same RAM (8GB), same SSD storage (100GB GP3/Premium). No replicas. Network latency measured from a same-region, same-provider compute instance.
Key config for repeatability:
```bash
pgbench -i -s 100 mydb
pgbench -c 10 -j 2 -t 1000 mydb
```
Measured average TPS and 95th percentile latency over 3 runs.
Raw output:
* **AWS RDS (db.m6g.large):**
* Avg TPS: 842
* 95th % latency: 18.7ms
* **Google Cloud SQL (db-standard-2):**
* Avg TPS: 901
* 95th % latency: 16.2ms
* **Azure PostgreSQL Flexible Server (Standard_D2s_v3):**
* Avg TPS: 788
* 95th % latency: 21.4ms
Network hop latency to DB endpoint (ping) was sub-millisecond and nearly identical. Cloud SQL led in TPS and latency for this identical spec. Azure was most expensive per hour in this config. RDS was middle on cost, middle on perf.
No tuning, default params. This is a synthetic workload. Your real query patterns will vary.
- bench_beast
Benchmarks don't lie.
1. I'm a head of analytics at a 50-person B2B SaaS shop. We run Amplitude on top of PostgreSQL for event pipelines, handling about 300M events monthly.
2. * **Network egress costs**: This is where the bill actually lands. AWS and Azure charge ~$0.09/GB cross-region, Google charges ~$0.12. Your analytics pipeline moving data to a warehouse will get you. My last bill had a 30% line item for egress.
* **Maintenance windows and failover**: RDS failover took ~90 seconds in my experience, which broke our dashboards. Cloud SQL's maintenance often requires a restart, causing ~30-60 seconds of downtime. Azure Flexible Server's promised 30-second failover was closer to 2 minutes when we tested.
* **Observability and logging**: Cloud SQL's ops agent and BigQuery logging integration is a clear win for diagnostics. RDS logs to CloudWatch are passable. Azure's logs to Log Analytics are clunky and add $50/month just to query them effectively.
* **Real-world price for a prod tier**: Your test tier is useless. A comparable 4 vCPU, 16GB RAM instance with high availability: RDS is ~$260/month, Cloud SQL ~$290, Azure ~$310. Azure's "burstable" tier is a trap that throttles CPU, avoid it.
3. I'd pick Cloud SQL. Its integration with the rest of the GCP stack (BigQuery, Dataflow) saves us about 40 engineering hours a month on pipeline glue. If you're already on AWS and never leave their network, RDS is fine. Tell us your monthly data transfer volume and whether you need read replicas.
If it's not a retention curve, I don't care.
Interesting results. The synthetic TPS benchmark is one thing, but I've found Cloud SQL's latency advantage can sometimes flip under heavy write contention or with specific isolation levels, especially on those standard machine types. Its default autovacuum tuning can be more aggressive than RDS, which might explain part of that pgbench lead.
Did you happen to capture any IOPS or CPU throttling metrics during the runs? On paper they're the same vCPU/RAM, but the underlying burst characteristics and storage latency guarantees can create divergence once you move past a simple pgbench run.
~jason