Ameba's Aurora MySQL cost cut in half after switching to I/O Optimized
#SRG(Service Reliability Group) mainly provides cross-sectional support for the infrastructure of our media services, improving existing services, launching new ones, contributing to OSS, etc.
This article summarizes how we were able to reduce our database costs by about half by using Aurora I/O Optimized.
I hope this helps in some way.
First, the results of switching on AmebaWhat is Aurora I/O Optimized?Use Cost Explorer to see if switching to I/O Optimized is worth itCalculation results under tentative conditionsDisplaying the I/O cost breakthrough point using Datadog graphsSwitch to I/O OptimizedConclusion
First, the results of switching on Ameba
At the end of October, we switched the Aurora MySQL cluster used by one of Ameba's microservices to I/O Optimized.
Below is a graph showing the costs for the Aurora MySQL cluster over the last four months.

We can see that the cost in November is half the cost from August to October.
What is Aurora I/O Optimized?
This is the new pricing structure for Aurora cluster storage announced by Amazon in May 2023.
How to UseAurora MySQL version 3.03.1 or laterMust be a version of
Aurora's standard pricing structure involves the following three costs:
I/Oオペレーション量の費用
I/O costs are charged per million requests, making it difficult to estimate the exact cost in advance.
By switching to Aurora I/O Optimized, we will no longer incur I/O charges, allowing us to provide a more accurate estimate.
In addition, costs can be optimized by switching currently running clusters that have high I/O costs.
RDS Aurora pricingHere are some excerpts from the specs:


Since there is no I/O charge, the instance and storage costs are set at a premium.
の増額)
As mentioned on the release page for this feature, it is important to note that if you apply I/O Optimized to an Aurora cluster that does not have a lot of I/O, the cost may actually be higher.
Use Cost Explorer to see if switching to I/O Optimized is worth it
You can use Cost Explorer to determine whether you should switch your running cluster to I/O Optimized.
First, you can use Cost Explorer's cost allocation tags to see the charges for each cluster by setting appropriate tags.
Next, open Cost Explorer and set the filter menu on the right as follows:
Date range:The period you want to compare
Particle size:By month
dimension:Usage Type
service:Relation Database Service(RDS)
tag:[Name tag of the cluster for which you want to check the cost]

By applying this filter, you will see a graph like the one below, where you can see the amount and breakdown of your RDS costs.

Additionally, you can use the “Usage Type” filter to narrow down storage-related usage fees for Aurora in the Tokyo region.
APN1-Aurora:StorageIOUsage(IOs)
APN1-Aurora:StorageUsage(GB-Month)

The charges shown here are I/O charges and storage usage charges.
If I/O charges make up a larger percentage of your overall RDS bill, you may want to switch to Aurora I/O Optimized.
Calculation results under tentative conditions
Since I cannot provide the cost for the actual environment, I made an estimate using Aurora MySQL under the following conditions.
Region | Tokyo Region |
---|---|
Instance type | db.r6g.xlarge |
Number of units in operation | 3 units |
Cluster Storage Usage | 500GB |
Overall average monthly RDS cost | 3,300 USD |
Of that, the average monthly I/O charge | 1,900 USD |
RDS instance price list for the corresponding specifications
Standard rate (per hour) | I/O Optimized (per hour) | |
---|---|---|
r6g.xlarge | 0.627USD | 0.815USD |
RDS Storage Pricing
Standard fee (monthly) | I/O Optimized (monthly) | |
---|---|---|
Storage Fees | 0.12USD / GB | 0.27USD / GB |
In this cluster3,300 USD per monthThis incurs RDS costs,Of that, 1,900 USD is I/O feeThat is the assumption.
If you switch this to I/O Optimized, the calculation is as follows:
The price for I/O Optimized for db.r6g.xlarge is $0.815 per hour, so the total cost for three units will be $1,760, as calculated below.
The 500GB of storage usage costs $60 based on the I/O Optimized storage rate of $0.27/GB.
The combined cost of the instance and storage comes to $1,820.
Since it is I/O Optimized, the price includes I/O charges.
In other words, in this scenario, by switching to I/O Optimized,
The RDS fee, which was 3,300 USD per month, can be reduced to 1,820 USD per month, resulting in a savings of 1,480 USD per month.
We were able to calculate the following.
Displaying the I/O cost breakthrough point using Datadog graphs
Nakajima-san, who wrote an article on Mob Cost Analysis in the CA SRE Advent CalendarHe taught me how to display the monthly I/O volume and the cost break-even point for I/O Optimized on a Datadog graph.
In this graph example, we assume a configuration of three db.r6g.large servers with one year of reserved instances paid in full upfront.

In this example, for the I/O volume over the past month, it would be cheaper to switch to I/O Optimized.
On the other hand, if the results are as shown in the graph below, it would be more expensive to switch to I/O Optimized.

This graph can be reproduced by editing the following JSON appropriately.
For the part below where the cost break-even point is drawn, you will need to calculate the monthly instance fee for your cluster yourself.
Switch to I/O Optimized
You can change this on the configuration screen of the target RDS cluster from the console.

Standard is currently selected, so select "Aurora I/O Optimization" and apply it.
This change can essentially be applied online with no downtime.
Other points to note are as follows:
スタンダード から I/O Optimizedへの変更は30日間に1回まで
I/O Optimized から スタンダードへの変更はいつでも可能
NVMeベースのDBインスタンスの場合はダウンタイムが伴う再起動が必要な場合がある
Please see the official documentation for more information.
Conclusion
Ameba has been working on upgrading to Aurora MySQL version 3 since last year, and by completing the upgrade, we were finally able to take advantage of Aurora I/O Optimized.
In this case, we were able to halve the cost, but the effect will vary depending on your I/O usage, so please try it out in your own environment!
SRG is looking for people to work with us. If you are interested, please contact us here.