The answer mostly depends on what "system" do you use. There's no general replication mechanism. However, answer to question #1 and #2 should be always the same: 1. Replica is a physical object 2. Replica is an exact copy. Almost every distributed system uses something home-grown. Here's some examples:
MySQL replication: client/server application. Transactions executed on master will be transferred to slaves. Number of configured slaves is the number of replicas. Replica and original isn't the same: replica is a delayed version of original. Answers to your questions:
- It's up to number of slave nodes configured 4. It's up to client what node to use master or one of slaves
CouchBase cluster: all nodes are equal, no master node. Objects and replicas are distributed by hash function among nodes. If a node fails the rest of the nodes redistribute objects and replicas of the failed node. Answers to your questions: 3. You can configure number of replicas you want to have. 4. There're 2 options:
- client can connect to any node and node will proxy the request if the object located somewhere else
- client is aware of objects distribution mechanism and knows structure of the cluster. So client can connect directly to the node which stores required object.