Re:Circuit Breaker
by cromwellian on Thursday March 06, 2014 @01:58PM
(#7355793)
Which Java systems these days use 1 thread per request? In my experience, Node scales far less well than typical Java setups.
[ Parent
| on HN ]
Your 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.
Re:Circuit Breaker
by galaxyLogic on Thursday March 06, 2014 @10:32PM
(#7358377)
For 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)."