Database Autonomy Service (DAS) provides a feature to automatically upgrade or downgrade the bandwidth of a Tair (Redis OSS-compatible) 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 a Tair (Redis OSS-compatible) instance.
Prerequisites
The Tair (Redis OSS-compatible) instance is a classic (local disk-based) instance. For more information, see Comparison between cloud-native instances and classic instances.
The Tair (Redis OSS-compatible) instance is a Community Edition instance or an Enhanced Edition instance that uses dynamic random access memory (DRAM) or hybrid storage (discontinued).
The Tair (Redis OSS-compatible) instance uses the standard architecture. For more information, see Standard master-replica instances.
NoteYou can manually adjust bandwidth for Tair (Redis OSS-compatible) instances that use the read/write splitting architecture or cluster architecture. For more information, see Manually increase the bandwidth of an instance.
A service-linked role for DAS is created. For more information, see AliyunServiceRoleForDAS role.
NoteIf you have not created a service-linked role for DAS, DAS can automatically create one when you enable the automatic bandwidth adjustment feature.
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 read and write operations are performed on large keys in your business, you can increase the bandwidth of the instance to prevent your business from being affected. A bandwidth adjustment helps you quickly increase bandwidth in a more 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 Manually increase the bandwidth of an instance.
Common 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.
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. The maximum bandwidth supported by a Tair instance is more than 96 Mbit/s.
Scenario | Description |
Handle traffic spikes | You 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 business | If 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 to process these operations. |
Deal with skewed requests at low costs | If 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 configurations of the instance to which these data shards or read replicas belong. This reduces costs and facilitates O&M. |
Bandwidth scaling process
After you enable the bandwidth auto scaling feature, the system 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.
If your instance uses the cluster or classic read/write splitting architecture, bandwidth monitoring and elastic scaling occur at the level of data shards or read replicas. Each node operates independently from the others.
If your instance uses the cloud-native read/write splitting architecture, updates uniformly take effect across all nodes. The system primarily relies on the node that has the highest bandwidth for read and write operations.
If you enable the subscription service, you are notified of every increase or decrease by the notification method that you select, such as email. For more information about how to enable the subscription service, see the "Procedure" section in this topic.
To ensure that Database Autonomy Service (DAS) can access resources of your instance, the system authorizes DAS to assume the AliyunServiceRoleForDAS role after you enable this feature.
Limits
After the bandwidth of an instance is automatically upgraded, a cooldown period of at least 1 hour is required before automatic bandwidth scale-back can be triggered.
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 has not expired, you must unsubscribe from the bandwidth plan before you can enable the automatic bandwidth adjustment feature. For more information, see Refund Management.
The maximum bandwidth for an instance can be increased up to three times the bandwidth that is allocated to the instance type. For example, the default bandwidth of a 2 GB DRAM-based master-replica instance of Tair (Redis OSS-compatible) Enhanced Edition 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 increase the bandwidth for your instance again based on your business requirements.
Operation
Exception
None
If the instance uses the standard architecture, the bandwidth settings remain valid after you change the configurations of the instance.
If the instance uses the standard architecture, the bandwidth settings remain valid.
Billing
You are charged per hour 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.
You are not charged for the bandwidth that is allocated to the instance type. You are charged only for the extra bandwidth that you purchase.
Procedure
Log on to the DAS console.
In the left-side navigation pane, click Instance Monitoring. On the Instance Monitoring page, click the Redis tab.
On the Redis tab, find the instance that you want to manage and click the instance ID. The instance details page appears.
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.
On the Autonomous Function Settings tab of the Autonomous Function Management panel, enable the autonomy service and complete the settings in the Automatic Bandwidth Upgrade and Automatic Bandwidth Downgrade sections.
On the Optimization and Throttling tab, select Automatic Bandwidth Upgrade and Automatic Bandwidth Downgrade.
Section
Parameter
Description
Automatic Bandwidth Upgrade
Automatic Bandwidth Upgrade
Select Automatic Bandwidth Upgrade to enable this feature.
Average Bandwidth Usage ≥
If the actual average bandwidth usage is greater than or equal to the value of this parameter, automatic bandwidth upgrade is triggered. Unit: %. Compare the average inbound bandwidth usage and the average outbound bandwidth usage. Then, set this parameter to the greater value.
Observation Window
Select the period of the observation window. Unit: minutes.
NoteIn this example, during an observation window of 30 minutes, if the actual 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 bandwidth that is allocated to the current instance type. If the actual average bandwidth usage is less than or equal to 30%, the maximum bandwidth is decreased. The maximum bandwidth can be decreased down to the default bandwidth of the instance.
Automatic Bandwidth Downgrade
Automatic Bandwidth Downgrade
Select Automatic Bandwidth Downgrade to enable this feature. You must select Automatic Bandwidth Upgrade before you can select Automatic Bandwidth Downgrade.
Average Bandwidth Usage ≤
If the actual average bandwidth usage is less than or equal to the value of this parameter, automatic bandwidth downgrade is triggered. Unit: %. Compare the average inbound bandwidth usage and the average outbound bandwidth usage. Then, set this parameter to the smaller value.
Click OK.
Optional. Click the Event Subscription Settings tab, complete the event subscription settings to send notifications when the bandwidth of the instance is automatically upgraded or downgraded.
If the bandwidth of the instance is automatically upgraded or downgraded, DAS generates an event at the Notice level. To use this feature, you must turn on the switch to enable event subscription and configure event notification parameters. For more information, see Event subscription.
In the Alert Configuration section, configure an alert template and subscribe to alert notifications. This helps you understand the status of an automatic bandwidth adjustment task at the earliest opportunity.
The system recommends an alert template and adds alert rules for the required autonomy events in the alert template. You can configure the alert template as prompted.
NoteIf you have configured an alert template for your database instance, you must add alert rules for the required autonomy event to the alert template as prompted.
For more information about how to configure an alert template and alert rules for your database instance, see Configure alert templates and Configure alert rules.
In the Select Contact Group section, select an alert contact group.
Click Add Contact to add an alert contact.
Click Create Contact Group to create an alert contact group.
Find the alert contact that you want to manage and click Edit or Remove in the Actions column to modify or delete information about the alert contact.
For more information, see Manage alert contacts.
Click Submit Configuration. In the dialog box that appears, confirm the configuration.