3 ms·
My understanding is that there are two VMs running in different zones within the same region, the primary, and a failover. Instead of writing to a zonal disk (t
by dantiberian 9y ago
My understanding is that there are two VMs running in different zones within the same region, the primary, and a failover. Instead of writing to a zonal disk (the standard behaviour for a non-HA Cloud SQL instance), the primary's writes go to a new Regional Disk. The regional disk is replicated synchronously between two zones, rather than writes going to a single zone.
The obvious question you're having here is "Won't that be slower?" and the answer is yes it will necessarily be slower due to physics. However on the Google Cloud public Slack (https://gcp-slack.appspot.com https://gcp-slack.appspot.com), it was mentioned that networking for zone to zone is similar to machine to machine, so this is likely to not be an issue.
If the primary instance fails (either because of machine/rack/zone failure), it will stop sending heartbeats and the failover will try to mount the regional disk and become the primary. Because all writes are synchronously replicated, no data loss occurs, although your service will be unavailable until failover completes.
> Their mention of replication makes it sound like they are behaving similarly to RDS' Aurora instances
I don't think anything this fancy is happening, to my understanding it is just a disk that happens to be synchronously replicated to two zones. Under the covers they may be doing some smart copy-on-write stuff, but that isn't exposed to the user.
From the sound of the blog post they plan to unveil regional disks sometime soon, so we may get more info then.
- ngrilly 9y ago> From the sound of the blog post they plan to unveil regional disks sometime soon, so we may get more info then. Someone from Google confirmed this in a comment: "Regional Disks will first be used by managed services like Cloud SQL, but watch for a future announcement about Regional Disks as a public feature".