3 ms·
Which Java systems these days use 1 thread per request? In my experience, Node scales far less well than typical Java setups.
by cromwellian 13y ago
Which Java systems these days use 1 thread per request? In my experience, Node scales far less well than typical Java setups.
- pmahoney 13y agoYour typical synchronous servlet container (Tomcat, Jetty, etc.) all maintain a thread pool and dedicate a single thread to each request for that request's lifetime. These threadpools can easily hold hundreds of threads on every-day hardware (vs. something like forking unicorn where 8 Ruby processes consumes quite a bit of memory). This works well for many workloads. It allows a straightforward blocking-IO model, but you don't typically worry about a few slow requests bogging everything down (which you do if you only have 4-8 unicorn processes). I'd say in many apps, the database becomes a bottleneck before the pool runs out of threads.
- galaxyLogic 13y agoFor Tomcat-8 "The default HTTP and AJP connector implementation has switched from the Java blocking IO implementation (BIO) to the Java non-blocking IO implementation (NIO)." @ https://tomcat.apache.org/migration-8.html https://tomcat.apache.org/migration-8.html