Is Node JS limited to one thread per open HTTP connection?
source link: https://www.codesd.com/item/is-node-js-limited-to-one-thread-per-open-http-connection.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Is Node JS limited to one thread per open HTTP connection?
Can Node JS have multiple threads serving HTTP clients on a single HTTP port? This is to handle situations where some threads are waiting for a database or doing some heavy processing. This is not supposed to interfere with other threads that are quick things like loading an image.
Node doesn't wait for the database, thats the point. Node is non-blocking, event-driven. It sets up a callback, and keeps going round, ready for the next request. It doesn’t just sit there, waiting for the database to come back with the requested info.
Related Articles
Does node.js use one thread per socket connection?
One thread per client. Feasible?
Does it make sense to generate more than one thread per processor?
What is the practical limit of threads per CPU?
Is the startup of 1 thread per element always optimal for GPU data-independent issues?
One SQLiteConnection per thread?
Use XOR to implement a doubly linked list with one pointer per node
SQL query to get the latest user comment per blog post limited to one for each user?
Asynchronous processing with PHP - one worker per job
How many threads per kernel are assumed when calculating GFLOPS on Nvidia GPU cards?
Maximum number of threads per process - sysconf (_SC_THREAD_THREADS_MAX) failed
Level of parallelism in multiple threads per kernel
Does WCF start the session on more than one thread?
Sessions, one login per user: disconnect an old session or prevent the connection to a new session
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK