jkalyanc
jkalyanc

Reputation: 147

Pivotal Cloud Foundry instance autoscalling for IBM MQ depth

We have a spring boot application deployed on Pivotal Cloud Foundry which consumes messages from IBM MQ. Is it possible to scale the application based on the Queue length of the specified queue.

Upvotes: 0

Views: 308

Answers (1)

Daniel Mikusa
Daniel Mikusa

Reputation: 15006

PCF has an App Autoscaler built-in: see https://docs.pivotal.io/application-service/appsman-services/autoscaler/using-autoscaler.html.

It does not directly support scaling based on IBM MQ queue depth though. You would need to use a custom rule.

There is a tutorial for using custom rules to scale Spring Boot apps here.

The summary is this:

  1. Your app needs to expose a metric through actuator for what you want to measure. In this case, your app would need to expose the queue depth of the queue on which you want to scale.
  2. Use Metric Registrar to expose your custom metric to CloudFoundry. This makes it available through Loggregator.
  3. Configure your custom metric in Apps Manager or using the cf cli plugin. Because you exposed the metric with Metric Registrar, it'll be available as a custom metric on which you can scale.

Upvotes: 0

Related Questions