Cloud Databases & Connection Pooling
Managed cloud databases — AWS RDS/Aurora, Azure SQL Database, Google Cloud SQL — handle backups, failover, patching, and scaling. You pay more per GB than self-hosting, but you eliminate the operational work that consumes engineering time at every scale except very large. Connection pooling is the most overlooked production concern. Every database connection consumes memory on the server (PostgreSQL uses ~5MB per connection). Serverless and containerized apps can open thousands of connections under load, exhausting the database's limit. PgBouncer (for Postgres) or connection poolers built into cloud services (Aurora's RDS Proxy, Neon's built-in pooler) sit between your app and the database, multiplexing many application connections onto a small number of real database connections.