问题
Scenario:
- I have two reader-aurora replicas.
- I make many calls to my system (high load)
- I see only one replica working at 99.30%, but the other one is not doing anything at all
Why?, is because this second replica is ONLY to prevent failures of the first one?, cannot be possible to make both to share the load?
回答1:
In your RDS console, you should be able to look at each of the 3 instances
- aurora-databasecluster-xxx.cluster-yyy.us-east-1.rds.amazonaws.com:3306
- zz0.yyy.us-east-1.rds.amazonaws.com:3306
- zz1.yyy.us-east-1.rds.amazonaws.com:3306
If you look at the cluster tab you will see two end points and the 2nd is the following: aurora-databasecluster-xxx.cluster-ro-yyy.us-east-1.rds.amazonaws.com
Aurora allows you do either explicitly get to specific read replica. This would allow a set of read only nodes for OLTP performance and another set for data analysis - with long running queries that won't impact performance.
If you use the -ro end point, it should balance cross all read only nodes or you can have your code take a list of read only connection strings and do your own randomizer. I would have expected the ro to be better...but I am not yet familiar on their load balancing technique (fewest connections, round robin, etc)
来源:https://stackoverflow.com/questions/41655456/aws-aurora-replicas