But one of my biggest personal surprises with RDS is the lack of cost optimization by its customers. While reserved instances can save 60%+ on the compute cost of operating an RDS instance, on average only 14% of RDS instances run under a reservation. Today we’ll explore how to get increased insight into RDS that will allow you to more cost effectively leverage the service.
Before looking to optimize, it’s important to re-acquaint yourself with Amazon’s RDS pricing. It consists of six major components:
- Compute - Like EC2, RDS has a per hour charge for usage that varies based on the selected instance type.
- Multi-AZ - One of the most compelling RDS features is the ability to have a fully managed high availability deployment. Since multi-AZ support requires an instance running in two different zones, the average compute cost will be doubled.
- Storage - You can choose the amount of storage, and whether it should be provisioned as standard or PIOPS. While PIOPS is more expensive, it can be configured for high performance workloads running at up to 30K I/O operations per second.
- I/O costs - If you configured standard storage, you will be charged an I/O charge for usage of the media. Data transfer - While all data transfer into your RDS instances is free, you will be charged for data transferred out to the internet or to other regions. Depending on your deployment topology, the latter can sometimes be an unexpected charge. You will also receive data transfer charges for snapshots as they are transferred across regions.
- Snapshots - Another benefit of using RDS is the ability to take point in time snapshots of the storage. These are often used to keep a persistent copy of a disk for future use (e.g. if you shut down an instance). But keeping these around beyond the time at which they are useful can result in recurring costs.