Etcd: client is unaware of unhealthy server when getting response

Created on 12 Aug 2015  路  10Comments  路  Source: etcd-io/etcd

Because client pins to one endpoint if possible, it will always make requests to one server. If the target server is isolated from etcd cluster and becomes unhealthy for a long time, the client will be outdated too for that long time. We don't provide way to handle it or warn it today.

Most helpful comment

The readme still says reads can be satisfied by unhealthy member, and references this issue. Is that still the case? If not, perhaps amend the readme?

All 10 comments

/cc @mx2323 You might want to follow on this.

Is this still an issue?

Raft says:

The leader handles all client requests (if a client contacts a follower, the follower redirects it to the leader).

Can we use the same mechanism to notify client at least the target server is not reachable? When used with proxy, I see the error message of proxy endpoint is not available when the proxy is wrongly configured. Does etcd handle differently in this case?

Thanks,

@gyuho For watch and read, it gets the data from local store. It is allowed/normal for clients to get data from local store. We just don't provide way to handle or warn about unhealthy server today.

I see. Thanks,

@yichengq @gyuho if a client turns on client.GetOption.Quorum, reading from leader's store is enforced so the client can be aware of unhealthy server.

For example,

  1. create a cluster with 3 nodes
  2. create a key
  3. kill 2 nodes
  4. get the key with etcdctl get with the option --quorum (which turns on client.GetOption.Quorum)
    in such a sequence, the get request in 4th step will fail because of losing quorum. So I think current etcd already has a solution for this issue.

The issue isn't on reads, it's when a watch is registered on an etcd server, but the server on which the watch is sent to is partitioned from the rest of the etcd cluster. In these situations, the client will sit with a watch untriggered when it could have gone to another server and gotten the new update.

@mx2323 thanks for your pointing, I couldn't consider the case of watch.

The readme still says reads can be satisfied by unhealthy member, and references this issue. Is that still the case? If not, perhaps amend the readme?

Readme still seems to be out of date.

Was this page helpful?
0 / 5 - 0 ratings