Hey, RDS pros! I've recently taken over a workload that uses Aurora MySQL on RDS. I've noticed something strange: my setup has two nodes (one reader, one writer), but the reader isn't getting any traffic—it's just sitting there with high memory and low CPU usage (only 9%). The proxy is set up with one endpoint for both reading and writing, yet it doesn't seem to balance the load as expected. I'm looking for advice on how to better utilize the reader. Should I:
1) Create a new proxy endpoint just for read-only queries and tell the developers to use that for SELECT operations?
2) Set up a second proxy with the 'Add reader endpoint' option enabled and guide developers to use that for SELECT queries? What do you think would work best?
3 Answers
I get your worry about failover—which is a valid concern. But don't fret too much! Aurora automatically manages this for you with its writer and reader endpoints. When a promotion occurs, your application just needs to be aware of potential dropped connections. Implementing logic to handle reconnects or errors is key. Check out the AWS docs for more info on how these endpoints work.
You're right that you can't balance writes. If your transactions need both read and write capabilities, they have to go to the writer. The ideal setup would have the RDS proxy configured with distinct endpoints directing to both reader and writer instances. Just make sure your code uses the right endpoint depending on whether it's a read or write operation.
Remember that a proxy isn't a load balancer—it's more like a funnel for your requests. If your proxy is only being used for read operations, it might be better to set up a dedicated read endpoint. However, if your workload also needs to write, the existing setup isn't necessarily a problem unless you really need to separate everything out.
Related Questions
Fix Not Being Able To Add New Categories With Intuitive Category Checklist For Wordpress
Get Real User IP Without Installing Cloudflare Apache Module
How to Get Total Line Count In Visual Studio 2013 Without Addons
Install and Configure PhpMyAdmin on Centos 7
How To Setup PostfixAdmin With Dovecot and Postfix Virtual Mailbox
Dovecot Error Unknown database driver mysql