The content in this blog is provided in good faith by members of the open source community. On top of providing a simpler layer to handle database connections for serverless architectures. To recap, RDS Proxy is a new service by Amazon and still in preview but the results in term of reduced failover times are really promising.
Note that as per the current documentation, the Amazon RDS Proxy preview was free until the end of 2019 only. Of course, as you are likely preserving connections, you might be able to absorb the cost of the proxy itself by running a smaller instance, but that might not be always the case. That is about 8% on top of cost of the Multi AZ instance for the m5.large, and over 20% for the t3.small. Let’s take two popular instances t3.small (1vCPU) and m5.large (2 vCPU): the cost of the Proxy is about 12 USD and 24 USD per month. How is that going to affect your overall RDS costs? The larger the instance running behind the Proxy, the higher the price. What about costs?Ĭompared to other more convoluted AWS models, the pricing structure of RDS Proxy is actually simple: you pay a fixed hourly amount ($0.015 in us-east-1) per vCPU of the underlying database instance, regardless of instance class or other configurations. You can find all the current limitations here.
Those changes include operations such as host replacements, instance renames, port changes, scaling instances up or down, or adding or removing DB instances.” “Currently, proxies don’t track any changes to the set of DB instances within an Aurora DB cluster. It will still be there but will only provide a “MySQL server has gone away” message.ĮRROR 2006 (HY000) at line 1: MySQL server has gone awayĮRROR 1105 (HY000) at line 1: Unknown error You can still trigger a modifying instance on the Multi AZ RDS but the proxy will then not be able to recover after a scaling operation. That means it cannot be used to reduce downtime during a vertical scaling of the instance, which would be one of the main scenarios for the product. And it’s important to note: there is as yet no opportunity to change the instance size or class once the proxy has been created. There is currently no support for RDS PostgreSQL or Aurora PostgreSQL. Main limitations and caveatsĪs of today, RDS Proxy is in public preview and available for RDS MySQL (MySQL 5.6 and MySQL 5.7) and Aurora MySQL. I performed the test a couple of more times to make sure the result was not a one off, but the numbers are pretty consistent and the gap was always significant. I started two while loops against the proxy and against the instance, each retrieving current time from MySQL:įrom a delay of 129 seconds for the “test-rds” instance to 21 seconds for the proxy, it is quite a significant difference. And I set the idle client connection timeout to 3 minutes, a value that should allow us to avoid dropping connections given the expected failover time on the RDS instance.Īnd after a few minutes I was ready to go. I created a new proxy “test-proxy” that pointed to a m5.large Multi AZ “test-rds” instance. So I decided to perform a simple test, using only two terminals, a MySQL client and a while loop in Bash: I wanted to check what happens when I trigger a forced failover (reboot with failover) on a Multi AZ RDS instance running MySQL 5.7.26 behind a RDS Proxy. Failover time can also be affected by whether large uncommitted transactions must be recovered the use of adequately large instance types is recommended with Multi-AZ for best results. “Failovers, as defined by the interval between the detection of the failure on the primary and the resumption of transactions on the standby, typically complete within one to two minutes. What does “reduces failover times by 66%” mean and how can we test it? You can read more about the announcement and the new service on the AWS blog but as the service is already available in public preview, it is time to give it a try.
In case of a failure, RDS Proxy automatically connects to a standby database instance while preserving connections from your application and reduces failover times for RDS and Aurora multi-AZ databases by up to 66%" The new service offers to “ share established database connections, improving database efficiency and application scalability”.īut one of the benefits that caught my eye is the ability to reduce the downtime in case of an instance failure and a failover. At re:Invent in Las Vegas in December 2019, AWS announced the public preview of RDS Proxy, a fully managed database proxy that sits between your application and RDS.