Database Autonomy Service (DAS) provides a feature to automatically scale the bandwidth of an ApsaraDB for Redis instance. DAS can detect the average bandwidth usage in real time to help you handle expected or unexpected traffic spikes so that you can focus on improving your business. This topic describes how to enable the automatic bandwidth adjustment feature 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. A bandwidth adjustment helps you quickly increase bandwidth in a cost-effective way than an instance type change. A bandwidth adjustment immediately takes effect and does not cause transient connections. For more information about how to adjust the bandwidth, see 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 instance performance may deteriorate. To prevent these situations, you can enable the bandwidth auto scaling feature. A bandwidth adjustment helps you increase bandwidth at a lower cost than an instance specification change and can help prevent transient connections.

Note If the instance is a Community Edition instance that requires a sharp bandwidth increase, we recommend that you change the instance into an Enhanced Edition (Tair) instance. This is because a Tair instance can support a bandwidth of 96 Mbit/s or more.
ScenarioDescription
Handle traffic spikesYou can adjust the bandwidth of the instance to handle traffic spikes during promotional events such as a flash sale. After these events end, you can decrease the bandwidth of the instance to reduce costs.
Mitigate impacts on your businessIf a large number of read and write operations are performed on large keys within a short period of time, you must temporarily increase the bandwidth of the instance to mitigate impacts on your business and reserve time for processing these operations.
Deal with request skew at low costsIf your instance uses the cluster or read/write splitting architecture, specific data shards or read replicas of the instance are more frequently accessed than others. As a result, the bandwidth consumption of these data shards or read replicas frequently reaches the allocated bandwidths. However, the usage of the bandwidths that are allocated to 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 bandwidths are insufficient and increases the bandwidths for them. You do not need to manually increase the bandwidth or change the specifications of the instance to which these data shards or read replicas belong. This reduces costs and facilitates O&M.

Auto bandwidth scaling 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 increment or decrement is calculated by the system.

  • If the bandwidth increase threshold of an instance is reached, the system 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 this 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 uses 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 by the notification method that you select, such as an email. For more information about how to enable the subscription service, see the "Procedure" section of this topic.
  • To ensure that DAS can access resources of your ApsaraDB for Redis instance, the system authorizes DAS to assume the AliyunServiceRoleForDAS role after you enable this feature.

Limits

  • You can enable the automatic bandwidth adjustment feature for an instance only after all bandwidth plans of the instance expire. If a bandwidth plan of the instance does not expire, you must unsubscribe from the bandwidth plan before you can enable the automatic bandwidth adjustment feature. For more information, see Rules for unsubscribing from resources.
  • The maximum bandwidth for an instance can be increased up to three times the bandwidth that is provided for the instance type. For example, the default bandwidth of a 2 GB DRAM-based master-replica instance of ApsaraDB for Redis Enhanced Edition (Tair) is 96 MB/s. In this case, the maximum bandwidth of the instance can be increased up to 288 MB/s.

    If you want to further increase the bandwidth, you can change the instance configurations or upgrade the instance architecture. For example, you can upgrade the instance architecture from the standard architecture to the cluster architecture. For more information, see Overview.

  • If you perform one of the following operations, the purchased extra bandwidth automatically becomes invalid and your money is refunded. You can re-increase the bandwidth for your instance based on your business requirements.
    OperationException
    Upgrade the major versionNone
    Change the configurations of an instanceIf the instance is a standard instance, the bandwidth settings remain valid after you change the configurations of the instance.
    Migrate an instance across zonesIf the instance is a standard instance, the bandwidth settings remain valid.

Billing

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.

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 and 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.
  5. On the Autonomous Function Settings tab of the Autonomous Function Management panel, enable the autonomy service and complete Automatic Bandwidth Upgrade and Automatic Bandwidth Downgrade settings. Then, click the Event Subscription Settings tab. On the Event Subscription Settings tab, enable the subscription service and complete the event subscription settings.
    1. On the Optimization and Throttling tab, select Automatic Bandwidth Upgrade and Automatic Bandwidth Downgrade.
    das
    SectionParameterDescription
    Automatic Bandwidth UpgradeAutomatic Bandwidth UpgradeSelect Automatic Bandwidth Upgrade to enable this feature.
    The average bandwidth usage is not less thanIf the value of the The average bandwidth usage is not less than parameter is greater than or equal to the threshold value that you specify for this parameter, automatic bandwidth adjustment is triggered. Unit: %. Compare the average inbound bandwidth usage and the average outbound bandwidth usage. Then, set the The average bandwidth usage is not less than parameter to the greater value.
    Observation WindowSelect the period of the observation window. Unit: minutes.
    Note In this example, 30 minutes is selected. During this observation window, if the value of the The average bandwidth usage is not less than parameter 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 that is provided for the current instance type. If the value of the The average bandwidth usage is not less than parameter is less than or equal to 30%, the maximum bandwidth is decreased. The lowest bandwidth that you can specify is the default bandwidth of the instance.
    Automatic Bandwidth DowngradeAutomatic Bandwidth DowngradeSelect Automatic Bandwidth Upgrade to enable this feature. You must select Automatic Bandwidth Upgrade before you can select Automatic Bandwidth Downgrade.
    The average bandwidth usage is not greater thanIf the value of the The average bandwidth usage is not greater than parameter is less than or equal to the threshold value that you specify for this parameter, automatic bandwidth downgrade is triggered. Unit: %. Compare the average inbound bandwidth usage and the average outbound bandwidth usage. Then, set the The average bandwidth usage is not greater than parameter to the smaller value.
  6. Click the Event Subscription Settings tab. On the Event Subscription Settings tab, configure the parameters that are described in the following table.
    a
    ParameterDescription
    Enable Subscription ServiceTurn on the switch to enable the feature. If an event of the specified level or a higher level occurs, DAS uses the specified method such as an email to send you a message This ensures that you are notified when events occur on your instance.
    UrgencySelect 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: events that affect the running of the databases.
    • Warning: events that may affect the operation of the databases.
    • Optimize: events about optimization suggestions that are generated based on the running status of the database.
    • Notification: basic events and events related to performance snapshots.
    Note To subscribe to automatic scale-up events and scale-down suggestions, select the Notification or Optimize level.
    Select Contacts/Contact GroupsSelect 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 MethodSelect a notification method. You can select one or more methods. We recommend that you select at least SMS to ensure timeliness.
    Notification LanguageOnly Chinese is supported.
    Minimum Notification IntervalSelect 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 first receive a notification for the event, you are notified again 5 minutes later.
  7. Click OK.