Operations Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Throttling in ALSB

In ALSB, you can restrict the message flow to a business service. This technique of restricting a message flow to a business service is known as throttling. This section contains the following topics:

 


How to Enable Throttling

You must enable throttling for a business service from the Operational Settings tab of the View a Business Service page. In this tab, under Throttling select the Enable check box for the Throttling State. When you enable throttling for a business service you must specify values for Maximum Concurrency. You can also specify the Throttling Queue and Message Expiration for the business service. For more information, see What are the Operational Settings for Throttling? and Configuring Operational Settings for Business Services in Monitoring in Using the AquaLogic Service Bus Console.

Table 8-1 provides some important definitions in throttling.

Table 8-1 Important Definitions
What is …
Definition
Throttling queue
The priority queue in which the messages are enqueued when business services reach their maximum concurrency. Messages with higher priority are processed first. Messages are processed on a first-in first-out basis, if they have the same priority. You can assign priority to messages using the routing options.

Note:  

  • The greater the integer for priority, the higher is the priority of the message.
  • You can configure only one queue for a business service
A throttling queue is an in-memory queue. Messages that are placed in this queue are not recoverable when a server fails or when you restart a server.
When you delete or rename a business service, all the messages in the throttling queue are discarded.
Message priority
The priority of a message in the throttling queue.
Expired message
A message that has been in the throttling queue for an interval greater than the value of message expiration. For more information on message expiration, see Table 8-2.

 


What are the Operational Settings for Throttling?

Table 8-2 describes the operational settings for throttling.

Table 8-2 Operational Settings for Throttling
Operation Setting
Use this to …
Throttling State
Enable or disable throttling for a business service.

Note: When you disable throttling for a business service at run time, all messages in the throttling queue are processed without throttling.

Maximum Concurrency
Restrict the number of messages that can be concurrently processed by a business service. This must be a positive integer. When this threshold is reached for a business service, all the incoming messages for the business service are placed in a throttling queue until the business service can accept more messages.
Any change to this setting affects both new messages and those already in the queue. When you increase the value, the ALSB run time allows more messages to be sent to the business service after processing those in the queue first. When you decrease the value, the ALSB run time places any new messages in a throttling queue until the concurrency setting goes below the new threshold, if you have defined a throttling queue. If you have not defined a throttling queue, the messages are discarded.
In a cluster environment, the number of messages that can be concurrently processed by a business service is equally divided among the managed servers.

Note: You can set this operational setting only if you enable throttling for the business service.

Throttling Queue (operational setting)
Restrict the number of messages in the throttling queue. The length of the throttling queue must be positive integer. All the incoming messages beyond the maximum concurrency limit for the business service are placed in the throttling queue. When the queue is full, the message in the queue with the lowest priority will be removed from the queue if a new incoming message has a higher priority.
If you set this length to be equal to zero, it implies that a throttling queue does not exist for the business service.
Any change to this setting is dynamically implemented. When you decrease the value for this setting, all the messages beyond the new length are discarded.

Note: You can set this operational setting only if you enable throttling for the business service.

In a cluster environment, this is equally divided among the managed servers.
Message Expiration
Restrict the maximum time (in milliseconds) spent by a message in the throttling queue of a business service. This must be a positive integer. When this time has elapsed, the message is removed from the queue. These messages are referred to as expired messages.
If the message expiration is set to zero for a service, the messages in throttling queue for this service will never expire.
When you increase the value for this setting, the expiration time for the new messages and the messages that are already present in the queue is increased. When you decrease the value, all the messages that have exceeded the new value are immediately discarded.

Note: You can set this operational setting only if you enable throttling for the business service.

 


What Metrics are Available for Throttling ?

Table 8-3 describes the metrics that are available for throttling.

Table 8-3 Throttling Metrics
Metrics
Description
Max Throttling time
The maximum time spent by all messages in the throttling queue in milli seconds. If this value is greater than zero for a business service, it indicates that messages are placed in the queue for the business service.
Min Throttling time
The minimum time spent by all messages in the throttling queue in milli seconds. If this value is equal to zero some messages are not placed in the throttling queue.
Average Throttling time
The average the time spent by all messages in the throttling queue in milli seconds.

For more information about throttling metrics, see How to Access Throttling Metrics.

 


How to Access Throttling Metrics

You can access the throttling metrics from the Service tab of the Service Monitoring Details page in the ALSB Console. You can obtain the metrics for the current aggregation interval and for the interval since the last reset. For more information, see How to Access Service Statistics from the ALSB Console.

You can also access the metrics using JMX Monitoring APIs. For more information, see Viewing SLA Alerts in the Dashboard.

 


How to use Throttling Metrics for Alerting

You can define an SLA alert rule based on throttling metrics. You can define the alert rule based on Average Throttling Time. For more information, see Creating and Editing Alert Rules in Monitoring in Using the AquaLogic Service Bus Console.

 


How to use Throttling for Business Services with Multiple Endpoint URIs

This topic provides information on using throttling for business services with multiple endpoint URIs.

In ALSB, a business service can be associated with multiple endpoint URIs. For more information on endpoint URIs, see Managing Endpoint URIs for Business Services. When you associate a business service with multiple URIs, you must configure the maximum concurrency for the business service and not the individual URI. The maximum concurrency for each URI is set internally depending on the overall maximum concurrency and the load balancing weight, based on the following equation:

URI-specific max_concurrency = [User configured max_concurrency] X [weight]

For example, consider a business service B with three endpoint URIs eu1, eu2, and eu3. The load balancing algorithm is defined as random-weighted. The weights of the URIs are 1, 2, and 3 respectively. Assuming that you have defined a maximum concurrency of 10 for the business service, the URI specific maximum concurrency is 10, 20, and 30. The effective maximum concurrency of the business service B is 60. If the last endpoint URI that has a weight of 3 is offline, the effective maximum concurrency of the business service is 30.

Notes:

What Happens to Retried Messages During Throttling?

When failover is enabled on a service, retried messages are not throttled. The message is sent to the next URI regardless of the operational settings for throttling.

Messages that are expired or that are discarded, because the throttling queue is full or because the service reached its maximum concurrency, are not retried.


  Back to Top       Previous  Next