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 Answer 1

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. Jan 23, 2016 at 19:19
  • I'm an engineer on the Cloud SQL team.
    – Vadim
    Jan 23, 2016 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. Jan 23, 2016 at 20:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .