设置Auto Scaling应用程序

问题描述 投票:3回答:4

是否可以根据工作负载为应用程序设置自动缩放功能?我既未在开发者控制台中也未在文档中找到任何有用的内容。通过CLI可能存在隐藏的可能性吗?

只是想知道这是否可行,因为我正在对Swisscom Application Cloud进行基本评估。

cloudfoundry swisscomdev
4个回答
2
投票

此功能目前尚未出现,也不属于(开源)cloudfoundry平台的一部分。有些平台提供它,但尚未向社区发布!


3
投票

1
投票

有多种方法可以做到这一点。如Anatoly所述,如果从各自的提供商部署,则可以显然使用“Auto Scaler”服务。

(你可以通过调用这个Feature-Flags-API检查来解决这个问题:https://apidocs.cloudfoundry.org/253/feature_flags/get_the_app_scaling_feature_flag.html

另一个选择实际上是根据您要满足应用程序的自定义缩放行为编写自己的小型自动缩放器。 (DIY;))


0
投票

对于PCF,你可以看看这个https://github.com/Pivotal-Field-Engineering/autoscaling-cli-plugin。它应该给你你想要的东西。

你需要通过它安装它

cf install-plugin https://github.com/pivotal-cf-experimental/autoscaling-cli-plugin

并使用类似于下面的步骤进行配置

Get the details of the autoscaler from your marketplace
cf m | grep app-autoscaler
Install the auto scaler plugin using service & plan from above
cf create-service <service> <plan> myAutoScaler
Bind the service to your app (or u can do this via you deployment manifest)
cf bind-service myApp myAutoScaler
Configure your scaling parameters
cf configure-autoscaling --min-threshold ## --max-threshold ## --max-instances # --min-instances # myApp myAutoScaler
© www.soinside.com 2019 - 2024. All rights reserved.