https://cloud.google.com/compute/docs/disks#repds
Regional persistent disks provide synchronous replication for workloads that might not have application-level replication.
If the VM crashes after disk writes but before an fsync
, is that data lost?
When is a disk write replicated to the replica disk in another zone?
Note: The VM OS is the default Ubuntu, with the default file system.
Data that are written to the regional persistent disk are replicated to another zone.
Answering your question - after the
fsync
.Whatever remains in OS or your application buffer is not replicated - hence in the event of an zonal outage this data will be lost so you have to put that into cosderation when you design you application.
Quoting @John Hanley: