From 1e9e6b1c65d1c20890f75103b659d466354e5f81 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 13 Dec 2020 12:21:07 -0800 Subject: [PATCH] Updated Replication (markdown) --- Replication.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Replication.md b/Replication.md index d7f01c8..93eb0e8 100644 --- a/Replication.md +++ b/Replication.md @@ -59,6 +59,14 @@ Now when requesting a file key, an optional "dataCenter" parameter can limit the http://localhost:9333/dir/assign?dataCenter=dc1 ``` +## Write and Read + +For consistent read and write, a quorum `W + R > N` is required. In SeaweedFS, `W = N` and `R = 1`. + +In plain words, all the writes are strongly consistent and all N replica should be successful. If one of the replica fails to write, the whole write request will fail. This makes read request fast since it does not need to check and compare other replicas. + +For failed write request, there might be some replicas written. These replica would be deleted. Since volumes are append only, the physical volume size may deviate over time. + ## Fix replication If one replica is missing, there are no automatic repair right away. This is to prevent over replication due to transient volume sever failures or disconnections. In stead, the volume will just become readonly. For any new writes, just assign a different file id to a different volume.