Basic application settings
In the basic settings on the Application Management page, you can switch the protection mode to enhance system protection, configure the processing logic for triggered rules such as throttling, and set limits on the number of cluster nodes and origins. This topic describes how to configure the basic settings for an application.
Prerequisites
- If your application connects using the SDK, ensure that the
ahas-sentinel-clientis version 1.5.0 or later. - If your application connects using an agent, ensure that the agent is version 1.7.1 or later.
Procedure
Log on to the AHAS console.
In the upper-left corner of the AHAS console, select your application's deployment region.
In the left-side navigation pane, choose .
On the application protection page, on the application cards tab, click the target application card.
- In the left-side navigation pane, click application management, and then click the Basic Settings tab.
Configure adaptation module
The module adaptation feature allows you to dynamically configure the fallback behavior for web applications when a rule, such as a throttling rule, blocks a request. Follow these steps:
- In the Module adaptation settings section, click Modify in the Actions column for the target application.
- In the Modify module adaptation settings dialog box, configure the parameters.
Parameter Description Example web fallback behavior Defines the action to take when a protection rule blocks a web API request. The supported policies are: - : Returns a custom response when a request is blocked. This option requires you to specify the HTTP status code, Content-Type, and HTTP response body.
- : Redirects blocked requests to a specified URL. This option requires you to specify the redirect URL.
Return specified content HTTP status code The default value is 429. This parameter is required if is set to . 429 Content-Type The format of the response body. Valid values: TEXT (plain text) and JSON. This parameter is required if is set to . JSON HTTP response body The content of the HTTP response body for a blocked request. This parameter is required if is set to . {"message": "blocked oops"} redirect URL The URL to which blocked requests are redirected. This parameter is required if web fallback behavior is set to Redirect to specified page. Note Redirection is implemented by returning an HTTP 302 status code. It is effective for pages rendered directly by the backend service. However, this method does not work for pages that rely on AJAX requests to fetch and render content.http://ahas.console.aliyun.com - Click OK.
- Adaptation module settings override the corresponding settings passed as a JVM parameter.
- The module adaptation configuration is effective only for the default web throttling logic. If you have registered a custom
UrlBlockHandler, the system ignores this configuration.
General settings
The general settings feature allows you to modify configurations such as the number of instrumented resources, number of origins, number of entries, and maximum statistical RT for your application. Follow these steps:
- In the General settings section, click Modify in the Actions column.
- In the dialog box, configure the number of instrumented resources, number of origins, number of entries, and maximum statistical RT as needed.
Parameter Description number of instrumented resources Limits the number of resources that can be instrumented. The default is 6,000. Exceeding this limit may cause high memory usage. number of origins Limits the number of origin nodes for each resource, a setting used for throttling by caller origin. number of entries Limits the number of entry contexts, a setting used for link-based throttling. maximum statistical RT The maximum Response Time (RT), in milliseconds (ms), to record for statistics. The default value is 4,900 ms. Any RT value above this limit is recorded as the limit. - Click OK.