...
- Sign in. Enter your user name and password to log on to the ESB Management Console.
- Click the Main tab. Under Web Services, click List to open the Deployed Services page.
- Click on the service for which you want to enable throttling to open its Service Dashboard.
In the Quality of Service Configuration panel, click Access Throttling. The Throttling Configuration page for the service will appear.
In the Enable Throttling parameter, select Yes. The existing throttle configuration will appear in the wizard as shown in the example below.
Configure the following parameters as required to update the throttle policy.
Parameter Name Description Maximum Concurrent Accesses The maximum number of requests served concurrently by the service at any given time. Range The range of IP addresses or the domain (based on the value selected for the Type parameter) to be restricted from accessing the service. Requests from these IP addresses/domains will be restricted based on the specified values.
Type This specifies the basis on which the clients should be restricted from accessing the proxy service. Possible values are as follows.
- IP: This restricts access to the service based on the IP address of the client. If you select this, enter the relevant range ofIP addresses in the Range parameter (e.g.,
10.100.1.30-10.100.1.60
). - Domain: This restricts access to the service based on the domain of the client. If you select this, enter the relevant domain in the Range parameter (e.g.,
*.wso2.com
).
Max Request Count Anchor MRC MRC This parameter specifies the maximum number of requests that should be handled within the time interval specified in the Unit Time parameter.
Tip This parameter is applicable only when the value selected for the Access parameter is
Control
.Unit Time (ms) Anchor UT UT The time interval for which the maximum number of requests specified for the Throttle ID in the Max Request Count parameter apply.
Tip This parameter is applicable only when the value selected for the Access parameter is
Control
.Prohibit Time Period (ms) Anchor PTP PTP 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
Unit Time = 50000 ms
Prohibit Time Period = 5000 msIf 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.
Tip This parameter is applicable only when the value selected for the Access parameter is
Control
.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.
- Allow: If this is selected, the specified IP addresses/domains are allowed to access the services to which the throttle ID is applied without any restrictions.
- Deny: If this is selected, specified IP addresses/domains are not allowed to access the services to which the throttle ID is applied.
- Control: If this is selected, the specified IP addresses/domains are allowed to access the services to which the throttle ID is applied. However, the number of times they can access the services is controlled by the Max Request Count , Unit Time (ms) ,and the Prohibit Time Period (ms) parameters.
Actions Click Delete in the relevant row to delete an entry. - IP: This restricts access to the service based on the IP address of the client. If you select this, enter the relevant range ofIP addresses in the Range parameter (e.g.,
...
You can create as many entries as required by clicking Add New Entry.
- Click Finish to save the information.
Info | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
You can also specify the throttle policy within a proxy service configuration as a key by saving the policy in the registry or by saving it as a local entry. However, when you are not using the Management Console, you are required to manually create an entry in the
The following is an example of a throttle policy configuration that can be saved in the registry or as a local entry.
|
3. In the "Manage" menu, click on "List" under "Web Services."
...