Basic application settings

Updated at:

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

To use the module adaptation and general settings features, ensure that you meet the following requirements:
  • If your application connects using the SDK, ensure that the ahas-sentinel-client is 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

  1. Log on to the AHAS console.

  2. In the upper-left corner of the AHAS console, select your application's deployment region.

  3. In the left-side navigation pane, choose traffic protection > application protection.

  4. On the application protection page, on the application cards tab, click the target application card.

  5. 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:

  1. In the Module adaptation settings section, click Modify in the Actions column for the target application.
  2. In the Modify module adaptation settings dialog box, configure the parameters.
    ParameterDescriptionExample
    web fallback behaviorDefines 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 codeThe default value is 429. This parameter is required if is set to .429
    Content-TypeThe format of the response body. Valid values: TEXT (plain text) and JSON. This parameter is required if is set to .JSON
    HTTP response bodyThe content of the HTTP response body for a blocked request. This parameter is required if is set to .{"message": "blocked oops"}
    redirect URLThe 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
  3. Click OK.
Note
  • 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:

  1. In the General settings section, click Modify in the Actions column.
  2. In the dialog box, configure the number of instrumented resources, number of origins, number of entries, and maximum statistical RT as needed.
    ParameterDescription
    number of instrumented resourcesLimits the number of resources that can be instrumented. The default is 6,000. Exceeding this limit may cause high memory usage.
    number of originsLimits the number of origin nodes for each resource, a setting used for throttling by caller origin.
    number of entriesLimits the number of entry contexts, a setting used for link-based throttling.
    maximum statistical RTThe 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.
  3. Click OK.