In order to confirm that a read is up to date with a majority of the cluster, the client can use the parameter on reads of keys. This means that a majority of the cluster is checked on reads before returning the data, otherwise the read will timeout and fail.
2) With quorum=false, doesn’t this mean that if my client switched the member it was connected to, that it could experience a logical ordering where the cluster goes backwards in time?
Yes, but this could be handled at the etcd client implementation via remembering the last seen index. The “index” is the cluster’s single irrevocable sequence of the entire modification history. The client could remember the last seen index, and determine via comparing the index returned on the GET whether or not the state of the key-value pair is before or after its last seen state.
The watch will stay untriggered, even as modifications are occurring in the majority quorum. This is an open issue, and is being addressed in v3. There are multiple ways to work around the watch trigger not firing.
4) What is a proxy used for?
A proxy is a redirection server to the etcd cluster. The proxy handles the redirection of a client to the current configuration of the etcd cluster. A typical use case is to start a proxy on a machine, and on first boot up of the proxy specify both the flag and the --initial-cluster
flag.
From there, any etcdctl client that starts up automatically speaks to the local proxy and the proxy redirects operations to the current configuration of the cluster it was originally paired with.
In the v2 spec of etcd, proxies cannot be promoted to members of the cluster. They also cannot be promoted to followers or at any point become part of the replication of the etcd cluster itself.
The design goal of etcd is that reconfiguration is simply an API, and health monitoring and addition/removal of members is up to the individual application and their integration with the reconfiguration API.
This makes sense because it’s usually an application level / administrative action to determine whether a reconfiguration should happen based on health.
For more information, refer to the runtime reconfiguration design document.
6) how does –endpoint work with etcdctl?
The flag can specify any number of etcd cluster members in a comma separated list. This list might be a subset, equal to, or more than the actual etcd cluster member list itself.
If only one peer is specified via the --endpoint
flag, the etcdctl discovers the rest of the cluster via the member list of that one peer, and then it randomly chooses a member to use. Again, the client can use the flag on reads, which will always fail when using a member in the minority.
Note: –peers flag is now deprecated and –endpoint should be used instead, as it might confuse users to give etcdctl a peerURL.