Stop-Start | Restart | Failover

39 views
Skip to first unread message

Rajat Gupta

unread,
Jul 17, 2020, 8:27:57 AM7/17/20
to Google Cloud SQL discuss
Hi, 

How does Stop-Start | Restart | Failover onto a Cloud SQL Postgres instance impact existing connections.
What is the the behavioural difference in these 3 processes.?

Best
Rajat

Confidentiality Notice: 
This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED.  If you have received this transmission in error, please immediately notify the sender. Please destroy the original transmission and its attachments without reading or saving in any manner.

Alexis (Google Cloud Support)

unread,
Jul 17, 2020, 2:20:27 PM7/17/20
to Google Cloud SQL discuss
Hi Rajat,

I will try to answer the best I can.

For "Fail-over", I assume you are talking about "High-Availability" (as listed here[1]). In that case, the fail-over is in another region, this way if the zone fails, it takes over in the other region. The process is mentioned here[2] and it's automatic. There will be about 60secs of unresponsiveness. You must ensure that your web-framework is set to reconnect when connection is lost. Otherwise, the IP and connection string remain the same. You may need to do a failback to go back to normal, as it does not automatically revert.

The restart vs stop/start is almost the same. However, as described here[3], restarting an instance empties the instance cache, which results in a temporary reduction in performance. The connection problems remain the same and how long it takes can vary from a few seconds to a few minutes depending on many factors. The time to boot-up is analogous to creating any instance in GCP, but without configuration time. As for the connection error, it is not listed anywhere (because it depends on your libraries, protocols, etc. But I would assume it a 500. Don't quote me on that), so you would have to test.

Hope this helps.

Reply all
Reply to author
Forward
0 new messages