1

以下是我对 Docker 的一些疑问:

鉴于 Docker 处理守护进程和服务之间的链接的方式(不使用守护进程)

1- 如果您可以运行守护进程和 bluepill 自行重启进程,进程监控、守护进程和应用程序链将如何工作(即:upstart/bluepill/unicorn)?

2- 如果您想坚持使用 upstart/bluepill/unicorn 模型,在找到要平衡的容器的 IP 地址时,它将如何使用高级代理进行负载平衡?

3- 推荐在 docker 顶部进行服务发现的软件,例如执行 rails 部署?

4

1 回答 1

1

1- AFAIK, there is no problem running bluepill (or some other process monitor like supervisor or monit) in a docker container. I often used this kind of tool to run more than one service in a container.

2- For load balancing containers, you can either use a load balancer that you can configure dynamically (for http balancing, hipache is a good candidate) or have some scripts that dynamically update configuration of a standard load balancer and reloads it (I did it many times with nginx, it should work with other solutions)

3- There are some tools in the docker ecosystem for service discovery. You can have a look at Serf (http://www.serfdom.io/) and etcd (https://github.com/coreos/etcd). For the deploy part, I would recommend you to use the ONBUILD instruction in Dockerfile to inject application code and create immutable containers.

于 2014-04-03T17:55:58.583 回答