Wednesday, April 17, 2019

[google-cloud-sql-discuss] Re: Cloud SQL Postgres Read Replicas

Your questions concerning the connection process to read replica instance, depends on how you connect to the instance, you will have to connect to a specific read replica with the appropriate methods discussed in the link above. Additionally, Cloud SQL does not provide load balancing between replicas. You can find a detailed list of operations for configuring replication here. I thought it'd be worth while to explain the concept of read replicas as this information can assist you when deciding whether using a read replica or failover replica is appropriate in your use case.


The idea behind read-replica is to provide some sort of scaling-out for your data. This is done by allowing read operations such as SELECTS on the replica. While other write operations such as UPDATE/INSERT/DELETE occur on the master instance. Due to this, read replicas are designed to provide scalability and not high-availability. If high-availability is what you are seeking you will need a failover replica instead. The failover replica will automatically promote itself to be the master and retain the original master IP. You may explore the benefits of high-availability here.


In regards to read replicas, if your master instance experiences downtime, you have the ability to promote the read replica to be the master. However, this is a manual process and will not be done automatically. In the event this occurs, you may find the appropriate steps to do this here.


I hope this helps!


On Tuesday, April 16, 2019 at 9:30:59 AM UTC-4, Gustavo Piucco wrote:
When I create a read replica I need to worry about connecting to the instance within my application? Is the connection string still the same? Is the load balancing for read replicas done automatically?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/817a7494-a250-4fed-a887-d76397e9513c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment