...
- A throttle policy which defines the extent to which individual , individuals and groups of IP addresses/domains should be allowed to access the service.
- A mediation sequence to handle requests that were accepted based on the throttle policy.
- A mediation sequence to handle requests that were rejected based on the throttle policy.
...
Table of Contents | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Syntax
...
This section is used to specify the throttle policy that should apply to the requests passing through the Throttle mediator. A throttle policy cash have has a number of entries , each defining the extent to which, an individual or a group of IP Addressesaddresses/domains should be allowed to access the service to which throttling is applied.
The parameters available to be configured in this section are as follows.
Parameter Name | Description |
---|---|
Throttle Policy | This section is used to specify the policy for throttling. The following options are available.
|
The parameters available in the Mediator Throttling Configuration dialog box to configure the Throttling policy are as follows.
Parameter Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Maximum Concurrent Accesses | The maximum number of messages that are served at a given time. The number of messages between the inflow throttle handler and the outflow throttle handler cannot exceed the value entered for this parameter at any given time. This parameter value is applied to the entire system. It is not restricted to one or more specific IP addresses/domains.
| ||||||||
Range | This parameter is used to specify the IP addresses/domains to which the entry in the current row should be applied
| ||||||||
Type | This parameter is used to specify whether the value(s) entered in the Range parameter refers to IP addresses or domains. | ||||||||
Max Request Count
| This parameter specifies the maximum number of requests that should be handled within the time interval specified in the Unit Time parameter.
| ||||||||
Unit Time (ms)
| The time interval for which the maximum number of requests specified for the Throttle ID in the Max Request Count parameter apply.
| ||||||||
Prohibit Time Period (ms)
| If the number of requests entered in the Max Request Count parameter is achieved before the time interval entered in the Unit Time (ms) parameter has elapsed, no more requests are taken by the inflow throttle handler for the time period entered in this parameter. Entering a value in this parameter alters the unit time. For example: Max Request Count = 50 If 50 requests are received within 35000 milliseconds, no requests will be taken for the next 5000 milliseconds. Thus, the time slot considered as the unit time is changed to 40000 milliseconds. If no value is entered in the Prohibit Time Period (ms) parameter, no requests will be taken until 15000 more milliseconds (i.e. the remainder of the unit time) have elapsed.
| ||||||||
Access | This parameter is used to specify he extent to which the IP addresses/domains specified in the Range parameter are allowed access to the service to which the throttle policy is applied. Possible values are as follows.
| ||||||||
Action | This parameter can be used to delete the entry. |
On Acceptance
This section is used to specify the mediation sequence that should be applied when a request is accepted based on the throttle policy defined for the Throttle mediator. The parameters available to be configured in this section are as follows.
Parameter Name | Description |
---|---|
Specify As | This parameter is used to specify how the On Acceptance sequence is defined. The following options are available.
|
On Rejection
This section is used to specify the mediation sequence that should be applied when a request is rejected based on the throttle policy defined for the Throttle mediator. The parameters available to be configured in this section are as follows.
Parameter Name | Description |
---|---|
Specify As | This parameter is used to specify how the On Acceptance sequence is defined. The following options are available.
|
Info | ||
---|---|---|
| ||
You can configure the mediator using XML. Click switch to source view in the Mediator window. |
...
Example
In this example, the Throttle Mediator inside the In Mediator. Therefore, all request messages directed to the main sequence will be subjected to throttling. The Throttle Mediator has policy
, onAccept
and onReject
tags at top level. The policy
tag specifies the throttling policy for throttling messages. This sample policy only contains a component called MaximumConcurrentAccess
. This indicates the maximum number of concurrent requests that can pass through Synapse on a single unit of time, and this value applies to all the IP addresses and domains.
...