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
AIX (PASE) along with Node's JavaScript runtime. Node is an
application-server environment (JavaScript), whereas the Apache server is
generally used merely for communications, or reverse proxy, or encryption,
or compression.

More meaningful differences probably pertain to one's interest in using
JavaScript to process web-service requests and generate responses vs.
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
scalability.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.