1

I found in the docs to autoscale based on number of undelivered messages in a topic. (Autoscaling GCE Instance groups based on Cloud pub/sub queue).

I want to know if the following scenario is possible: I have two pub/sub queues and I want to write an autoscaling condition that if any one of the queues has no_undelivered_messages > 150, it should scale i.e it should scale if num_messages in queue1>150 OR num_messages in queue2.

Please help with this case if it's possible. Thanks

Grzenio
  • 35,875
  • 47
  • 158
  • 240
amulya349
  • 1,210
  • 2
  • 17
  • 26

1 Answers1

0

You can scale based upon metrics using the AND operator but not the OR operator.

Per-group metric filtering requirements

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • Hi, Thanks for the answer. I tried this approach but it's not allowing me the same metric twice. Like in my case, I want to use no_undelivered_messages as a metric with two different queues. It's not allowing me. – amulya349 Oct 31 '18 at 06:10
  • You need to create two metrics. One for each queue. – John Hanley Oct 31 '18 at 06:20