今天在思考如何在Linux服务器上不依赖PM2
部署直接部署Python Web服务时,碰巧搜到的这片文章。作为一片入门教程,作者给出了非常明确的思路和操作示例,并在字里行间和文末明列出了推荐阅读材料。为推荐给各位阅读,这里我做了全文的复制,原文链接。
感谢作者Luke Bond,有机会我会将全文翻译成中文。
The Node.js community has embraced process monitoring tools such as PM2, Nodemon, and Forever, which is understandable. For example, in addition to process monitoring, PM2 also boasts features around logging and port-sharing or clustering.
However, I’m a firm believer in using the Linux init system for process monitoring. In this blog post, I’ll show you how to recreate process management, logging and clustering functionality using the Linux init system, systemd, and I’ll make the case for this being a superior approach.
Please note that I’ve no intention of casting aspersions on any of the tools I’ve mentioned. But I think gaining familiarity with Linux is important for Node.js developers; it’s important to use standard tools that are well-proven and widely understood by sysadmins everywhere.