How object replication/synchronization works?
The Swift documentation describes the object replication as below:
-------
Object replication uses a scheme in which a hash of the contents for each suffix directory is saved to a per-partition hashes file. The hash for a suffix directory is invalidated when the contents of that suffix directory are modified.
The object replication process reads in these hash files, calculating any invalidated hashes. It then transmits the hashes to each remote server that should hold the partition, and only suffix directories with differing hashes on the remote server are rsynced. After pushing files to the remote server, the replication process notifies it to recalculate hashes for the rsynced suffix directories.
-------
Per my understanding, the object is modified on some storage node, and then it's synchronized to other replicas (for example Swfit's default config is 3 replicas, then the object will be replicated from this node to other two storage nodes). And this replication is asynchronous.
However, I also see some posts in this forum that the write to an object is sent in parallel from the proxy server to three replicas (storage nodes), obviously this mechanism is quite different from the above one. (a further question: if there are 5 or 10 replicas, the writes to the object will still be sent to these 5 or 10 nodes in parallel, right?)
Now I get confused on the Object replication implementation. Could someone explain which is the correct one? Thanks.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Peter Peng for more information if necessary.