Skip to content

Scaling QIE HA Node Instances

In this article a node instance is a running QIE engine in a high availability cluster. The term does not refer to the mapping, condition, or destination nodes that make up a channel.

Many container orchestrators such as Kubernetes have services that can automatically scale a cluster of node instances based on some metrics that are being monitored, such as CPU or Memory Utilization. This way you can define your service and let the orchestrator decide when to add node instances to the cluster or remove them from the cluster.

There are two service calls available to be used with QIE to determine specific metrics of use in the engine. These service calls can be made by the orchestrator to determine if a new node instance needs to be added to the cluster, or if an existing one can be removed from the cluster.

First, the container probe port variable ("QIE_PROBEPORT: {somePort}") must be defined. Once it is defined, calls to this service port can be made with a query parameter that returns specific data about the current QIE service performance.

The first call is to the container probe port with the query parameter of "individualNode". This returns the 9 values referenced in the "Java Options and Environment Variables" chapter of this manual. This call returns the 9 values for the specific node instance being called only; it does not include the values for any other node instance in the cluster.

Example:

curl http://{nodeIpAddressOrHostName}:{probePort}?individualNode

Response:

{
   "instanceId": 1144,
   "processorThreadCount": 11,
   "processorQueueSize": 0,
   "processorThroughput": 0,
   "completionThreadCount": 5,
   "completionQueueSize": 0,
   "completionThroughput": 0,
   "loggerThreadCount": 2,
   "loggerQueueSize": 0,
   "loggerThroughput": 0
}

The second call is to the container probe port with the query parameter of "allNodes". This call returns the 9 values reference in the "Java Options and Environment Variables" chapter of this manual. This call returns the 9 values for all the node instances in the cluster summed together.

Example:

curl http://{nodeIpAddressOrHostName}:{probePort}?allNodes

Response:

{
   "instanceId": 1144,
   "runningNodes": 1,
   "processorThreadCount": 11,
   "processorQueueSize": 0,
   "processorThroughput": 0,
   "completionThreadCount": 5,
   "completionQueueSize": 0,
   "completionThroughput": 0,
   "loggerThreadCount": 2,
   "loggerQueueSize": 0,
   "loggerThroughput": 0
}

Using one of the two calls to get the performance values returned can then be configured into the orchestrator service to determine when a new node instance needs to be added to the cluster or when an existing one needs to be removed from the cluster.