为什么12factor建议不要守护进程? [英] Why does 12factor recommend not to daemonize processes?

查看:89
本文介绍了为什么12factor建议不要守护进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

12factor建议不要守护进程..这样做的缺点是什么?

12factor recommends not to daemonize processes. What are the disadvantages of doing so?

推荐答案

他们不是在查看守护进程本身,而是在管理该进程并确保其正常运行.他们引用了围绕守护程序构建的kludgey框架的实例,这些守护程序并非针对该管理而编写的,因此需要大量的资源来重新启动它,在清理之后进行清理等.

They are looking not at the daemon process itself, but at managing that process and ensuring it's running properly. They cite instances of kludgey frameworks built around daemons where the daemon was not written with an eye towards that management, thus requiring an excess of resources to restart it, clean up after it, etc.

他们指出并建议您使用系统管理工具软件,包括smf(Solaris),upstart(Linux),launchd(OSX),甚至旧的initttys(较旧的Unix版本和基于BSD的发行版).他们没有提到systemd(也是Linux),但这可能是时候了.他们也没有提到inetdxinetd,它们也使基于网络的守护进程的管理和重新启动变得容易和简单.

They point out and recommend the use of system management facility software, including smf (Solaris), upstart (Linux), launchd (OSX), and even hoary old init and ttys (older Unix versions and BSD based distros). They don't mention systemd (also Linux), but that could be timing. They also don't mention inetd or xinetd that also make management and restart of network based daemon processes easy and simple.

因此,他们实际上并不建议不要守护进程.他们建议在发明漂亮的守护程序服务流程后,不要不要重新发明围绕它的管理框架.在了解如何管理服务器的情况下开发服务器,这可能会使涉及的总工作量大大减少.按照目前的说法,这是devops的态度.

So they aren't really recommending not to daemonize processes; they're recommending that after you invent your nifty daemon service process, you don't reinvent a management framework around it. Develop your server with an awareness of how it will be managed, and that will likely make the total effort involved much less. In current terms, this is a devops attitude.

这篇关于为什么12factor建议不要守护进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆