TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

6 点作者 jemeshsu超过 13 年前
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?

1 comment

Rust超过 13 年前
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.<p>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.