Distributed Filesystem Replication Across Cloud Availability Zones
Synchronous replication across zones protects acknowledged writes from zone failures.
Sponsored by Archil

How distributed filesystem replication works across cloud availability zones decides whether a persistent agent environment keeps its state when a failure hits. The deciding factors are not the number of copies alone, but when writes become durable, how recovery works, what concurrent readers see, and whether checkpoints and forks share those guarantees. A “persistent” label is not a disaster recovery plan.
What availability zones actually are and why the boundaries matter for storage
An availability zone, or AZ, is a physically separate group of datacenters within a region, with independent power, cooling, and networking. A region contains zones, and a zone contains datacenters, so those boundaries describe different scopes of failure. A zone failure is a localized physical event. Resources pinned to that zone go down with it, while zone-redundant resources are designed to keep serving.
Azure Well-Architected Framework distinguishes zonal, or pinned, deployments from zone-redundant deployments. It also distinguishes synchronous replication from asynchronous replication, which describe how data moves between locations. Those distinctions matter because a copy somewhere else is useful only if it contains the state needed after the failure. The hard case is a zone disappearing mid-write, when the storage system must distinguish completed work from work that never became durable.
How synchronous replication works and what it guarantees during a zone failure
Synchronous replication makes acknowledgment the boundary between those two outcomes. Each place where the write must go has to acknowledge it before the write as a whole is complete. If a zone goes dark before it can acknowledge the write, the write blocks instead of reporting success with replicas still missing. The system does not get to call the job finished because most of the moving vans arrived.
Azure Storage redundancy docs specify that ZRS copies data synchronously across three availability zones in the primary region. A write request is not acknowledged until the data reaches all required replicas. If one zone fails after that acknowledgment, the write exists in at least two surviving zones. That gives acknowledged writes a recovery point objective of zero for a zone failure. Azure Files reliability docs describe the same synchronous cross-zone protection for file data, which can still be reached if one zone has an outage.
For an agent filesystem, this promise has to connect to fsync returning, the point when the agent’s code believes the file is durable. In a design with that contract, a successful fsync means the write has crossed the replication boundary. Data still sitting in a page cache when the zone fails is outside the guarantee. Nor does the guarantee turn an interrupted, unacknowledged write into a completed one.
Why synchronous replication adds latency and when that overhead is acceptable for agents
That acknowledgment rule has a cost because a synchronous write becomes a distributed round-trip. The write path has to wait for the slowest required zone acknowledgment, even after the local write is done. Azure Well-Architected Framework describes the links between AZs as high-bandwidth and low-latency, suitable for synchronous replication for most workloads. It still calls for teams to check highly latency-sensitive workloads and test them before they commit. Physics has not agreed to waive its fees.
Writing tool outputs, checkpointing state, and appending logs are generally bursty, sequential activities rather than a steady stream of sub-millisecond random writes. The low latency of inter-AZ links lets this pattern tolerate synchronous replication without meaningful throughput loss. That does not make every individual write as fast as a local write.
The sharper concern is tightly coupled, high-frequency random writing, such as clustered database transaction logs at high IOPS. That pattern marks the boundary of the argument. The relevant comparison also changes if the alternative is building cross-zone replication in application code. Azure Disk Storage ZRS blog notes that platform-managed ZRS disks offer lower write latency than VM-to-VM application-level replication. Avoiding storage-layer replication does not necessarily avoid replication’s cost.
Asynchronous replication across regions: what it buys and what it risks
Asynchronous replication moves the acknowledgment boundary earlier. Azure Well-Architected Framework defines it as writing to one location first and replicating to another later. The original write can thus be complete before it reaches the remote copy. That removes the remote acknowledgment from the immediate write path, but creates a window in which a completed write can still be lost.
Azure Storage redundancy docs describe GZRS as combining synchronous replication across three AZs in the primary region with asynchronous replication to a secondary geographic region. The two legs address different failure scopes rather than offering interchangeable guarantees. The synchronous leg protects acknowledged state during a zone outage. The asynchronous leg provides geographic protection for a catastrophic regional event, but may be missing the newest writes when the primary region fails.
An agent resuming in the secondary region therefore cannot assume its last checkpoint is there. Its recovery path must allow for a replay gap between the state previously acknowledged and the state available after failover. Microsoft Q&A on FSLogix profile DR illustrates the passive-secondary pattern, with GRS/GZRS backing the primary region and the secondary remaining passive until failover. The DR host pool then points to the failed-over storage. For an agent sandbox, the analogous recovery offers a place to resume.
RPO and RTO as concrete design requirements, not abstract SLA language
These replication choices become operational requirements through two separate measures. Recovery point objective, or RPO, measures how much data an agent can lose. Recovery time objective, or RTO, measures how long it can be unavailable. Every replication design sets both, whether they appear in the design document or only become clear during an outage.
Synchronous ZRS gives acknowledged writes RPO = 0 during a zone failure, but that does not make recovery instantaneous. Azure Storage redundancy docs note that a zone outage can require networking updates, including DNS repointing, which can affect applications before those updates finish. During that window, the data may be fully safe while a tool call stalls or a sandbox appears unresponsive. The orchestrator must detect and retry that interruption rather than treating intact storage as proof of uninterrupted execution.
Azure Files reliability docs recommend retry policies with exponential back-off for applications using ZRS. Those policies address the reconnection window, which contributes to the time the runtime needs to recover, measured by RTO. By contrast, asynchronous regional recovery presents an RPO problem because the latest checkpoint may be absent. Its potential loss is a function of replication lag at failure, and the window can grow under high write load.
Consistency semantics under cross-AZ replication and why they matter for concurrent agents
Durability answers whether a write survives, while consistency answers what readers see. Strong consistency means every read after an acknowledged write sees that write, regardless of which zone serves the read. Azure Storage redundancy docs describe LRS replicas as reflecting the same current state, with deletions and overwrites applied to all copies simultaneously. ZRS extends that guarantee across zones by withholding write completion until all required zone replicas confirm. The acknowledgment thus matters to readers as well as to recovery.
For concurrent agents, the concrete test is two agents reading the same shared file from different zones after a write completes. With all-zone read-after-write consistency, both see the updated version. With eventual consistency, one may see stale state and act on a different account of the work. If that agent reads an old checkpoint and overwrites newer work, state is lost. Shared, AZ-distributed workspaces therefore need an explicit storage-layer consistency guarantee.
What zone-redundant block storage changes for stateful agent sandboxes
Azure Disk Storage ZRS blog describes the failover pattern directly, with the same ZRS disk remaining operational and available for attachment to a VM in another zone when the original VM becomes unavailable. The compute resource can fail without taking the durable disk state with it. That is a narrower and more useful promise than claiming that nothing stops.
For agent sandboxes built on microVMs with attached persistent disks, this changes what recovery has to recover. Instead of losing the sandbox’s stored state and rebuilding from scratch, the platform can restart on healthy compute with the durable disk intact. A failure that could otherwise discard hours of work can become a pause with zero loss of acknowledged writes. The disk preserves saved state, while the compute interruption remains an RTO concern.
Per-tenant disk partitioning carries that protection into a multi-tenant platform. Each tenant’s disk can survive the AZ failure on its own even when the microVM that uses it goes down. A sandbox can then restart in another zone without making the failed compute instance the sole keeper of its data. The storage layer gives it cross-zone durability, while the recovery path brings it back onto healthy compute with access to its data. Both parts are needed before “persistent sandbox” means persistent under failure.
How forking and checkpointing interact with cross-AZ replication for parallel agent work
A checkpoint can become the starting point for multiple independent branches, each of which must be isolated, durable, and restorable without affecting the others. That makes the fork itself part of the durability contract. Saving the source files is not enough if the system can lose the record that a branch exists.
A fork that copies data before replicating it leaves a window in which the new branch exists in only one zone. If the write recording its existence fails before replication completes, the branch can disappear silently. The same problem arises when file contents replicate synchronously but directory entries or snapshot records replicate asynchronously. The contents may survive even if the metadata needed to restore the branch is lost.
Checkpoint and fork operations must therefore have the same synchronous protection as ordinary writes, so the fork is recorded atomically and is zone-resilient. Speed belongs in that requirement, but cannot replace it. Sub-second forking is useful only if a completed fork is immediately durable across zones before a parallel branch starts writing. A fork that takes milliseconds but needs seconds to become durable has said it is done too soon. Fast branching and durable branching have to describe the same operation.
The replication tradeoffs that determine whether a filesystem can durably back a persistent agent environment
The evaluation comes down to four criteria, namely RPO, RTO, consistency model, and fork durability. RPO requires a clear acknowledgment boundary backed by synchronous replication for zone failures. RTO requires a transient-fault-aware access path that can reconnect when storage survives but access briefly does not. The consistency model must give concurrent agents that share state strong read-after-write behavior. Fork durability must cover checkpoint contents and the metadata that makes each branch independently restorable.
These criteria are a joint requirement. A design can keep ordinary writes safe yet lose branches, or keep all data safe while agents are stuck with no retry logic. Silent loss is most dangerous because an agent resuming from a stale checkpoint can keep working from the wrong point without crashing.
Azure Files reliability docs recommend appropriate retry and timeout policies as the client-side complement to storage-layer ZRS. Teams that build agent infrastructure should check all four criteria and ask for clear answers on what replication and consistency guarantees they have. A claim of “durable” or “resilient” remains unanswered until it names what survives, how access recovers, what readers see, and when a fork is safe to use.
This article is sponsored by Archil.


