简体   繁体   中英

How to autoscale Docker container hosts?

I'm developing a Docker-based web service, where each subscriber has private access to their own Docker container running in the cloud, exposing port 443.

I've used nginx-proxy/docker-gen successfully to serve multiple Docker containers from the same VM, with just port 443 exposed to the public net.

This works fine ... but what do I do when the subscribers saturate the VM resources? (As a simple example, I may have a practical limit of 10 subscribers' containers on a single DigitalOcean 2Gb instance serving as a Docker host.)

Eg when subscriber #11 signs up, I need to have a new Docker host ready and waiting to start up that new container.

In other words, I want to do horizontal autoscaling of my Docker hosts, responsive to user subscription demand. Doing some service discovery and making the containers publicly-addressable would be nice.

I'm trying to work out what the best solution is. Kubernetes 1.1 seems to support auto-scaling of Pods (ie basically increasing the number of containers...) but not the auto-scaling of the container hosts ("minions" in Kubernetes-speak??)

I've looked at the following projects which seem close to what I need:

  • Deis - no explicit autoscaling as far as I can tell
  • Tsuru - possible autoscaling solution but limited to count/RAM
  • Mesos/Mesosphere - probably much more complex than necessary

Can anybody make any useful suggestions??

从 Kubernetes v1.1 开始,您现在可以实现 Horizo​​ntal Pod Autoscaler: http : //kubernetes.io/v1.1/docs/user-guide/horizo​​ntal-pod-autoscaler.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM