

Ask HN: Why web apps are not packaged as daemons? - jemeshsu

It is common for server apps such as mongodb or redis to run as daemons, with single binary. Web apps tend to be designed and deployed as collections of files and scripts. Any reason why web apps are not demonized the same?
======
Rust
Web apps generally need to be accessible on port 80, and only a single service
can claim an IP address and port combination. If web apps were distributed as
services, each one would need to run on a unique IP/port combination. In order
for outside users to access those apps through the default HTTP or HTTPS ports
(80 and 443, respectively), you would still need to be running at least a
reverse proxy server that could remap incoming traffic to the correct internal
port. On top of that, your web app would have to include an FPM or UWSGI
service, increasing the size of the distributed binary.

Frankly, it's much easier just to leave that aspect of things to the server
admin, and distribute your web app as a PHAR or Egg or Gem or whatever.

