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

Add documentation/examples for Epoll #105

Open
pendula95 opened this issue Nov 22, 2020 · 1 comment
Open

Add documentation/examples for Epoll #105

pendula95 opened this issue Nov 22, 2020 · 1 comment

Comments

@pendula95
Copy link

pendula95 commented Nov 22, 2020

Currently netty 4.x does not provide multi threaded support for NIO DatagramChannel. Info about this issue can be found here netty/netty#1706
There is a working workaround also presented in linked issue but implies using Epoll. Although this is a limiting for some users, providing a true multi thread support is an importing factor.

Needed steps to provide Datagram multi threading:

  • Use the epoll transport (Linux only)
  • Turn on SO_REUSEPORT option
  • Create multiple datagram channels bound to the same port

It would be good to address and provide example/test with Epoll or at least address it in documentation as supporting multi threading is one one the key aspects of Netty framework.

@horaceli
Copy link
Collaborator

Something I would love to look into, but to do that effectively, we'd need to benchmark the existing implementation, and to see if it's actually causing a bottleneck. Unfortunately the current tests are a long way from that.

What we could do, if throughput was the focus rather than latency, is the moment requests come in, instead of relying on the existing eventLoopGroup, farm it out to a separate eventExecutorGroup (possibly via LMAX Disrupter as in the issue you linked to).

If latency is the target, then yes we should use epoll so requests can stay on the same thread, but I don't want to over optimize at this point, especially as then there's all the complexity of a fallback option for Windows/Mac.

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