3
votes

I was reading through the AWS RDS documentation, and found out that there are a multitude of endpoint options that can be used when connecting applications to an Aurora cluster. You can connect through the cluster endpoint, primary endpoint, or to a replica endpoint.

My question is, if I use the cluster endpoint, will I be able to take advantage of read scaling or is that only going to hit the primary instance for reads?

If that doesn't work, I guess the alternative would be to randomly select a read replica when doing a read, or have a load-balancer in front of the replicas and just use it's address for reads.

Please advise as to what is the correct approach if the cluster endpoint doesn't scale read work loads. I am using an ORM framework that will control data access interaction with the Aurora DB cluster.

3

3 Answers

1
votes

I just recently had the same question and found that Amazon designed Aurora to only scale reads by using multiple read endpoints. The cluster endpoint points to the primary instance and appears to be the only way to write to the aurora instance. You'd have to split the request types in the application or it may be possible to accomplish something like this with a proxy.

Docs: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Connect.html

The cluster endpoint connects you to the primary instance for the DB cluster.

0
votes

You can use read endpoints to load balance read connections between Aurora replicas. Be aware that this only load balances the connections and not queries. Balancing queries would be the responsibility of your application.

As a bonus, if you use read endpoints and have multiple replicas in different availability zones then AWS will failover your read connections in the event of an AZ failure.

0
votes

You can now connect to all the read replicas on your Amazon Aurora cluster through a single reader end point. Until now, you could use the cluster end point to connect to the primary instance in the cluster or instance end points to direct queries to specific instances on your Aurora cluster.

Reader End Point for Amazon Aurora