What Are the Constraints on Implementing Multi-DB on a Proxy Cluster Instance?
Note the following constraints when you consider implementing multi-DB:
- Usage constraints:
- The SWAPDB command does not support multi-DB.
- The INFO KEYSPACE command does not return data of multi-DB.
- To query the total number of keys in each database, use the customized dbstats command. CPU usage will surge on the node executing this command.
- LUA scripts do not support multi-DB.
- The RANDOMKEY command does not support multi-DB.
- The SELECT command cannot be embedded in transactions.
- PUBLISH cannot be used in Lua scripts.
- The database number ranges from 0 to 255.
- Performance constraints
- The FLUSHDB command deletes keys one by one, which takes a long time and is slower than the open-source native implementation. The execution speed of the FLUSHDB command is the same as that of the SCAN command (which should be tested by the customer).
- The DBSIZE command is time-consuming. Do not use it in the code.
- If multi-DB is used, the performance of the KEYS and SCAN commands deteriorates by up to 50%.
- Other constraints:
The backend storage rewrites keys based on certain rules. Keys in the exported RDB file are not the original keys. However, the access through the Redis protocol is not affected.
Procedure for Enabling or Disabling Multi-DB
By default, a Proxy Cluster instance is not enabled with multi-DB. Before enabling or disabling multi-DB for an instance, clear the instance data. Do as follows to enable multi-DB.
- Log in to the DCS console.
- Connect to the instance and run the FLUSHALL command to clear the instance data.
- On the Cache Manager page of the DCS console, click the desired DCS instance.
- Choose Instance Configuration > Parameters.
- To enable multi-DB, click Modify in the row that contains parameter multi-db, and change its value to yes.
To disable multi-DB, change the value to no.
- Click Save and then confirm the modification. The instance does not need to be restarted.
Redis Usage FAQs
- Can I Change the CPU Architecture?
- Can I Change the AZ for an Instance?
- Can I Change the VPC and Subnet for a DCS Redis Instance?
- Can I Customize or Change the Port for Accessing a DCS Instance?
- Can I Modify the Connection Addresses for Accessing a DCS Instance?
- Why Do I Fail to Delete an Instance?
- Why Does It Take a Long Time to Start a Cluster DCS Instance?
- What Should I Do If an Error Occurs in redis_exporter?
- What Is Reserved Memory? How Do I Configure Reserved Memory?
- Why Is Available Memory Smaller Than Instance Cache Size?
- Why Is Redisson Distributed Lock Not Supported by DCS Proxy Cluster Redis 3.0 Instances?
- Does DCS for Redis Provide Backend Management Software?
- Can I Recover Deleted Data of a DCS Instance?
- Why Is Available Memory of Unused DCS Instances Less Than Total Memory and Why Is Memory Usage of Unused DCS Instances Greater Than Zero?
- How Do I Estimate Redis Memory Usage?
- Why Is the Capacity or Performance of a Shard of a Redis Cluster Instance Overloaded When That of the Instance Is Still Below the Bottleneck?
- Why Does an OOM Error Occur During a Redis Connection?
- What Clients Can I Use for Redis Cluster in Different Programming Languages?
- Why Do I Need to Configure Timeout for Redis Cluster?
- Why Am I Seeing a Timeout Error When Reading Data from Redis?
- Explaining and Using Hash Tags
- Why Does a Key Disappear in Redis?
- Will Cached Data Be Retained After an Instance Is Restarted?
- How Do I Know Whether an Instance Is Single-DB or Multi-DB?
- What Are the Constraints on Implementing Multi-DB on a Proxy Cluster Instance?
- How Do I Buy a Multi-DB Proxy Cluster Instance?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore