0

I have created db instance in google cloud sql. After it was created, With the ip address assigned to it, my java servers are able to communicate with it in both read and write.

Now i created a failover replica and read replica of the db instance. As i am checking on dashboard two new instance of db got created with their respective ip addresses.

My understanding is my java servers need not to worry about the ip addresses of replica and failover replica. And will communicate with master db instance only. Read requests will automatically gets routed to slave from their only and similar to happen with failover replica.

Is my understanding is correct? Or is it my java servers responsibility to create individual read connection with the ip of slaves.

Please suggest the behaviour.

1

If you want to spread reads to replicas, you will need to establish connections directly to the replicas. This won't happen automatically.

3
  • Okays seems like a correct answer. Just waiting for the google support to answer for the same. Will update with what alternatives then we have here. – Rohit Sharma Jan 23 '16 at 19:19
  • I'm an engineer on the Cloud SQL team. – Vadim Jan 23 '16 at 20:04
  • Great then. I didn't got answer on the support ticket for this though. Would b e great if have this feature on cloud sql in future. – Rohit Sharma Jan 23 '16 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.