替代码头工人的主管 [英] Alternative to supervisord for docker

查看:146
本文介绍了替代码头工人的主管的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使对码头环境,Supervisord也是非常棒的工具。它可以帮助很多的stderr重定向和信号转发。但它有两个缺点:


  1. 它不支持延迟启动。延迟一些代理启动直到主应用程序初始化可能是有用的。优先级不能解决这个问题。

  2. 如果某些应用程序进入FATAL状态监控器只是记录它,但继续工作。所以在看到容器的日志之前看不到。如果supervisord刚刚停下来,可能会更友好,因为在这种情况下,您会看到问题与 docker ps -a

那么什么是supervisord的最佳选择?

解决方案

回应PID1僵尸收获我曾经建议(在在Docker中使用主管)使用 runit 而不是supervisord


Runit使用的内存少于Supervisord,因为Runit是用C编写的,而在Python中是用Supervisor编写的。

在某些用例中,容器中的进程重新启动是可取的在整个容器重新启动。


请参阅 phusion / baseimage-docker image for more。


Supervisord is really great tool even for docker environment. It helps a lot with stderr redirection and signals forwarding. But it has a couple of disadvantages:

  1. It doesn't support delayed startup. It could be useful to delay some agent startup until main app is initializing. Priority doesn't solve this issue.
  2. If some app enters FATAL state supervisord just logs it but continue to work. So you can't see it until look at logs of container. It could much more friendly if supervisord just stops because in that case you see the problem with docker ps -a

So what is the best alternative to supervisord?

解决方案

In response to the "PID1 zombie reaping" issue, I recommended before (in "Use of Supervisor in docker") to use 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.

See the phusion/baseimage-docker image for more.

这篇关于替代码头工人的主管的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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