Replies: 1 comment
-
The idea is you have 1 App for every thread then you keep threads isolated. Isolating sockets on a thread basis means you have, well, no threading overhead. All sockets run locally to their own thread and no threading mistakes can be made. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any thoughts on allowing the active passing of connections between a shared connection handler (across multiple threads)?
I know this is a feature only on Linux, but it would be nice to be able to choose and/or move an active connection between threads.
For me this is less about load balancing (which can be done), but more about controlling latency for the communication path.
Node is already slow enough -- don't want to have to pass around buffer pointers if I don't have to.
My code today uses a single class to represent a remote entity (that may have multiple connections to it [web sockets in this case]). The class instance can only live in one (1) place, but the connections for the remote entity could be N. Today I use a separate worker thread for the class instance and pass the relevant array buffers from the uWebsocket threads.
I would rather have the class instance live in the same worker thread that is handling the connections for it.
Beta Was this translation helpful? Give feedback.
All reactions