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

fd迁移方案的疑问 #2

Open
wuyupengwoaini opened this issue Jan 6, 2021 · 1 comment
Open

fd迁移方案的疑问 #2

wuyupengwoaini opened this issue Jan 6, 2021 · 1 comment

Comments

@wuyupengwoaini
Copy link

目前我在调研Netty的fd迁移方案,有幸看到大佬的Netty实现。想请问一下,之前貌似是使用的SO_REUSEPORT的方案来实现的,后来又改成了基于uds来实现的,请问如果是基于SO_REUSEPORT来实现的话,是有什么问题吗?

@zhenjunMa
Copy link
Owner

我居然现在才看到这个issue...

用SO_REUSEPORT的话比较省事,不用进行listener的迁移,也就是说新进程启动以后直接开一个listener监听端口,然后旧进程关闭监听即可。用uds的话就需要把listener也进行迁移,不过我已经试过了,listener迁移也是可行的,所以这两种方案没有什么本质区别,非要说的话就是SO_REUSEPORT对内核版本有要求,但现在用的应该都支持

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

No branches or pull requests

2 participants