3

In AWS RDS Aurora Serverless v2, I can create a custom endpoint in Regional Cluster for Writer Instance and Reader Instance, but I was wondering is there any load balancing if I doing this way?
Thanks

Alvin
  • 31
  • 4
  • From what I understand, the recommendation is you only connect to the writer endpoint for write operations. Since you tagged this as aurora, when you connect to the aurora cluster reader endpoint that is load balanced across all read replicas you have, but not the write replica, though I may be wrong about that. I don't think there's an endpoint that loadbalances across both read-only and read-write endpoints – apokryfos Sep 06 '22 at 04:43
  • yeah, does not make means if can load balance for read-only & read-write. If that the case, then why aws is allow to create custom endpoints for both? I could not find any documentation related to these. – Alvin Sep 06 '22 at 06:58
  • https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.Endpoints.html#Aurora.Overview.Endpoints.Types would be that documentation. – apokryfos Sep 06 '22 at 11:01
  • thanks, read through that too. Seems like not recommend by them, but still allow. Anyway, thanks – Alvin Sep 07 '22 at 08:25

1 Answers1

0

Yes, it only makes sense to connect to the custom endpoint to do read-only sorts of things. For the writer instance, the idea is that you don't know ahead of time if an instance will be a writer or a reader. (Because an automatic or manual failover could happen at any time.) So the writer instance can't really be prohibited from being part of a custom endpoint.

For example, if you made a custom endpoint e.g. with a few x2g instances to do queries that required lots of memory, when you connected you might find that one of the instances in that custom endpoint was now the writer. But the point of connecting to the custom endpoint would still be to do SELECTs, which you can guaranteed do with either kind of instance.

Max Webster
  • 181
  • 6