英Process managers for Express apps
Warning: This information refers to third-party sites, products, or modules that are not maintained by the Expressjs team. Listing here does not constitute an endorsement or recommendation from the Expressjs project team.
当你运行用于生产的 Express 应用时,使用进程管理器有助于:
英When you run Express apps for production, it is helpful to use a process manager to:
如果应用崩溃,它会自动重启。
英Restart the app automatically if it crashes.
深入了解运行时性能和资源消耗。
英Gain insights into runtime performance and resource consumption.
动态修改设置以提高性能。
英Modify settings dynamically to improve performance.
控制集群。
英Control clustering.
进程管理器有点像应用服务器:它是应用的 “container”,可促进部署、提供高可用性并使你能够在运行时管理应用。
英A process manager is somewhat like an application server: it’s a “container” for applications that facilitates deployment, provides high availability, and enables you to manage the application at runtime.
Express 和其他 Node.js 应用最流行的进程管理器是:
英The most popular process managers for Express and other Node.js applications are:
Forever:一个简单的命令行接口工具,可确保脚本持续(永远)运行。Forever 的简单界面使其非常适合运行较小的 Node.js 应用和脚本部署。
英Forever: A simple command-line interface tool to ensure that a script runs continuously (forever). Forever’s simple interface makes it ideal for running smaller deployments of Node.js apps and scripts.
PM2:具有内置负载平衡器的 Node.js 应用的生产进程管理器。PM2 使你能够使应用永远保持活动状态,在不停机的情况下重新加载它们,帮助你管理应用日志记录、监控和集群。
英PM2: A production process manager for Node.js applications that has a built-in load balancer. PM2 enables you to keep applications alive forever, reloads them without downtime, helps you to manage application logging, monitoring, and clustering.
StrongLoop 进程管理器 (Strong-PM):具有内置负载平衡、监控和多主机部署的 Node.js 应用的生产进程管理器。包括一个 CLI,用于构建、打包 Node.js 应用并将其部署到本地或远程系统。
英StrongLoop Process Manager (Strong-PM): A production process manager for Node.js applications with built-in load balancing, monitoring, and multi-host deployment. Includes a CLI to build, package, and deploy Node.js applications to a local or remote system.
系统 D:现代 Linux 发行版上的默认进程管理器,这使得将 Node 应用作为服务运行变得简单。有关详细信息,请参阅 Ralph Slooten (@axllent) 的 “使用 systemd 运行 node.js 服务”。
英SystemD: The default process manager on modern Linux distributions, that makes it simple to run a Node application as a service. For more information, see “Run node.js service with systemd” by Ralph Slooten (@axllent).