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 automatic bandwidth adjustment for an ApsaraDB for Redis instance.
Prerequisites
- The instance is an instance of the ApsaraDB for Redis Community Edition or a performance-enhanced or hybrid-storage instance of the ApsaraDB for Redis Enhanced Edition (Tair). For more information about performance-enhanced instances and hybrid-storage instances, see Performance-enhanced instances and Hybrid-storage instances (phased out).
- The ApsaraDB for Redis instance is a standard instance.
Note Read/write splitting instances and cluster instances allow you to manually adjust the maximum bandwidth value. For more information, see Adjust the bandwidth of an ApsaraDB for Redis instance.
- A Resource Access Management (RAM) role that is linked to DAS is created to enable
automatic bandwidth adjustment. For more information, see AliyunServiceRoleForDAS role.
Note If you have not created a RAM role that is linked to DAS, DAS can automatically create a service-linked role when you enable automatic bandwidth adjustment.
Background information
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.
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 to reserve time to process these operations. |
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 more frequently accessed than others.
For more information about the cluster and read/write splitting architecture, see
Cluster master-replica instances and Read/write splitting instances. 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 bandwidth is insufficient and increases the bandwidth 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. |
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 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 by 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. 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 becomes invalid and you receive a refund. You must re-adjust the instance
bandwidth based on your business requirements. By default, the adjusted bandwidth
inherits the expiration time of the previously purchased extra bandwidth.
Operation Exception Upgrade the major version None 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.
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 and prices.