Tair (Redis OSS-compatible) integrates the automatic scale-up feature of Database Autonomy Service (DAS). After you enable this feature for an instance, DAS scales up the instance if the average memory usage of the instance reaches the specified threshold. This helps you quickly cope with business peaks, prevent memory overflow, and ensure online business stability.
Prerequisites
The instance meets the following requirements:
The instance is deployed in cloud-native mode.
The instance uses the standard architecture. For more information, see Standard architecture.
Billing
You are charged only for the scale-up. For more information, see Configuration changes.
Process of automatic scale-up
Figure 1. Process of automatic scale-up
After the automatic scale-up feature is enabled for an instance, DAS monitors the average memory usage of the instance within the observation window. If the average memory usage reaches the specified threshold, DAS doubles the memory size of the instance, for example, from 1 GB to 2 GB. After the scale-up is complete, DAS continues to monitor the average memory usage. If the automatic scale-up condition is met again, DAS performs another scale-up of the instance until the specified maximum memory size is reached.
However, DAS does not directly scale down the instance. After you enable the subscription service, if the average memory usage of the instance drops below 30% within the observation window, DAS sends you a scale-down suggestion by using the specified notification method such as email. You can manually scale down the instance at an appropriate time to improve resource utilization. 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 instance, the system authorizes DAS to assume the AliyunServiceRoleForDAS role after you enable this feature.
If a manual configuration change is performed after an automatic scale-up, DAS determines that you have manually scaled down the instance and does not send a scale-down suggestion to you. DAS sends a scale-down suggestion to you only after another automatic scale-up is triggered and the threshold for sending a scale-down suggestion is reached.
Impacts of automatic scale-up
If you change the configurations of an instance, the instance may experience one or two transient connections that each lasts up to 30 seconds.
To synchronize incremental data from the original instance to the new instance and prevent dual writes caused by Domain Name System (DNS) caching, the instance remains read-only for up to 1 minute during the configuration change. This ensures data consistency between the new instance and the original instance.
If the minor version of the instance is outdated, the system updates the instance to the latest minor version to ensure high performance and stability.
Procedure
Log on to the console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click its ID.
In the Configuration Information section, turn on Auto Scaling.
In the DAS console, configure the settings for automatic scale-up and event subscription.
Choose , select Automatic Scale-up/out, and then configure automatic scale-up parameters.
Parameter
Description
Average Memory Usage
Select the threshold of average memory usage for triggering an automatic scale-up. Unit: percent (%). Valid values: 50 to 90. You can adjust the threshold at a step value of 10%.
Maximum Specifications
Select the maximum memory size to which you can scale up the instance. If the average memory usage of the instance reaches the specified threshold, DAS doubles the memory size of the instance, for example, from 1 GB to 2 GB. After the scale-up is complete, DAS continues to monitor the average memory usage. If the automatic scale-up condition is met again, DAS performs another scale-up of the instance until the specified maximum memory size is reached.
Observation Window
Select the length of the observation window. Unit: minutes. The maximum value is 30 minutes.
NoteIn this example, if the average memory usage of the instance is greater than or equal to 70% within the 30-minute observation window, DAS scales up the instance by doubling its memory size. The memory size can be increased to up to 64 GB.
(Optional) On the Event Subscription Settings tab, complete the settings as prompted.
Parameter
Description
Enable Subscription Service
Turn on the switch to enable the feature. If an event of a specified or higher level occurs, DAS notifies you of the event by using the specified method such as email. This ensures that you are notified at the earliest opportunity when events occur on your instance.
Urgency
Select the lowest level of events for which DAS sends notifications. If an event of a specified or higher level occurs, DAS sends a notification. Valid values:
Critical: events that affect the operation of databases.
Warning: events that may affect the operation of databases.
Optimize: events about optimization suggestions that are generated based on the status of your databases.
Notification: basic events and events related to performance snapshots.
NoteTo subscribe to automatic scale-up events and scale-down suggestions, select the Notification 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.
NoteIf no contacts or contact groups are available, you must create a contact or contact group. For more information, see Manage alert contacts.
Notification Method
Select a notification method. You can select one or more methods. We recommend that you select at least SMS to ensure timeliness.
Notification Language
Select the language of notifications. Only Chinese is supported.
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.
Click OK.
Return to the console. On the details page of the instance, the switch corresponding to Auto Scaling is turned on.
FAQ
Why is the automatic scale-up feature disabled after read/write splitting is enabled for a cluster instance?
Only the standard architecture supports the automatic scale-up feature. Therefore, after read/write splitting is enabled for the cluster instance, the automatic scale-up feature is disabled.
References
Shards can be automatically added to Redis Open-Source Edition cloud-native cluster instances. For more information, see Automatic shard addition.