Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

How to set the heartbeat interval? #656

Closed
xujianrj opened this issue Mar 26, 2014 · 3 comments
Closed

How to set the heartbeat interval? #656

xujianrj opened this issue Mar 26, 2014 · 3 comments

Comments

@xujianrj
Copy link

HI
I have two ETCD instance running , one is running at Canada , and one is running at China.
The ping delay is about 500ms .
I'd like the two ETCD instance working in clustering .
I am wonder how long shall I set the "-peer-heartbeat-interval".
Is it 50ms ,500ms or 1000ms?
And also shall I set the "-peer-election-timeout" 5000ms ?

@yichengq
Copy link
Contributor

https://github.com/coreos/etcd/blob/master/Documentation/tuning.md
This is a fantastic tutorial for parameter setting.
I think the heartbeat interval should be at least 1s.
@xiangli-cmu Correct?

@xujianrj
Copy link
Author

I have read this document , I am not sure how to calculate the time.
if my ping delay is 500ms ,why I need to set to 1s ?
Is it because the tcp protocol need the double time?

@bmizerany
Copy link
Contributor

@xujianrj You need to account for a variation in latency. If you have latency l, heartbeat h, and a buffer for some normal variation in latency x, then you can determine your timeout to be: l+h+x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants