Anti-DDoS Pro and Anti-DDoS Premium both allow you to configure the session persistence feature for protected non-website service. Session persistence forwards requests from the same client to the same server within a specific period. After you add forwarding rules to an Anti-DDoS Pro or Anti-DDoS Premium instance and associate the instance with a non-website service, you can configure session persistence or health checks for a port forwarding rule or multiple rules at a time.

Prerequisites

You have created port forwarding rules. For more information, see Create a rule.

Background information

Anti-DDoS Pro and Anti-DDoS Premium provide protection against DDoS attacks based on IP addresses and ports. The session persistence feature is available to all non-website service. You can configure session persistence for the forwarding port of a specific instance.

Configure session persistence for ports

  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select the region of your Anti-DDoS instance.
    • Mainland China: Anti-DDoS Pro
    • Outside Mainland China: Anti-DDoS Premium
  3. In the left-side navigation pane, choose Provisioning > Port Config.
  4. On the Port Config page, select the instance for which you want to configure session persistence, find the target forwarding rule, and click Change in the Session Persistence column.Session persistence
    Note You can also configure session persistence for multiple forwarding rules of an instance at a time. For more information, see Configure session persistence or health checks for multiple rules at a time.
  5. In the Session Persistence dialog box, set Timeout Period and click Complete. The timeout period is measured in seconds, and the valid value ranges from 30 to 3600.Session persistence

Configure session persistence or health checks for multiple rules at a time

  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select the region of your Anti-DDoS instance.
    • Mainland China: Anti-DDoS Pro
    • Outside Mainland China: Anti-DDoS Premium
  3. In the left-side navigation pane, choose Provisioning > Port Config.
  4. On the Port Config page, select the target instance, click Batch Operations below the rule list, and select Session Persistence/Health Check Settings.
  5. In the Create Session/Health Settings dialog box, enter the required information and click Create.Create Session/Health Settings dialog box
    Note You can export health check settings to a TXT file, modify the settings in the TXT file, and then copy and paste the settings to the Create Session/Health Settings dialog box. In the TXT file, keep the settings of all rules in the same format. For more information, see Export multiple port configurations.

    The format of configurations for session persistence or health check is described as follows:

    • Enter the session persistence and health check settings of each forwarding rule in each row.
    • From left to right, each configuration of session persistence and health check contains the following fields: forwarding port, forwarding protocol, session persistence period, health check type, port, health check timeout period, check interval, unhealthy threshold, healthy threshold, path, and domain. The forwarding protocol can be TCP or UDP. The session persistence period is measured in seconds, and the valid value ranges from 30 to 3600. Fields are separated with spaces. For more information about the fields, see Health check parameters.
    • The forwarding port must be specified in forwarding rules.
    • Health check types include TCP, HTTP, and UDP. If a forwarding rule uses UDP, we recommend that you configure a UDP health check. If a forwarding rule uses TCP, we recommend that you configure a TCP health check (Layer 4 health check) or HTTP health check (Layer 7 health check).
    • If you configure an HTTP health check, the Path parameter is required, but the Domain parameter is optional.