gnet icon indicating copy to clipboard operation
gnet copied to clipboard

UDP with unique fds for each "connection"

Open evantandersen opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. I have heard the linux kernel performs significantly better when using a unique socket for each UDP 'connection', because the routing data will be saved internally. (in our application, hundreds of thousands of packets sent to the same client)

Describe the solution you'd like Possible to use unique file descriptors for each UDP 'connection' inside of gnet

Describe alternatives you've considered Writing the code myself, using gnet as is (and potentially missing out on kernel performance)

Additional context I don't actually know that much about linux networking performance. Our application involves maintaining streams of data between thousands of clients, each sending ~150 packets/second. Currently using the go/net package and it's become a bottleneck. From some cursory googling and my experience from a C server I worked on a decade ago, individual FDs for UDP sockets is the way to go. Hopefully you know more!

evantandersen avatar Apr 02 '21 22:04 evantandersen

Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/panjf2000/gnet

xscode-auto-reply[bot] avatar Apr 02 '21 22:04 xscode-auto-reply[bot]

Investigating on it.

panjf2000 avatar Apr 05 '21 12:04 panjf2000