gpt4 book ai didi

amazon-web-services - 自动扩展Docker Swarm服务

转载 作者:行者123 更新时间:2023-12-02 18:40:40 25 4
gpt4 key购买 nike

我们将Ansible与AWS Autoscaling Group一起使用来扩展docker swarm集群。现在这是可行的,因为我们在全局模式下运行服务,因此我们自动为每个docker节点获取每种容器类型之一。但是,这并不是非常有效,因为最终我们会容纳一些服务所需的容器。

是否有人在做类似的事情,但让docker群根据其资源利用率扩展特定服务?似乎可以通过利用docker stats来确定哪些容器需要扩展,但如果已经有很好的解决方案,则不想重新发明轮子。

编辑:不是在寻找如何扩展群集集群本身,而是在其上运行单个服务。

最佳答案

看看kubernetes。

Kubernetes (commonly referred to as "K8s") is an open source container cluster manager originally designed by Google. It aims to provide a "platform for automating deployment, scaling, and operations of application containers across clusters of hosts". It usually works with the Docker container tool and coordinates between a wide cluster of hosts running Docker.



现在让我们说清楚:

Kubernetes水平自动缩放:

借助Horizo​​ntal Pod Autoscaling,Kubernetes可以根据 观察到的CPU利用率(或在其他一些情况下,由应用程序提供的指标来支持alpha)自动缩放复制 Controller ,部署或副本集中的Pod数量。

enter image description here

More info

关于amazon-web-services - 自动扩展Docker Swarm服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42736620/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com