简体   繁体   English

缩放:Docker容器与Vms

[英]Scaling: Docker containers vs Vms

I'm trying to understand the benefits of scaling an app via docker. 我试图了解通过docker扩展应用程序的好处。

As I understand it; 据我所知; if I have a dockerized app running in a single docker container or pod in kubernetes; 如果我有一个dockerized应用程序在单个docker容器或kubernetes中的pod中运行; to scale it ie in the case of increased load I would create multiple instances of the same container and load balance requests to each container; 为了扩展它,即在增加负载的情况下,我将创建相同容器的多个实例并对每个容器进行负载平衡请求; thing is if all these containers are on the same vm aren't they all drawing from the same system resources? 事情是,如果所有这些容器都在同一个vm上,那么它们是否都来自相同的系统资源?

What is scaling via docker then? 什么是通过docker扩展呢? Is it real? 这是真的吗? If all the container instances of your app are all drawing on the resources of the host machine? 如果您应用的所有容器实例都是在主机的资源上绘制的?

You are correct that scaling up and running more instances of a container on a single host will cause them to compete for resources. 您是正确的,在单个主机上扩展和运行更多容器实例将导致它们竞争资源。 You'd want a kubernetes cluster with more than one 'minion'/host nodes. 您需要一个具有多个'minion'/主机节点的kubernetes集群。 Having more than one container on a single host can be good, if load balanced properly, and a single container crashes, the other will still be up, without any delay or downtime while the replacement container is created. 在单个主机上拥有多个容器可能会很好,如果负载平衡正确,并且单个容器崩溃,另一个容器仍然会启动,而在创建替换容器时没有任何延迟或停机时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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