Amazon RDS
RDS (Relational Database Service) is AWS's managed hosting for SQL databases — PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server — where AWS handles OS patching, automated backups, Multi-AZ failover, and storage scaling. You cannot SSH into an RDS instance; that trade-off is the cost of offloading infrastructure management. Applications manage schema, queries, and indexes as they would with any SQL engine.
Razorpay runs its core ledger on RDS PostgreSQL with Multi-AZ enabled and a 35-day automated backup retention window for point-in-time recovery.
Read Replica vs Multi-AZ
These are frequently confused but solve different problems:
- Read Replica — async replication, serves read traffic, manual failover, scales reads
- Multi-AZ Standby — sync replication, serves zero traffic normally, automatic failover in 60-120s, exists purely for availability
Production systems typically run both simultaneously.
Storage Auto Scaling
Always enable this. Without it, a full disk causes every INSERT and UPDATE to fail immediately; with it, RDS expands storage automatically once free space drops below 10%.
RememberEncryption must be enabled at creation time — it cannot be added to a running instance. To encrypt an existing database, snapshot it, copy the snapshot with encryption on, then restore from that snapshot.
Frequently Asked Questions
What exactly does RDS take off your plate compared to running your own database on EC2?
RDS automates the operational toil around a database server: OS and engine patching (on your maintenance window), daily automated backups with point-in-time recovery, Multi-AZ synchronous replication with automatic failover on primary failure, and storage auto-scaling. You still design schema, write queries, and tune indexes — RDS manages the box the database runs on, not the database itself.
What's a common gotcha teams hit when moving to RDS?
Losing SSH/filesystem access catches people off guard — you can't tail raw log files on disk or install custom extensions that require OS-level access; you're limited to what the engine's parameter groups and RDS-specific tooling expose. Another common mistake: relying on Multi-AZ as a performance feature — it's for availability/failover, not read scaling. Use read replicas separately for that.