0

i have a mysql statefulset, database on Kubernetes cluster.

mysql-clusterip----> mysql-0(master)<------(mysql-headless-svc)

mysql-clusterip-----> mysql-1(read replica)

mysql-clusterip-----> mysql-2(read replica)

so i have 2 endpoint mysql-0.mysql-headless-svc for writting to the master only, and mysq-clusterip for read request to the all the sts pods.

now how do i configure the backend?do i initiate 2 database connection depending on the request comming?i guess this is not efficient process.

i was thinking about proxysql but i can not find any good documentation which explains me this thing nicely.what is the production grade strategy?enter image description here

kif
  • 43
  • 4

0 Answers0