By using AWS re:Post, you agree to the Terms of Use
/RDS - Read/Write Replica Loadbalancing/

RDS - Read/Write Replica Loadbalancing

0

Hi All,

We've identified that our RDS Aurora (Postgresql-13.6) cluster is a key bottleneck in our application's performance. Until we can rearchitect the code, we were hoping to try and mitigate some of this through infrastructure changes.

We're going to add additional read replicas to help reduce the amount of calls and hopefully allow more parallel processing to take place.

I'm having trouble pinpointing if there's a way to use a single endpoint, as we do now with our single write instance, and through some AWS feature have the queries be routed properly to the read and write instances based on the type of query. As opposed to making code changes where we have two sessions, one for read and one for write. I assume there must be a way but I can't seem find an exact answer.

If someone can post relevant documentation for me to review, that would be perfect, thank you!

1 Answers
0

Hi, unless someone comes up with a better answer, here's my take on this: To my knowledge there's no AWS feature that routes queries to different endpoints depending on query type.

If you were using the MySQL engine, ProxySQL would likely be a solution to your needs. I'm not aware of a similar solution for PostgreSQL. crunchy-proxy comes close, but it requires you to annotate at least the read-only queries - which means that you would have to touch your application code, which you wanted to avoid. But the changes you'd have to make are far less complicated than implementing different connection handling for reads and writes, so maybe it is viable for you.

answered 16 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions