-
Notifications
You must be signed in to change notification settings - Fork 289
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
[stream] added stream manager module #3554
Conversation
bb5dc2e
to
f5224d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general.
const ( | ||
// checkInterval is the default interval for checking stream number. If the stream | ||
// number is smaller than softLoCap, an active discover through DHT will be triggered. | ||
checkInterval = 30 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how are these numbers chosen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By estimation without solid evidence. Basically this is just like estimating the timeout to do a HTTP request. The only trick here is to make discTimeout less than checkInterval to avoid simultaneous host/client stream setup. Do you have other references that these numbers can be analyzed upon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably observe the timeout by adding prometheus metrics and change to a more solid value after launch. For now I think the number is good to start with. Do you other references that can be helped to determine these number's values?
Description
This is a breakdown PR of #3535 and is on top of #3552.
Stream manager do the following job: