替代码头的supervisord

替代码头的supervisord,第1张

概述即使对于码头工人环境,Supervisord也是非常棒的工具.它对stderr重定向和信号转发有很大帮助.但它有一些缺点: >它不支持延迟启动.在主应用程序初始化之前,延迟某些代理启动可能很有用.优先权无法解决此问题. >如果某个应用程序进入FATAL状态,则supervisord只记录它,但继续工作.因此,在查看容器日志之前,您无法看到它.如果supervisord刚停止,它可能会更友好,因为在 @H_301_1@ 即使对于码头工人环境,Supervisord也是非常棒的工具.它对stderr重定向和信号转发有很大帮助.但它有一些缺点:

>它不支持延迟启动.在主应用程序初始化之前,延迟某些代理启动可能很有用.优先权无法解决此问题.
>如果某个应用程序进入FATAL状态,则supervisord只记录它,但继续工作.因此,在查看容器日志之前,您无法看到它.如果supervisord刚停止,它可能会更友好,因为在这种情况下你会看到docker ps -a的问题

那么supervisord的最佳替代方案是什么?

解决方法 为了回应“PID1僵尸收割”问题,我之前建议(在“ Use of Supervisor in docker”中)使用 runit instead of supervisord

Runit uses less memory than Supervisord because Runit is written in C and Supervisord in Python.
And in some use cases,process restarts in the container are preferable over whole-container restarts.

有关更多信息,请参见phusion/baseimage-docker图像.

如Torsten Bronger在the comments所述:

Runit is not there to solve the reaPing problem.
Rather,it’s to support multiple processes. Multiple processes are encouraged for security (through process and user isolation).

自2015年起,您现在可以Specify an init process that should be used as the PID 1 in the containe,with docker run --init

The default init process used is the first docker-init executable found in the system path of the Docker daemon process.
This docker-init binary,included in the default installation,is backed by 07006.

总结

以上是内存溢出为你收集整理的替代码头的supervisord全部内容,希望文章能够帮你解决替代码头的supervisord所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1030997.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存