Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clarification on watch when server (or store) is partitioned #57

Closed
embano1 opened this issue Mar 25, 2020 · 1 comment
Closed

Clarification on watch when server (or store) is partitioned #57

embano1 opened this issue Mar 25, 2020 · 1 comment

Comments

@embano1
Copy link
Member

embano1 commented Mar 25, 2020

After reading up on some corner cases with etcd client behavior (connections, streams, etc.) I came across the following option that has been introduced in etcd a while ago:

// WithRequireLeader requires client requests to only succeed
// when the cluster has a leader.
func WithRequireLeader(ctx context.Context) context.Context {...}

(Source)

From the official etcd docs on client behavior:

Client-side keepalive ping still does not reason about network partitions. Streaming request may get stuck with a partitioned node. Advanced health checking service need to be implemented to understand the cluster membership (see etcd#8673 for more detail).
Source: clientv3-grpc1.23: Balancer Limitation

I do not see this option being used in the API server when Watch() is established.

Is there code in the API server that deals with these cases (etcd/API server node paritioned) and disconnects clients (REST, SDK) appropriately? Or are we at risk of having dangling (hanging) consumer-side client watches due to not using this option in the etcd client?

Related discussions:

clientv3: clarify "WithRequireLeader" for network partition
Network-partition aware health service

cc/ @dims @jingyih @jpbetz @sttts

@embano1
Copy link
Member Author

embano1 commented Mar 25, 2020

Opened on k/k
kubernetes/kubernetes#89488

@embano1 embano1 closed this as completed Mar 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant