You can set the #no_loose_disabled-commands parameter in the console to disable certain commands that may degrade service performance and cause data loss.
Unlimited usage of commands may cause some issues in certain scenarios. Some Redis commands can delete most of or all data in a database, such as FLUSHALL and FLUSHDB. Improper uses of some commands such as KEYS and HGETALL cause process blocking in the single-threading Redis model and reduce service performance. To ensure stable and efficient management, you can disable these types of commands to minimize risks in your workloads.
Set the parameter in the ApsaraDB for Redis console
- Log on to the ApsaraDB for Redis console.
- On the top of the page, select the region where the instance is located.
- In the left-side navigation pane, click Instance List to go to the Instance List page. Find the instance that you want to manage, and click the instance ID, or click the More icon and select Manage in the Action column for the instance.
- The Instance Information page is displayed by default. In the left-side navigation pane, click System Parameters.
- On the System Parameters page, find the #no_loose_disabled-commands parameter and click Modify in the Action column for the parameter.
- In the dialog box that appears, specify the commands to be disabled and click OK.
- The parameter value can only contain lowercase letters. Separate multiple commands with commas (,).
- Commands that can be disabled include FLUSHALL, FLUSHDB, KEYS, HGETALL, EVAL, EVALSHA, and SCRIPT.
Call API operations to set parameters
You can also call the ModifyInstanceConfig operation to set parameters.