Database Autonomy Service (DAS) provides a feature to automatically increase and reduce the bandwidth of an ApsaraDB for Redis instance. DAS can detect the average bandwidth usage in real time. This helps you handle abrupt or expected traffic spikes and focus on service improvement. This topic describes how to enable automatic bandwidth adjustment for an ApsaraDB for Redis instance.

Prerequisites

Background information

The bandwidth of an instance varies based on the instance type. If the bandwidth in use reaches the allocated bandwidth, network congestion may occur and the performance of the instance may deteriorate. When your instance needs to process data during peak hours or a large number of large key reads and writes occur in your business, you must increase the bandwidth limit to prevent your business from being affected. You can manually increase the bandwidth in a quick manner. This reduces overall costs and does not cause transient connections. This feature is an out-of-box feature. These advantages of the feature cannot be provided if you change the instance type to increase the bandwidth. For more information about how to adjust the bandwidth, see Manually adjust the bandwidth of an ApsaraDB for Redis instance.

Scenarios

The bandwidth of an instance varies based on the instance type. If the bandwidth in use reaches the allocated bandwidth, network congestion may occur and the performance of the instance may deteriorate. To prevent these situations, you can enable the bandwidth auto scaling feature. Compared with an instance specification change, a bandwidth adjustment helps you increase the bandwidth at lower costs and prevent transient connections.

Scenario Description
Flexibly handle traffic spikes The bandwidth auto scaling feature adjusts the bandwidth of an ApsaraDB for Redis instance based on your business requirements. For example, this feature increases the bandwidth during a flash sale during which traffic spikes are scheduled. After the flash sale ends, this feature decreases the bandwidth to reduce costs.
Mitigate impacts on your business If a large number of read and write operations are performed on big keys within a short period of time, this feature temporarily increases the bandwidth of the instance to mitigate impacts on your business and to reserve time to process operations on big keys.
Deal with skewed requests at low costs If your instance is in the cluster or read/write splitting architecture, some data shards or read replicas of the instance are frequently accessed. As a result, the bandwidth in use of these data shards or read replicas frequently reaches the allocated bandwidths. However, the usage of the bandwidths that are allocated to the other data shards or read replicas is low.

After you enable the bandwidth auto scaling feature, the system identifies the data shards or read replicas whose allocated bandwidth is insufficient and automatically increases the bandwidth for them. You do not need to increase the bandwidth or change the specifications of the instance. This reduces costs and facilitates O&M.

Process

After you enable the bandwidth auto scaling feature, the system automatically performs the following operations based on the auto scaling policy and observation window that you configure. The increase or decrease amount is calculated by the system.

  • If the bandwidth increase threshold of an instance is reached, the system automatically increases the bandwidth and continues to monitor bandwidth usage. If the threshold is reached again, the system increases the bandwidth again. The bandwidth can be increased up to three times the default bandwidth of the instance type. If you want to increase the bandwidth limit, you can upgrade the specifications of your instance and then adjust the bandwidth.
  • If the bandwidth decrease threshold of an instance is reached, the system decreases the bandwidth and continues to monitor bandwidth usage. If the threshold is reached again, the system decreases the bandwidth again. The bandwidth can be decreased to the default bandwidth of the instance type.
Note
  • If your instance is in the cluster or read/write splitting architecture, the system monitors the bandwidth usage of data shards and read replicas and increases the bandwidth only for the data shards or read replicas whose allocated bandwidth is insufficient.
  • If you enable the subscription service, you are notified of every increase or decrease in the notification method that you select, such as an email. For more information about how to enable the subscription service, see the relevant section in this topic.
  • To ensure that DAS can access resources of your ApsaraDB for Redis instance, the system authorizes DAS to use the AliyunServiceRoleForDAS role after you enable this feature.

Limits

  • The bandwidth of an instance can be increased to up to three times the bandwidth that is provided for the instance type. If you require higher bandwidth for an instance, you can change the specifications of the instance or upgrade the instance from a standard instance to a cluster instance. Then, you can increase the bandwidth of the instance to a higher value. If the increased bandwidth is still insufficient, submit a ticket.
    Note For more information about the bandwidths that are supported by different instance types, see Overview.
  • If you perform the following operations on an instance, the extra bandwidth that you purchased automatically becomes invalid and you will receive a refund. You must re-adjust the bandwidth of the instance based on your business requirements. By default, the expiration time of the previously purchased extra bandwidth is inherited.
    Operation Exception
    Upgrade the major version N/A
    Change the configurations of an instance If the instance is a standard instance, the bandwidth settings remain valid after you change the specifications of the instance.
    Migrate an instance across zones If the instance is a standard instance, the bandwidth settings remain valid.

Pricing

You are charged per day based on the amount and usage duration of the extra bandwidth that you purchase. The fees vary based on the region that you select. For more information, see Billable items and prices.

Note You are not charged for the bandwidth that is provided for the instance type. You are charged only for the extra bandwidth that you purchase.

Procedure

  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Instance Monitoring. On the Instance Monitoring page, click the Redis tab.
    Instance monitoring
  3. On the Redis tab, find the instance that you want to manage. Then, click the instance ID. The instance details page appears.
  4. In the left-side navigation pane of the instance details page, click Autonomy Center. In the upper-right corner of the page that appears, click Autonomy Service Settings.
    9
  5. In the Settings dialog box, click Enable Autonomy Service and configure the Automatic Bandwidth Upgrade and Automatic Bandwidth Downgrade parameters. Then, click the Event Subscription Settings tab. On the Event Subscription Settings tab, configure Enable Subscription Service.
    1. Configure Automatic Bandwidth Upgrade and Automatic Bandwidth Downgrade.
    das
    Category Parameter Description
    Automatic Bandwidth Upgrade Automatic Bandwidth Upgrade Turn on the switch to enable the feature.
    Average Bandwidth Usage If the value of Average Bandwidth Usage is greater than or equal to the threshold value that you specify for this parameter, automatic bandwidth upgrade is triggered. The value of this parameter is a percentage. Compare the average usage of inbound traffic and the average usage of outbound traffic. Then, specify the greater value as Average Bandwidth Usage.
    Observation Window Select a period of the observation window. Unit: minutes.
    Note In this example, 30 Minutes is selected. During this observation window, if the value of Average Bandwidth Usage is greater than or equal to 70%, the maximum bandwidth of the instance is increased. The maximum bandwidth can be increased up to three times the maximum bandwidth of an instance of the current specification. If the value of Average Bandwidth Usage is smaller than or equal to 30%, the maximum bandwidth is decreased. The lowest bandwidth that you can specify is the default bandwidth of an instance of the current specification.
    Automatic Bandwidth Downgrade Automatic Bandwidth Downgrade Turn on the switch to enable the feature. Before you turn on Automatic Bandwidth Downgrade, turn on Automatic Bandwidth Upgrade.
    Average Bandwidth Usage If the value of Average Bandwidth Usage is smaller than or equal to the threshold value that you specify for this parameter, automatic bandwidth downgrade is triggered. The value of this parameter is a percentage. Compare the average usage for inbound traffic and the average usage for outbound traffic. Then, specify the smaller value as Average Bandwidth Usage.
  6. Click the Event Subscription Settings tab. On the Event Subscription Settings tab, configure the parameters as prompted.
    a
    Parameter Description
    Enable Subscription Service Turn on the switch to enable the feature. If an event at the specified or higher level occurs, DAS notifies you of the event by using the specified method, such as an email. This ensures that you are notified when events occur on your instance.
    Urgency Select the lowest level of events for which DAS sends notifications. If an event of the specified level or a higher level occurs, DAS sends a notification. Valid values:
    • Critical: the events that affect the running of the database.
    • Warning: the events that may affect the running of the database.
    • Optimize: the events for which optimization suggestions are generated based on the status of the database.
    • Notification: the events about performance snapshots and the basic events.
    Note To subscribe to automatic scale-up events and scale-down suggestions, select the Notification or Optimize level.
    Select Contacts/Contact Groups Select contacts or contact groups in the Existing Contacts/Contact Groups section and click the > icon to move them to the Selected Contacts/Contact Groups section.
    Notification Method Select a notification method. You can select one method or multiple methods. We recommend that you select at least text message notifications. This notification method has better timeliness.
    Notification Language Select a notification language. Valid values: Chinese and English.
    Minimum Notification Interval Select the minimum interval between two notifications about the same event. For example, you can set the interval to 5 minutes. In this case, if the event occurs again after you receive the first notification about the event, you are notified again 5 minutes later.
  7. Click OK.