advanced

RDS

Operate managed relational databases with backups, replicas, patching, connection limits, maintenance windows, and failover behavior.

RDS hosts managed relational engines — PostgreSQL and MySQL are common for Node.js backends using Prisma, Sequelize, or TypeORM. AWS handles patching, backups, and Multi-AZ failover; you still own schema design, connection strategy, and query performance.

| Feature | Purpose | |---------|---------| | Multi-AZ | Synchronous standby for failover | | Read replica | Scale read traffic, optional cross-region | | Parameter group | Engine tuning (connections, memory) | | RDS Proxy | Pool connections for Lambda/serverless |

Place databases in private subnets. Use secrets rotation and IAM database authentication where supported. Plan maintenance windows and test restore from automated snapshots.

On interviews: Multi-AZ versus read replicas, connection limits with serverless consumers, failover behavior, and why ORM N+1 queries still hurt on RDS.

Common pitfalls: exposing RDS to the public internet; one shared DB user for all services; no connection pooling with Lambda; treating replicas as instant failover targets for writes.

The trade-off is managed ops and reliable backups versus less tuning control than self-hosted databases and ongoing instance cost.

Checklist:

  • Private subnets and security groups scoped to app tiers.
  • Use RDS Proxy or PgBouncer for bursty Node.js workloads.
  • Automate backups; periodically test restore.
  • Monitor connections, CPU, storage autoscaling, and slow queries.