So I can use Apache or Express for Node. Can anyone enlighten me as to
the practical differences?
I'm not aware of practical differences in regards to communications (socket
services) and the HTTP protocol given a relatively small I/O workloads.
For those who may be looking to serve thousands of concurrent connections,
the Apache based server scales in and of itself; just configure the number
of threads you want it to support. One of our clients runs 3,500+ threads
in a single instance (1 process). The Node HTTP server is a single-threaded
process. You can scale by running multiple Node instances and distributing
workloads between them via a load balancer.
Although Node's HTTP process is single threaded, it can be shared by
multiple forked "child" processes as reference by Aaron Bartell. Child
processes are relatively resource intensive in that they run a subset of
generally used merely for communications, or reverse proxy, or encryption,
More meaningful differences probably pertain to one's interest in using
perhaps one's interest in using ILE languages to do the same.
Another relevant distinction, at least to me, is how web-service requests
are dispatched and routed. Under the Apache CGI design, requests may be
routed to persistent stateful jobs, or routed indiscriminately to a pool of
stateless jobs, based simply on which is available at any given moment.
Under Node, this is where a product like Express comes into play. I don't
have a high opinion of either the routing in Express, nor in Apache. I
wrote an Apache plug-in which handles application launching, request
dispatching, and routing for our application environment for much improved