简体   繁体   English

如何使用组外的 Rabbitmq VM 自动缩放 GCP 托管实例组

[英]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.配置涉及三个简单的步骤。

  • Create a custom metric for the Rabbitmq queue in cloud monitoring.在云监控中为 Rabbitmq 队列创建自定义指标。
  • Create a service account and give sufficient permissions for performing auto scaling actions.创建一个服务帐户并提供足够的权限来执行自动缩放操作。
  • Create a trigger using these custom metrics for scaling the managed instance group.使用这些自定义指标创建触发器以扩展托管实例组。

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

相关问题 获取 GCP(托管)实例组的状态 - Get GCP (managed) instanced group's status 即使在强制调整大小后,GCP 托管实例组也不会缩减为 0 - GCP managed instance group won't scale down to 0 even after forced resize 如何使用 AWS CLI 将多个托管策略附加到一个组 - How to attach multiple managed policies to a group using AWS CLI 如何防止我的 GCP VM 实例中的用户成为 root? - How can prevent users in my GCP VM Instance to become root? GCP vm 实例元数据的规则是什么 - What are the rules for GCP vm instance's metadata GCP VM 实例 - 操作系统登录为另一个用户 - GCP VM Instance - OS Login as another user GCP | 云监控 | 如何对项目进行分组以在 Cloud Monitoring 信息中心上显示? - GCP | Cloud Monitoring | How to group projects for display on Cloud Monitoring Dashboard? GCP中VM e2-small实例的数据传输限制是多少 - how much is the data transfer limit for a VM e2-small instance in GCP GCP 托管笔记本不会出现在虚拟机实例列表下,但用户托管笔记本会出现 - 为什么? - GCP Managed Notebook doesn't appear under VM instances list, but User Managed Notebooks do - Why? EKS 托管节点组中的附加安全组 - Additional security group in EKS managed node group
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM