You already scaled rdspg-lab-db vertically in step 3.4: you changed the instance class from db.t4g.micro to db.t4g.xlarge, the throughput of the load test rose from about 337 to about 2,780 transactions per second, and you changed the class back.
This page summarizes what you need to know before you scale up or down in production.
| Change | Downtime | How to reduce it |
|---|---|---|
| Instance class (CPU, memory) | A few minutes, the DB instance restarts | Multi-AZ: RDS changes the standby first, then fails over (about 1 minute) |
| Allocated storage (increase) | None | Storage autoscaling grows the volume automatically |
IOPS and throughput (gp3, io2) |
None | — |
Storage type (gp2 → gp3) |
None, but performance can drop during the change | — |
You can increase the allocated storage, but you cannot decrease it. After a storage change, you must wait at least 6 hours, or until the storage optimization finishes, before the next storage change.
Watch CloudWatch Database Insights for a few days before you choose a smaller instance class. Scale down only when the CPU utilization and the database load stay low, and the database fits in memory.