turn icon indicating copy to clipboard operation
turn copied to clipboard

handleUDPPacket with a new Goroutine

Open songjiayang opened this issue 6 years ago • 2 comments

Summary

Use a new Goroutine for UDP handle, current logic is server/server.go#L71 , it process the package one by one, when handle DataPacket the another UDP request will be blocked.

songjiayang avatar Apr 16 '19 07:04 songjiayang

@songjiayang I would really love to see this implemented!

Have you done any research in how to handle UDP messages in high performance scenarios? It seems like this could be highly variable.

If you are copying across threads but only having one user that could take up a lot of extra CPU vs cases where it does make sense. If you are interested would love to work on this together. I am going to start using pion/turn in a high usage production environment at work and really want to see if I can beat other TURN servers performance wise.

thanks!

Sean-Der avatar Jan 15 '20 06:01 Sean-Der

I have done a benchmark test, but not too much improvement 😄 .

songjiayang avatar Jan 19 '20 06:01 songjiayang

This should be resolved by the example of a multi-threaded server which has been merged in #295

stv0g avatar Feb 23 '23 17:02 stv0g