[英]How to Autoscale a GCP Managed Instance Group using a Rabbitmq VM outside the group
I am using GCP and I have a specific problem to solve where I want to use the metrics from a RabbitMQ instance to control the autoscaling requirements of a Managed Instance Group.我正在使用 GCP,我有一个特定的问题需要解决,我想在哪里使用 RabbitMQ 实例的指标来控制托管实例组的自动缩放要求。 Do note that this RabbitMQ instance is outside this group and is used only to maintain the messages in the queue.请注意,这个 RabbitMQ 实例在该组之外,仅用于维护队列中的消息。
I want to scale up the number of instances in the group, when the number of current messages in the queue exceeds the number of available consumers.当队列中的当前消息数超过可用消费者数时,我想扩大组中的实例数。 I had implemented the same in AWS using Amazon MQ integrated with RabbitMQ to autoscale for an ECS Cluster of Instances.我在 AWS 中使用与 RabbitMQ 集成的 Amazon MQ 实现了相同的功能,以自动扩展 ECS 实例集群。
I have installed an OPS agent on the RabbitMQ Instance so that I can monitor the queue-based stats in a dashboard, but I am not sure how these metrics can be used to scale the instance as no specification on the MIG config page seems to point to the accessibility of these metrics.我在 RabbitMQ 实例上安装了一个 OPS 代理,以便我可以在仪表板中监控基于队列的统计信息,但我不确定这些指标如何用于扩展实例,因为 MIG 配置页面上似乎没有说明这些指标的可访问性。
My question is that, is it possible to scale the instances in an MIG through the metrics of an external instance like in my case?我的问题是,是否可以像我的情况一样通过外部实例的指标来扩展 MIG 中的实例? This question arises because the documentation on GCP seems to point out that autoscaling can be used only on metrics of the instances within the group.出现这个问题是因为 GCP 上的文档似乎指出自动缩放只能用于组内实例的指标。
If not, I would like to understand other ways I can implement the same by perhaps monitoring a consumer-based metric.如果没有,我想了解我可以通过监控基于消费者的指标来实现相同目标的其他方式。
Custom metrics can be used for triggering the auto scaling feature.自定义指标可用于触发自动缩放功能。 This document outlines clearly how to configure custom metrics for triggering auto scaling of MIG instances.本文档清楚地概述了如何配置自定义指标以触发 MIG 实例的自动缩放。 The configuration involves three simple steps.配置涉及三个简单的步骤。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.