Compare commits
2 Commits
main
...
propose-dc
Author | SHA1 | Date | |
---|---|---|---|
33d6e9ce04 | |||
066fe4a0bc |
BIN
umn/source/_static/images/en-us_image_0000001383077054.png
Normal file
BIN
umn/source/_static/images/en-us_image_0000001383077054.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
@ -14,59 +14,59 @@ The following lists the DCS operations that can be recorded by CTS.
|
|||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Operation | Resource Type | Trace Name |
|
| Operation | Resource Type | Trace Name |
|
||||||
+========================================================+===============+======================================+
|
+========================================================+===============+======================================+
|
||||||
| Creating an instance | DCS | createDCSInstance |
|
| Creating an instance | Redis | createDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting an instance creation request | DCS | submitCreateDCSInstanceRequest |
|
| Submitting an instance creation request | Redis | submitCreateDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Deleting multiple instances | DCS | batchDeleteDCSInstance |
|
| Deleting multiple instances | Redis | batchDeleteDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Deleting an instance | DCS | deleteDCSInstance |
|
| Deleting an instance | Redis | deleteDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Modifying instance information | DCS | modifyDCSInstanceInfo |
|
| Modifying instance information | Redis | modifyDCSInstanceInfo |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Modifying instance configurations | DCS | modifyDCSInstanceConfig |
|
| Modifying instance configurations | Redis | modifyDCSInstanceConfig |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Changing instance password | DCS | modifyDCSInstancePassword |
|
| Changing instance password | Redis | modifyDCSInstancePassword |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Restarting an instance | DCS | restartDCSInstance |
|
| Restarting an instance | Redis | restartDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting an instance restarting request | DCS | submitRestartDCSInstanceRequest |
|
| Submitting an instance restarting request | Redis | submitRestartDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Starting an instance | DCS | startDCSInstance |
|
| Starting an instance | Redis | startDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting an instance starting request | DCS | submitStartDCSInstanceRequest |
|
| Submitting an instance starting request | Redis | submitStartDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Clearing instance data | DCS | flushDCSInstance |
|
| Clearing instance data | Redis | flushDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Restarting instances in batches | DCS | batchRestartDCSInstance |
|
| Restarting instances in batches | Redis | batchRestartDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting a request to restart instances in batches | DCS | submitBatchRestartDCSInstanceRequest |
|
| Submitting a request to restart instances in batches | Redis | submitBatchRestartDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Starting multiple instances | DCS | batchStartDCSInstance |
|
| Starting multiple instances | Redis | batchStartDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting a request to start instances in batches | DCS | submitBatchStartDCSInstanceRequest |
|
| Submitting a request to start instances in batches | Redis | submitBatchStartDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Restoring instance data | DCS | restoreDCSInstance |
|
| Restoring instance data | Redis | restoreDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting a request to restore instance data | DCS | submitRestoreDCSInstanceRequest |
|
| Submitting a request to restore instance data | Redis | submitRestoreDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Backing up instance data | DCS | backupDCSInstance |
|
| Backing up instance data | Redis | backupDCSInstance |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting a request to back up instance data | DCS | submitBackupDCSInstanceRequest |
|
| Submitting a request to back up instance data | Redis | submitBackupDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Deleting instance backup files | DCS | deleteInstanceBackupFile |
|
| Deleting instance backup files | Redis | deleteInstanceBackupFile |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Deleting background tasks | DCS | deleteDCSInstanceJobRecord |
|
| Deleting background tasks | Redis | deleteDCSInstanceJobRecord |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Modifying instance specifications | DCS | modifySpecification |
|
| Modifying instance specifications | Redis | modifySpecification |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting a request to modify instance specifications | DCS | submitModifySpecificationRequest |
|
| Submitting a request to modify instance specifications | Redis | submitModifySpecificationRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Creating an instance subscription order | DCS | createInstanceOrder |
|
| Creating an instance subscription order | Redis | createInstanceOrder |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Switching between master and standby nodes | DCS | masterStandbySwitchover |
|
| Switching between master and standby nodes | Redis | masterStandbySwitchover |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Resetting instance password | DCS | resetDCSInstancePassword |
|
| Resetting instance password | Redis | resetDCSInstancePassword |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
| Submitting a request to clear instance data | DCS | submitFlushDCSInstanceRequest |
|
| Submitting a request to clear instance data | Redis | submitFlushDCSInstanceRequest |
|
||||||
+--------------------------------------------------------+---------------+--------------------------------------+
|
+--------------------------------------------------------+---------------+--------------------------------------+
|
||||||
|
@ -8,6 +8,20 @@ Change History
|
|||||||
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| Released On | What's New |
|
| Released On | What's New |
|
||||||
+===================================+===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+
|
+===================================+===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+
|
||||||
|
| 2022-10-19 | Added the following FAQs: |
|
||||||
|
| | |
|
||||||
|
| | :ref:`Why Does a Key Disappear in Redis? <dcs-faq-210409001>` |
|
||||||
|
| | |
|
||||||
|
| | :ref:`Will Cached Data Be Retained After an Instance Is Restarted? <dcs-faq-0220330>` |
|
||||||
|
| | |
|
||||||
|
| | :ref:`How Do I View Current Concurrent Connections and Maximum Connections of a DCS Redis Instance? <dcs-faq-0427070>` |
|
||||||
|
| | |
|
||||||
|
| | :ref:`Why Is the Rejected Connections Metric Displayed? <dcs-faq-0603001>` |
|
||||||
|
| | |
|
||||||
|
| | :ref:`Why Is Flow Control Triggered? How Do I Handle It? <dcs-faq-0220721>` |
|
||||||
|
| | |
|
||||||
|
| | :ref:`Analysis of Big Keys and Hot Keys <dcs-faq-0805001>` |
|
||||||
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| 2022-08-29 | Modified the following content: |
|
| 2022-08-29 | Modified the following content: |
|
||||||
| | |
|
| | |
|
||||||
| | Added description about security groups and whitelist configuration in sections :ref:`Creating a DCS Redis Instance <dcs-ug-0326008>`, :ref:`Security Group Configurations <en-us_topic_0090662012>`, :ref:`What Should I Do If an Error Is Returned When I Use the Jedis Connection Pool? <dcs-faq-0730006>`, :ref:`How Do I Troubleshoot Redis Connection Failures? <dcs-faq-0730010>`, and :ref:`Why Aren't Security Groups Configured for DCS Redis 4.0 and 5.0 Instances? <dcs-faq-0730014>` |
|
| | Added description about security groups and whitelist configuration in sections :ref:`Creating a DCS Redis Instance <dcs-ug-0326008>`, :ref:`Security Group Configurations <en-us_topic_0090662012>`, :ref:`What Should I Do If an Error Is Returned When I Use the Jedis Connection Pool? <dcs-faq-0730006>`, :ref:`How Do I Troubleshoot Redis Connection Failures? <dcs-faq-0730010>`, and :ref:`Why Aren't Security Groups Configured for DCS Redis 4.0 and 5.0 Instances? <dcs-faq-0730014>` |
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
:original_name: dcs-faq-0521006.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0521006:
|
||||||
|
|
||||||
|
How Do I Analyze the Hot Keys of a DCS Redis 3.0 Instance?
|
||||||
|
==========================================================
|
||||||
|
|
||||||
|
DCS for Redis 3.0 does not support hot key analysis on the console. Alternatively, you can use the following methods to analyze hot keys:
|
||||||
|
|
||||||
|
- Method 1: Analyze the service structure and service implementation to discover possible hot keys.
|
||||||
|
|
||||||
|
For example, hot keys can be easily found in the service code during flash sales or user logins.
|
||||||
|
|
||||||
|
Advantage: Simple and easy to implement.
|
||||||
|
|
||||||
|
Disadvantage: Requires familiarity with the service code. In addition, the analysis become more difficult as the service scenarios become more complex.
|
||||||
|
|
||||||
|
- Method 2: Collect key access statistics in the client code to discover hot keys.
|
||||||
|
|
||||||
|
Disadvantage: Requires intrusive code modification.
|
||||||
|
|
||||||
|
- Method 3: Capture and analyze packets.
|
||||||
|
|
||||||
|
Advantage: Simple and easy to implement.
|
@ -0,0 +1,42 @@
|
|||||||
|
:original_name: dcs-faq-0521005.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0521005:
|
||||||
|
|
||||||
|
How Do I Avoid Big Keys and Hot Keys?
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
- **Keep the size of Strings within 10 KB** and **the quantity** of Hashes, Lists, Sets, or Zsets **within 5000**.
|
||||||
|
- When naming keys, use the service name abbreviation as the prefix and do not use special characters such as spaces, line brakes, single or double quotation marks, and other escape characters.
|
||||||
|
- Do not rely too much on Redis transactions.
|
||||||
|
- The performance of short connections ("connect" in Redis terminology) is poor. Use clients with connection pools.
|
||||||
|
- Do not enable data persistence if you use Redis just for caching and can tolerate data loss.
|
||||||
|
- For details about how to optimize big keys and hot keys, see the following table.
|
||||||
|
|
||||||
|
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Category | Method |
|
||||||
|
+===================================+==================================================================================================================================================================================================================================================================================================================================================================================================================================================+
|
||||||
|
| Big key | **Split big keys.** |
|
||||||
|
| | |
|
||||||
|
| | Scenarios: |
|
||||||
|
| | |
|
||||||
|
| | - **If the big key is a String**, you can split it into several key-value pairs and use **MGET** or a pipeline consisting of multiple **GET** operations to obtain the values. In this way, the pressure of a single operation can be split. For a cluster instance, the operation pressure can be evenly distributed to multiple shards, reducing the impact on a single shard. |
|
||||||
|
| | - **If the big key contains multiple elements, and the elements must be operated together**, the big key cannot be split. You can remove the big key from Redis and store it on other storage media instead. This scenario should be avoided by design. |
|
||||||
|
| | - **If the big key contains multiple elements, and only some elements need to be operated each time**, separate the elements. Take a Hash key as an example. Each time you run the **HGET** or **HSET** command, the result of the hash value modulo *N* (customized on the client) determines which key the field falls on. This algorithm is similar to that used for calculating slots in Redis Cluster. |
|
||||||
|
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Store big keys on other storage media.** |
|
||||||
|
| | |
|
||||||
|
| | If a big key cannot be split, it is not suitable to be stored in Redis. You can store it on other storage media, and delete the big key from Redis. |
|
||||||
|
| | |
|
||||||
|
| | .. caution:: |
|
||||||
|
| | |
|
||||||
|
| | CAUTION: |
|
||||||
|
| | Do not use the **DEL** command to delete big keys. Otherwise, Redis may be blocked or even a master/standby switchover may occur. |
|
||||||
|
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Hot key | **Use the client cache or local cache.** |
|
||||||
|
| | |
|
||||||
|
| | If you know what keys are frequently used, you can design a two-level cache architecture (client/local cache and remote Redis). Frequently used data is obtained from the local cache first. The local cache and remote cache are updated with data writes at the same time. In this way, the read pressure on frequently accessed data can be separated. This method is costly because it requires changes to the client architecture and code. |
|
||||||
|
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Design a circuit breaker or degradation mechanism.** |
|
||||||
|
| | |
|
||||||
|
| | Hot keys can easily result in cache breakdown. During peak hours, requests are passed through to the backend database, causing service avalanche. To ensure availability, the system must have a circuit breaker or degradation mechanism to limit the traffic and degrade services if breakdown occurs. |
|
||||||
|
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
@ -0,0 +1,25 @@
|
|||||||
|
:original_name: dcs-faq-0606002.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0606002:
|
||||||
|
|
||||||
|
How Do I Detect Big Keys and Hot Keys in Advance?
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Method | Description |
|
||||||
|
+==========================================================================+=============================================================================================================================================================================================================================================================================================================================================================+
|
||||||
|
| Through **Big Key Analysis** and **Hot Key Analysis** on the DCS console | See :ref:`Cache Analysis <dcs-ug-190808001>`. |
|
||||||
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| By using the **bigkeys** and **hotkeys** options on redis-cli | - redis-cli uses the **bigkeys** option to traverse all keys in a Redis instance and returns the overall key statistics and the biggest key of six data types: Strings, Lists, Hashes, Sets, Zsets, and Streams. The command is **redis-cli -h** *<Instance connection address>* **-p** *<Port number>* **-a** *<Password>* **--bigkeys**. |
|
||||||
|
| | - In Redis 4.0 and later, you can use the **hotkeys** option to quickly find hot keys in redis-cli. Run this command during service running to find hot keys: **redis-cli -h** *<Instance connection address>* **-p** *<Port number>* **-a** *<Password>* **--hotkeys**. The hot key details can be obtained from the summary part in the returned result. |
|
||||||
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
Hot key analysis is not supported by DCS Redis 3.0 instances. You can :ref:`configure alarms <dcs-ug-190905001__en-us_topic_0190235954_section1118571110427>` to detect hot keys.
|
||||||
|
|
||||||
|
- Configure alarm rules for the **Memory Usage** metric of the instance nodes.
|
||||||
|
|
||||||
|
If a node has a big key, the memory usage of the node is much higher than that of other nodes. In this case, an alarm is triggered to help you find the potentially problematic key.
|
||||||
|
|
||||||
|
- Configure alarm rules for the **Maximum Inbound Bandwidth**, **Maximum Outbound Bandwidth**, and **CPU Usage** metrics of the instance nodes.
|
||||||
|
|
||||||
|
If a node has a hot key, the bandwidth and CPU usage of the node is much higher than that of other nodes. In this case, an alarm is triggered to help you find the potentially problematic key.
|
22
umn/source/faqs/analysis_of_big_keys_and_hot_keys/index.rst
Normal file
22
umn/source/faqs/analysis_of_big_keys_and_hot_keys/index.rst
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
:original_name: dcs-faq-0805001.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0805001:
|
||||||
|
|
||||||
|
Analysis of Big Keys and Hot Keys
|
||||||
|
=================================
|
||||||
|
|
||||||
|
- :ref:`What Are Big Keys and Hot Keys? <dcs-faq-0521003>`
|
||||||
|
- :ref:`What Is the Impact of Big Keys or Hot Keys? <dcs-faq-0521004>`
|
||||||
|
- :ref:`How Do I Avoid Big Keys and Hot Keys? <dcs-faq-0521005>`
|
||||||
|
- :ref:`How Do I Analyze the Hot Keys of a DCS Redis 3.0 Instance? <dcs-faq-0521006>`
|
||||||
|
- :ref:`How Do I Detect Big Keys and Hot Keys in Advance? <dcs-faq-0606002>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
what_are_big_keys_and_hot_keys
|
||||||
|
what_is_the_impact_of_big_keys_or_hot_keys
|
||||||
|
how_do_i_avoid_big_keys_and_hot_keys
|
||||||
|
how_do_i_analyze_the_hot_keys_of_a_dcs_redis_3.0_instance
|
||||||
|
how_do_i_detect_big_keys_and_hot_keys_in_advance
|
@ -0,0 +1,20 @@
|
|||||||
|
:original_name: dcs-faq-0521003.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0521003:
|
||||||
|
|
||||||
|
What Are Big Keys and Hot Keys?
|
||||||
|
===============================
|
||||||
|
|
||||||
|
+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Term | Definition |
|
||||||
|
+===================================+==================================================================================================================================================================================================================================================================================+
|
||||||
|
| Big key | There are two types of big keys: |
|
||||||
|
| | |
|
||||||
|
| | - Keys that have a large value, for example, a 10 MB String key, or a 100 MB Hash, List, or Set key (all elements combined). If the size of a single String key exceeds 10 KB, or if the size of all elements of a key combined exceeds 50 MB, the key is defined as a big key. |
|
||||||
|
| | - Keys that have a large number of elements, for example, a Hash key that has 10,000 elements. If the number of elements in a key exceeds 5000, the key is defined as a big key. |
|
||||||
|
+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Hot key | A key is defined as a hot key if it is frequently requested or if it occupies a large number of resources. For example: |
|
||||||
|
| | |
|
||||||
|
| | - In a cluster instance, a shard processes 10,000 requests per second, among which 3000 are performed on the same key. |
|
||||||
|
| | - In a cluster instance, a shard uses a total of 100 Mbits/s inbound and outbound bandwidth, among which 80 Mbits/s is used by the **HGETALL** operation on a Hash key. |
|
||||||
|
+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
@ -0,0 +1,47 @@
|
|||||||
|
:original_name: dcs-faq-0521004.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0521004:
|
||||||
|
|
||||||
|
What Is the Impact of Big Keys or Hot Keys?
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Category | Impact |
|
||||||
|
+===================================+================================================================================================================================================================================================================================================================================================================================================+
|
||||||
|
| Big key | **Instance specifications fail to be modified.** |
|
||||||
|
| | |
|
||||||
|
| | Specification modification of a Redis Cluster instance involves rebalancing (data migration between nodes). Redis has a limit on key migration. If the instance has any single key bigger than 512 MB, the modification will fail when big key migration between nodes times out. The bigger the key, the more likely the migration will fail. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Data migration fails.** |
|
||||||
|
| | |
|
||||||
|
| | During data migration, if a key has many elements, other keys will be blocked and will be stored in the memory buffer of the migration ECS. If they are blocked for a long time, the migration will fail. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Cluster shards are unbalanced.** |
|
||||||
|
| | |
|
||||||
|
| | - The memory usage of shards is unbalanced. For example, if a shard uses a large memory or even uses up the memory, keys on this shard are evicted, and resources of other shards are wasted. |
|
||||||
|
| | - The bandwidth usage of shards is unbalanced. For example, flow control is repeatedly triggered on a shard. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Latency of client command execution increases.** |
|
||||||
|
| | |
|
||||||
|
| | Slow operations on a big key block other commands, resulting in a large number of slow queries. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Flow control is triggered on the instance.** |
|
||||||
|
| | |
|
||||||
|
| | Frequently reading data from big keys exhausts the outbound bandwidth of the instance, triggering flow control. As a result, a large number of commands time out or slow queries occur, affecting services. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Master/standby switchover is triggered.** |
|
||||||
|
| | |
|
||||||
|
| | If the high-risk **DEL** operation is performed on a big key, the master node may be blocked for a long time, causing a master/standby switchover. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Hot key | **Cluster shards are unbalanced.** |
|
||||||
|
| | |
|
||||||
|
| | If only the shard where the hot key is located is busy processing service queries, there may be performance bottlenecks on a single shard, and the compute resources of other shards may be wasted. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **CPU usage surges.** |
|
||||||
|
| | |
|
||||||
|
| | A large number of operations on hot keys may cause high CPU usage. If the operations are on a single cluster shard, the CPU usage of the shard where the hot key is located will surge. This will slow down other requests and the overall performance. If the service volume increases sharply, a master/standby switchover may be triggered. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| | **Cache breakdown may occur.** |
|
||||||
|
| | |
|
||||||
|
| | If Redis cannot handle the pressure on hot keys, requests will hit the database. The database may break down as its load increases dramatically, affecting other services. |
|
||||||
|
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
@ -11,6 +11,7 @@ FAQs
|
|||||||
- :ref:`Instance Scaling and Upgrade <dcs-faq-0326022>`
|
- :ref:`Instance Scaling and Upgrade <dcs-faq-0326022>`
|
||||||
- :ref:`Monitoring and Alarm <dcs-faq-0326023>`
|
- :ref:`Monitoring and Alarm <dcs-faq-0326023>`
|
||||||
- :ref:`Data Backup, Export, and Migration <dcs-faq-0326024>`
|
- :ref:`Data Backup, Export, and Migration <dcs-faq-0326024>`
|
||||||
|
- :ref:`Analysis of Big Keys and Hot Keys <dcs-faq-0805001>`
|
||||||
- :ref:`Master/Standby Switchover <dcs-faq-191204001>`
|
- :ref:`Master/Standby Switchover <dcs-faq-191204001>`
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
@ -23,4 +24,5 @@ FAQs
|
|||||||
instance_scaling_and_upgrade/index
|
instance_scaling_and_upgrade/index
|
||||||
monitoring_and_alarm/index
|
monitoring_and_alarm/index
|
||||||
data_backup,_export,_and_migration/index
|
data_backup,_export,_and_migration/index
|
||||||
|
analysis_of_big_keys_and_hot_keys/index
|
||||||
master_standby_switchover/index
|
master_standby_switchover/index
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
:original_name: dcs-faq-0427070.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0427070:
|
||||||
|
|
||||||
|
How Do I View Current Concurrent Connections and Maximum Connections of a DCS Redis Instance?
|
||||||
|
=============================================================================================
|
||||||
|
|
||||||
|
Viewing Concurrent Connections of a DCS Redis Instance
|
||||||
|
------------------------------------------------------
|
||||||
|
|
||||||
|
The number of connections received by a DCS instance is a metric that is monitored by Cloud Eye. For details on how to view metrics, see :ref:`Viewing DCS Monitoring Metrics <dcs-ug-0312045>`.
|
||||||
|
|
||||||
|
On the Cloud Eye console, find the **Connected Clients** metric. Click |image1| to view monitoring details on an enlarged graph.
|
||||||
|
|
||||||
|
Specify a time range to view the metric in a specific monitoring period. For example, you can select a 10-minute period to view the number of connections received during the period. On the graph, you can view the trend and the total number of connections received during the period.
|
||||||
|
|
||||||
|
On the Cloud Eye console, you can also view other monitoring metrics of your DCS instances, for example:
|
||||||
|
|
||||||
|
- CPU Usage
|
||||||
|
- Memory Usage
|
||||||
|
- Used Memory
|
||||||
|
- Ops per Second
|
||||||
|
|
||||||
|
Viewing or Modifying the Maximum Connections of an Instance
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
When creating an instance on the console, you can view the default maximum number of connections and the limit that can be configured.
|
||||||
|
|
||||||
|
After an instance is created, you can view or change the value of **maxclients** (the maximum number of connections) on the **Parameters** page of the DCS console. (This parameter cannot be modified for Proxy Cluster instances.)
|
||||||
|
|
||||||
|
.. |image1| image:: /_static/images/en-us_image_0000001383077054.png
|
@ -5,14 +5,22 @@
|
|||||||
Monitoring and Alarm
|
Monitoring and Alarm
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
- :ref:`How Do I View Current Concurrent Connections and Maximum Connections of a DCS Redis Instance? <dcs-faq-0427070>`
|
||||||
- :ref:`Does Redis Support Command Audits? <dcs-faq-0730049>`
|
- :ref:`Does Redis Support Command Audits? <dcs-faq-0730049>`
|
||||||
- :ref:`What Should I Do If the Monitoring Data of a DCS Redis Instance Is Abnormal? <dcs-faq-0730050>`
|
- :ref:`What Should I Do If the Monitoring Data of a DCS Redis Instance Is Abnormal? <dcs-faq-0730050>`
|
||||||
- :ref:`Why Is Used Memory Greater Than Available Memory? <dcs-faq-0730052>`
|
- :ref:`Why Is Used Memory Greater Than Available Memory? <dcs-faq-0730052>`
|
||||||
|
- :ref:`Why Does Bandwidth Usage Exceed 100%? <dcs-faq-0513001>`
|
||||||
|
- :ref:`Why Is the Rejected Connections Metric Displayed? <dcs-faq-0603001>`
|
||||||
|
- :ref:`Why Is Flow Control Triggered? How Do I Handle It? <dcs-faq-0220721>`
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:hidden:
|
:hidden:
|
||||||
|
|
||||||
|
how_do_i_view_current_concurrent_connections_and_maximum_connections_of_a_dcs_redis_instance
|
||||||
does_redis_support_command_audits
|
does_redis_support_command_audits
|
||||||
what_should_i_do_if_the_monitoring_data_of_a_dcs_redis_instance_is_abnormal
|
what_should_i_do_if_the_monitoring_data_of_a_dcs_redis_instance_is_abnormal
|
||||||
why_is_used_memory_greater_than_available_memory
|
why_is_used_memory_greater_than_available_memory
|
||||||
|
why_does_bandwidth_usage_exceed_100%
|
||||||
|
why_is_the_rejected_connections_metric_displayed
|
||||||
|
why_is_flow_control_triggered_how_do_i_handle_it
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
:original_name: dcs-faq-0513001.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0513001:
|
||||||
|
|
||||||
|
Why Does Bandwidth Usage Exceed 100%?
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
The basic information about the bandwidth usage metric is as follows.
|
||||||
|
|
||||||
|
+-----------------+-----------------+-----------------------------------------------------------------+-------------+-------------------------------------------------------------+------------------------------+
|
||||||
|
| Metric ID | Metric Name | Description | Value Range | Monitored Object and Dimension | Monitoring Period (Raw Data) |
|
||||||
|
+=================+=================+=================================================================+=============+=============================================================+==============================+
|
||||||
|
| bandwidth_usage | Bandwidth Usage | Percentage of the used bandwidth to the maximum bandwidth limit | 0-200% | Monitored object: | 1 minute |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | Master/standby DCS Redis 4.0 or 5.0 instances | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | Redis Server of Redis Cluster DCS Redis 4.0 or 5.0 instance | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | Dimension: | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | dcs_cluster_node | |
|
||||||
|
+-----------------+-----------------+-----------------------------------------------------------------+-------------+-------------------------------------------------------------+------------------------------+
|
||||||
|
|
||||||
|
Bandwidth usage = (Input flow + Output flow)/(2 x Maximum bandwidth) x 100%
|
||||||
|
|
||||||
|
According to the formula, the bandwidth usage counts in the input flow and output flow, which include the traffic for replication between the master and replicas. Therefore, the total traffic is greater than the normal service traffic.
|
||||||
|
|
||||||
|
If the value of the **Flow Control Times** metric is larger than 0, the maximum bandwidth has been reached and flow control has been performed.
|
||||||
|
|
||||||
|
However, flow control decisions are made without considering the traffic for replication between the master and replicas. Therefore, sometimes the bandwidth usage exceeds 100% but the number of flow control times is 0.
|
@ -0,0 +1,28 @@
|
|||||||
|
:original_name: dcs-faq-0220721.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0220721:
|
||||||
|
|
||||||
|
Why Is Flow Control Triggered? How Do I Handle It?
|
||||||
|
==================================================
|
||||||
|
|
||||||
|
Flow control is triggered when the traffic used by a Redis instance in a period exceeds the maximum bandwidth.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
For details about the maximum allowed bandwidth, see the "Assured/Maximum Bandwidth" column of different instance types listed in :ref:`DCS Instance Specifications <en-us_topic_0054235835>`.
|
||||||
|
|
||||||
|
Even if the bandwidth usage is low, flow control may still be triggered. The real-time bandwidth usage is reported once in each reporting period. Flow controls are checked every second. The traffic may surge within seconds and then fall back between reporting periods. By the time the bandwidth usage is reported, it may have already restored to the normal level.
|
||||||
|
|
||||||
|
For master/standby instances:
|
||||||
|
|
||||||
|
- If flow control is always triggered when the bandwidth usage is low, there may be service microbursts or big or hot keys. In this case, check for big or hot keys.
|
||||||
|
- If the bandwidth usage remains high, the bandwidth limit may be exceeded. In this case, expand the capacity. Larger capacity supports higher bandwidth.
|
||||||
|
|
||||||
|
For cluster instances:
|
||||||
|
|
||||||
|
- If flow control is triggered only on one or a few shards, the shards may have big or hot keys.
|
||||||
|
- If flow control or high bandwidth usage occurs on all or most shards at the same time, bandwidth usage of the instance has reached the limit. In this case, expand the instance capacity.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
You can analyze big keys and hot keys on the DCS console. For details, see :ref:`Cache Analysis <dcs-ug-190808001>`.
|
@ -0,0 +1,8 @@
|
|||||||
|
:original_name: dcs-faq-0603001.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0603001:
|
||||||
|
|
||||||
|
Why Is the Rejected Connections Metric Displayed?
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
If the **Rejected Connections** metric is displayed, check if the number of connected clients exceeds the maximum allowed number of connections of the instances. To check the maximum allowed number of connections, go to the **Parameters** tab page of the instance and check the value of the **maxclients** parameter.
|
@ -26,6 +26,8 @@ Redis Usage
|
|||||||
- :ref:`Why Is Memory of a DCS Redis Instance Used Up by Just a Few Keys? <dcs-faq-0730033>`
|
- :ref:`Why Is Memory of a DCS Redis Instance Used Up by Just a Few Keys? <dcs-faq-0730033>`
|
||||||
- :ref:`Can I Recover Data from Deleted DCS Instances? <dcs-faq-0730034>`
|
- :ref:`Can I Recover Data from Deleted DCS Instances? <dcs-faq-0730034>`
|
||||||
- :ref:`Why Is "Error in execution" Returned When I Access Redis? <dcs-faq-210223001>`
|
- :ref:`Why Is "Error in execution" Returned When I Access Redis? <dcs-faq-210223001>`
|
||||||
|
- :ref:`Why Does a Key Disappear in Redis? <dcs-faq-210409001>`
|
||||||
|
- :ref:`Will Cached Data Be Retained After an Instance Is Restarted? <dcs-faq-0220330>`
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
@ -52,3 +54,5 @@ Redis Usage
|
|||||||
why_is_memory_of_a_dcs_redis_instance_used_up_by_just_a_few_keys
|
why_is_memory_of_a_dcs_redis_instance_used_up_by_just_a_few_keys
|
||||||
can_i_recover_data_from_deleted_dcs_instances
|
can_i_recover_data_from_deleted_dcs_instances
|
||||||
why_is_error_in_execution_returned_when_i_access_redis
|
why_is_error_in_execution_returned_when_i_access_redis
|
||||||
|
why_does_a_key_disappear_in_redis
|
||||||
|
will_cached_data_be_retained_after_an_instance_is_restarted
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
What Is the Default Data Eviction Policy?
|
What Is the Default Data Eviction Policy?
|
||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
Data is evicted from cache based on a user-defined space limit in order to make space for new data. In the current versions of DCS, you can select an eviction policy.
|
Data is evicted from cache based on a user-defined space limit in order to make space for new data.
|
||||||
|
|
||||||
**noeviction** is the default eviction policy for single-node and master/standby DCS Redis instances. You can change the eviction policy by configuring the instance parameters on the DCS console.
|
You can change the eviction policy by configuring the **maxmemory-policy** parameter.
|
||||||
|
|
||||||
**volatile-lru** is the default eviction policy for cluster DCS Redis instances. To change the eviction policy for cluster instances, contact technical support.
|
|
||||||
|
|
||||||
When **maxmemory** is reached, you can select one of the following eight eviction policies:
|
When **maxmemory** is reached, you can select one of the following eight eviction policies:
|
||||||
|
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
:original_name: dcs-faq-210409001.html
|
||||||
|
|
||||||
|
.. _dcs-faq-210409001:
|
||||||
|
|
||||||
|
Why Does a Key Disappear in Redis?
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Normally, Redis keys do not disappear. If a key is missing, it may have expired, been evicted, or been deleted.
|
||||||
|
|
||||||
|
Perform the following checks one by one:
|
||||||
|
|
||||||
|
#. Check whether the key has expired.
|
||||||
|
#. View the monitoring information and check whether eviction was triggered.
|
||||||
|
#. Run the **INFO** command on the server side to check whether the key has been deleted.
|
@ -0,0 +1,12 @@
|
|||||||
|
:original_name: dcs-faq-0220330.html
|
||||||
|
|
||||||
|
.. _dcs-faq-0220330:
|
||||||
|
|
||||||
|
Will Cached Data Be Retained After an Instance Is Restarted?
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
After a single-node DCS instance is restarted, data in the instance is deleted.
|
||||||
|
|
||||||
|
Master/standby and cluster instances (except single-replica clusters) support AOF persistence by default. Data is retained after these instances are restarted.
|
||||||
|
|
||||||
|
If AOF persistence is disabled (**appendonly** is set to **no**), data is deleted after the instances are restarted.
|
@ -23,6 +23,6 @@ Access in Different Languages
|
|||||||
clients_in_python
|
clients_in_python
|
||||||
go-redis
|
go-redis
|
||||||
hiredis_in_c++
|
hiredis_in_c++
|
||||||
c#
|
csharp
|
||||||
php/index
|
php/index
|
||||||
node.js
|
node.js
|
||||||
|
@ -9,7 +9,7 @@ Access a DCS Redis instance through phpredis on an ECS in the same VPC. For more
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To use phpredis to connect to a Redis Cluster instance, see the `phpredis description <https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#readme>`__.
|
The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To use phpredis to connect to a Redis Cluster instance, see the `phpredis description <https://github.com/phpredis/phpredis#readme>`__.
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
-------------
|
-------------
|
||||||
|
@ -52,6 +52,8 @@ Alarm Policies for DCS Redis Instances
|
|||||||
| | | Alarm severity: Major | | |
|
| | | Alarm severity: Major | | |
|
||||||
+-------------------+--------------+-----------------------------------------------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+-------------------+--------------+-----------------------------------------------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
.. _dcs-ug-190905001__en-us_topic_0190235954_section1118571110427:
|
||||||
|
|
||||||
Procedure
|
Procedure
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ The maintenance time window is the period when the DCS service team upgrade and
|
|||||||
|
|
||||||
DCS instance maintenance takes place only once a quarter and does not interrupt services. Even so, you are advised to select a time period when the service demand is low.
|
DCS instance maintenance takes place only once a quarter and does not interrupt services. Even so, you are advised to select a time period when the service demand is low.
|
||||||
|
|
||||||
When creating an instance, you must specify a maintenance time window, which can be modified after the instance is created.
|
When creating an instance, you must specify a maintenance time window, which can be modified on the **Basic Information** page after the instance is created.
|
||||||
|
|
||||||
For details, see: :ref:`Modifying Maintenance Time Window <dcs-ug-0312025>`.
|
For details, see: :ref:`Modifying Maintenance Time Window <dcs-ug-0312025>`.
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ Each Proxy Cluster instance consists of load balancers, proxies, cluster manager
|
|||||||
============ ======= ======
|
============ ======= ======
|
||||||
|
|
||||||
|
|
||||||
.. figure:: /_static/images/en-us_image_0296786822.png
|
.. figure:: /_static/images/en-us_image_0000001383102132.png
|
||||||
:alt: **Figure 1** Proxy Cluster DCS Redis instance architecture
|
:alt: **Figure 1** Proxy Cluster DCS Redis instance architecture
|
||||||
|
|
||||||
**Figure 1** Proxy Cluster DCS Redis instance architecture
|
**Figure 1** Proxy Cluster DCS Redis instance architecture
|
||||||
|
@ -52,7 +52,7 @@ Architecture description:
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
For intra-VPC access, the client and the instance must be in the same VPC with specified security group rule configurations.
|
For intra-VPC access, the client and the instance must be in the same VPC with specified security group rule configurations with specified security group rule configurations.
|
||||||
|
|
||||||
For details, see :ref:`Security Group Configurations <en-us_topic_0090662012>`.
|
For details, see :ref:`Security Group Configurations <en-us_topic_0090662012>`.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user