替代码头工人的主管 [英] Alternative to supervisord for docker
问题描述
- 它不支持延迟启动。延迟一些代理启动直到主应用程序初始化可能是有用的。优先级不能解决这个问题。
- 如果某些应用程序进入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:
- 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.
- 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屋!