Search code examples
google-cloud-platformgoogle-cloud-sqlhigh-availabilityread-replication

What happens to Cloud SQL replicas on a restart/failover or instance increase


I have a highly available PostgreSQL instance on google cloud. Also there are some read replicas set for this database.

In case of upgrading the Cloud SQL instance and adding more cores and memory a restart is needed.

What will happen to the Read replicas, will they continue to serve requests as the upgrade takes place? As far as I am aware the read replicas should have the same specs with the original database. Are they going to be restarted and upgraded? If not is upgrading the read replica a manual process?


Solution

  • What will happen to the Read replicas, will they continue to serve requests as the upgrade takes place?

    In case of an upgrade a restart is needed for your CloudSQL master instance, your Read replica will remain untouched and it will continue serving the dedicated requests (different than masters).

    What will happen to the Read replicas, will they continue to serve requests as the upgrade takes place? As far as I am aware the read replicas should have the same specs with the original database. Are they going to be restarted and upgraded? If not is upgrading the read replica a manual process?

    About Read Replicas specs, master and read replicas must have the same capacity, thus you are only able to change master's capacity which will change also the capacity of the read replicas.

    Although this is not the case on the Machine Type (CPU & Memory). You can change CPU and Memory on your read replicas manually as much as you want, but your master instance is able to upgrade memory and CPU until the lower specs of your read replica. So, the master instance is following the smaller read replica.

    Take into consideration also Google's documentation for requirements and tips for replication