Is Google Cloud SQL high availability really improving reliability?
Asked Answered
N

2

11

I want to create a Google Cloud SQL instance but I am not sure about choosing high availability or not.

From what I understand the failover switch can take a few minutes, it is not instantly done, and the cost is roughly 2x the cost of a regular instance.

The failover is triggered only in case of zone outage, not in case of db issues. Since the monthly uptime is 99.95 at least, that makes an outage possibility of 21mins per month maximum. A failover can take up to 5 mins, and we can suppose the 21minutes downtime is not happening on a single event, therefore is there a real need to subscribe to High Availability?

Namedropping answered 27/1, 2017 at 10:25 Comment(1)
Keep in mind that "SLA" just means that they will refund you if the downtime exceeds the agreed upon value. Choosing HA or not depends on how much your business suffers due to downtime.Atheistic
A
12

A full zone outage is probably quite rare, so if you don't care about it, an HA instance might indeed not be needed.

One advantage of HA is that failover can be faster than restart. We've experienced cases when the primary instance gets "stuck" and a restart would take up to 30 minutes (GCP ticket). In such cases it's faster to failover to an HA instance.

(Before October 2019, HA failover instances could also be used for read queries, and thus avoid the need for an additional read replica. With the change from binlog-based replication to disk-based replication this is not the case anymore.)

Axiomatic answered 2/5, 2018 at 8:48 Comment(4)
"You can use the HA instance as a slave" I don't think this is true. The HA instance is on standby. You cannot use it as a slave. Happy to be corrected with documentation citation...Pedaias
I'm using an HA instance as a read replica (slave) currently. It has a separate IP address and you can connect to it with a mysql client. Check the visualization on this page for example: cloud.google.com/sql/docs/mysql/high-availabilityAxiomatic
As I read this (March, 2020), the HA replica can NOT be used as a read-only replica. Documentation says Note: The standby instance cannot be used for read queries. This differs from the Cloud SQL for MySQL legacy HA configuration.Paving
True, it seems the new failover setup is now using disk-based replication instead of binlog-based replication, and doesn't allow for read-queries anymore. I will update the answer.Axiomatic
J
1

HA Failover is not just for a full zone outage. It kicks in whenever the primary instance stops responding for more than a minute.

The fact that it is quicker than a restart, more reliable than a restart, and automatic means it keeps your outages much shorter when mysql crashes.

Also, don't you need HA for the SLA to apply, without HA you're not multizone, and therefore you can't meet the defintion of "Downtime"

"Downtime" means (ii) with respect to Cloud SQL Second Generation for MySQL, Cloud SQL for SQL Server, and Cloud SQL for PostgreSQL: all connection requests to a Multi-zone Instance fail. https://cloud.google.com/sql/sla

Jackiejackinoffice answered 8/9, 2020 at 22:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.