You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// transferLeadership transfers the leader to the given transferee.
// TODO: maybe expose to client?
func (s *EtcdServer) transferLeadership(ctx context.Context, lead, transferee uint64) error {
It is a very useful feature, assume we have three DC 1, 2, 3, 1 and 2 are in same city with very high speed network, 3 is in another remote city with some network delay (20ms). All our clients are deployed in 1 and 2.
In this case, we must ensure the etcd leader is in 1 or 2, not in 3. If we find leader is in 3, we must transfer to 1 or 2 explicitly.
The text was updated successfully, but these errors were encountered:
typeClusterinterface {
// MemberList lists the current cluster membership.MemberList(ctx context.Context) (*MemberListResponse, error)
// MemberAdd adds a new member into the cluster.MemberAdd(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error)
// MemberRemove removes an existing member from the cluster.MemberRemove(ctx context.Context, iduint64) (*MemberRemoveResponse, error)
// MemberUpdate updates the peer addresses of the member.MemberUpdate(ctx context.Context, iduint64, peerAddrs []string) (*MemberUpdateResponse, error)
TransferLeadership(ctx context.Context, transfereeuint64) error
}
Hi
I see transfer leader is not exported to client.
It is a very useful feature, assume we have three DC 1, 2, 3, 1 and 2 are in same city with very high speed network, 3 is in another remote city with some network delay (20ms). All our clients are deployed in 1 and 2.
In this case, we must ensure the etcd leader is in 1 or 2, not in 3. If we find leader is in 3, we must transfer to 1 or 2 explicitly.
The text was updated successfully, but these errors were encountered: