concurrency throttle

Concurrency Throttle

Version: 17.01

Supported Since: 17.01

What is a Concurrency Throttle?

A Concurrency Throttle is a processing element which controls the number of concurrent messages being processed in the flow. Typical scenarios for this are as follows.

  1. A server can only handle a certain number of concurrent messages. Therefore Concurrency Throttle can be used to make sure the server does not get overloaded with requests.

  2. An organization wishes to spread processing across a number of servers. Concurrency Throttle can be used to limit the concurrent messages to a server, but then distribute the overflow messages to a secondary server, which itself may have a similar rule. In this way, traffic is distributed across servers.

  3. Traffic above a certain level may indicate a data-harvesting attack. Therefore Concurrency Throttle would be configured to keep traffic below this level.

Sample Use Case

In this use case, concurrency throttle is used to only allow five concurrent message in the flow and all the excess requests will end their flow with the Exceptional Flow End processing element. To demonstrate the concurrency throttle operation, NIO HTTP Ingress Connector and NIO HTTP Egress Connector is used. Complete flow for the use case is shown below.

concurrency throttle flow

Configuration of the Concurrency Throttle processing element is shown below.

concurrency throttle conf

Since the concurrency is set to five, when the number of concurrent messages in flow exceeds five those requests will be rejected and forwarded through the denied out port and other messages are forwarded through the allowed out port.

Out Ports

Allowed

The message will be sent to this outport if messages in processing has not exceeded concurrency level

Denied

The message will be sent to this outport if messages in processing has exceeded concurrency level

On Exception

The message will be sent to this outport if the processing element failed in concurrency throttling

Parameters

Concurrency *

Basic

This parameter represents the number of allowed concurrent messages in processing.

Consider All Branches *

Basic

Boolean parameter to set whether to wait till all branches of the message be complete to mark message as completed the flow or whether to only consider the main branch to mark message as completed. Defaults to false.

If there are no branches, setting this to either true or false will make no difference.

In this topic
In this topic
Contact Us