-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add libp2p stream limit settting #399
Conversation
@songxiang93: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @songxiang93! It looks like this is your first PR to kubeedge/edgemesh 🎉 |
c48480b
to
9387dee
Compare
Signed-off-by: Song Xiang <sxiang@ruijie.com.cn> Fix blank space problem Signed-off-by: Song Xiang <sxiang@ruijie.com.cn> Fix blank space problem Signed-off-by: Song Xiang <sxiang@ruijie.com.cn>
9387dee
to
3773366
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Poorunga The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature Add libp2p stream limit settting
对libp2p stream扩展为默认可配置项
libp2p的resourcemanger默认的对所有的protocol进行流的限制。
https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/limit_defaults.go
参考源码,libp2p对protocol协议的限制主要分为以下两种:
1、针对协议的入栈出栈的流个数的限制
2、针对协议的每一个peer入栈出栈的流个数进行限制
最终针对协议的最终流个数限制为:
基础流个数+scale的扩展流个数。scale的扩展会根据每GB内存大小进行额外的扩容。
将基础流个数作为可配置项,并且设置为默认值,防止在中继过程中,遇到流被重置的问题。实测默认情况下,4-5个网页会触发stream reset。