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

gnet client支持非阻塞conect替代net.dial #287

Closed
liujiangang01 opened this issue Dec 6, 2021 · 1 comment
Closed

gnet client支持非阻塞conect替代net.dial #287

liujiangang01 opened this issue Dec 6, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request proposal Proposal for this repo
Milestone

Comments

@liujiangang01
Copy link

背景:
阻塞式connect开销相对比较大,在高并发场景,client端反而更可能形成瓶颈

@liujiangang01 liujiangang01 added enhancement New feature or request proposal Proposal for this repo labels Dec 6, 2021
@panjf2000 panjf2000 added this to the Long term milestone Jan 3, 2022
@lesismal
Copy link

其实没什么必要。

在高并发场景,相对于标准库,poller框架已经节省了大量的协程,为其他逻辑模块腾出了更多协程数量的使用空间。
服务内不同模块可以不同size的协程池处理,包括像client这种,同一时间Dial的数量没那么大,比如1w已经很多了,用size 1w的协程池也足够了,而1w这种协程数量级别,对于rutime来说完全没压力,代码逻辑的可读性上也更好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal Proposal for this repo
Projects
None yet
Development

No branches or pull requests

3 participants