Has anyone figured out how to scale Amazon RDS read replicas?

后端 未结 4 463
离开以前
离开以前 2021-01-31 20:57

I\'ve recently set up a read replica to take some of the read load off of my Amazon multi-AZ RDS instance. The Amazon documentation clearly states that it is \"up to your appli

4条回答
  •  走了就别回头了
    2021-01-31 21:21

    I think HAProxy would be a good option to load balance among multiple read replicas. You can have a config something like this:

     listen mysql-cluster 0.0.0.0:3306
         mode tcp
         balance roundrobin
         option mysql-check user root
    
         server db01 x.x.x.x:3306 check
         server db02 x.x.x.x:3306 check
         server db03 x.x.x.x:3306 check
    

    where x.x.x.x is the replica endpoint.

提交回复
热议问题