DCS UMN 20240705 version

Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com>
Co-authored-by: chenjunjie <chenjunjie@huawei.com>
Co-committed-by: chenjunjie <chenjunjie@huawei.com>
This commit is contained in:
2025-02-26 10:24:22 +00:00
committed by zuul
parent 843c771689
commit ab5f2db011
202 changed files with 10686 additions and 5075 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,37 +7,25 @@
<div class="section" id="CacheMasterSlave__section2115135632817"><h4 class="sectiontitle">Features</h4><p id="CacheMasterSlave__p29361111432">Master/Standby DCS instances have higher availability and reliability than single-node DCS instances.</p>
<p id="CacheMasterSlave__p152081045174518">Master/Standby DCS instances have the following features:</p>
<ol id="CacheMasterSlave__ol12655131412"><li id="CacheMasterSlave__li191795312365"><strong id="CacheMasterSlave__b8393084757579">Data persistence and high reliability</strong><p id="CacheMasterSlave__p143153293617">By default, data persistence is enabled by both the master and the standby node of a master/standby instance.</p>
<p id="CacheMasterSlave__p992216915351">The standby node of a DCS Redis 3.0 instance is invisible to you. Only the master node provides data read/write operations.</p>
<p id="CacheMasterSlave__p12791953131916">The standby node of a Redis 4.0/5.0/6.0 instance is visible to you. You can read data from the standby node by connecting to it using the instance read-only address.</p>
<p id="CacheMasterSlave__p12791953131916">The standby node of a Redis 4.0 or later instance is visible to you. You can read data from the standby node by connecting to it using the instance read-only address.</p>
</li><li id="CacheMasterSlave__li10688192120301"><strong id="CacheMasterSlave__b6852014317">Data synchronization</strong><p id="CacheMasterSlave__p2581425163010">Data in the master and standby nodes is kept consistent through incremental synchronization.</p>
<div class="note" id="CacheMasterSlave__note1745795093018"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p6458135018301">After recovering from a network exception or node fault, master/standby instances perform a full synchronization to ensure data consistency.</p>
</div></div>
</li><li id="CacheMasterSlave__li142654132115"><strong id="CacheMasterSlave__b117861923114313">Automatic master/standby switchover</strong><p id="CacheMasterSlave__p1922564615389">If the master node becomes faulty, the instance is disconnected and unavailable for several seconds. The standby node takes over within 30 seconds without manual operations to resume stable services.</p>
</li><li id="CacheMasterSlave__li426374543318"><strong id="CacheMasterSlave__b415742710491">DR policies</strong><p id="CacheMasterSlave__p13889754193315">Each master/standby DCS instance can be deployed across AZs with physically isolated power supplies and networks. Applications can also be deployed across AZs to achieve high availability for both data and applications.</p>
<div class="note" id="CacheMasterSlave__note26711618132313"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="CacheMasterSlave__ul99411459113710"><li id="CacheMasterSlave__li4941359173717">Disconnections and unavailability occur during the failover. The service client should be able to reconnect or retry.</li><li id="CacheMasterSlave__li494125912379">After a master/standby switchover is complete, the last master node (already switched to the replica) is not recovered immediately and services will fail to access it. In this case, configure a Redis SDK by referring to <a href="dcs-ug-0512002.html">Access in Different Languages</a>.</li></ul>
</div></div>
</li><li id="CacheMasterSlave__li426374543318"><strong id="CacheMasterSlave__b415742710491">DR policies</strong><p id="CacheMasterSlave__p13889754193315">Each master/standby, read/write splitting, or cluster DCS instance can be deployed across AZs with physically isolated power supplies and networks. Applications can also be deployed across AZs to achieve high availability for both data and applications.</p>
</li><li id="CacheMasterSlave__li145528113219"><strong id="CacheMasterSlave__b1363102584910">Read/Write splitting</strong><p id="CacheMasterSlave__p747603117325">Master/Standby DCS Redis 4.0 and later instances support client read/write splitting. When connecting to such an instance, you can use the read/write address to connect to the master node or use the read-only address to connect to the standby node.</p>
<p id="CacheMasterSlave__p163851444183415">To implement read/write splitting for a master/standby instance, configure it on a client. To use the read/write splitting function, you are advised to use <a href="dcs-pd-0220606.html">read/write splitting instances</a>.</p>
</li></ol>
</div>
<div class="section" id="CacheMasterSlave__section1728321782810"><h4 class="sectiontitle">Architecture of DCS Redis 3.0 Instances</h4><p id="CacheMasterSlave__p139021259112"><a href="#CacheMasterSlave__fig14477142816340">Figure 1</a> shows the architecture of master/standby DCS Redis instances.</p>
<div class="fignone" id="CacheMasterSlave__fig14477142816340"><a name="CacheMasterSlave__fig14477142816340"></a><a name="fig14477142816340"></a><span class="figcap"><b>Figure 1 </b>Master/Standby DCS instance architecture</span><br><span><img id="CacheMasterSlave__image1555620406535" src="en-us_image_0296786164.png"></span></div>
<p id="CacheMasterSlave__p153106583326">Architecture description:</p>
<ul id="CacheMasterSlave__ul1631417191120"><li id="CacheMasterSlave__li20179270479"><strong id="CacheMasterSlave__b264814218559">VPC</strong><p id="CacheMasterSlave__p89401530124718">All server nodes of the instance run in the same VPC.</p>
<div class="note" id="CacheMasterSlave__note04501339113"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p124516392019">For intra-VPC access, the client and the instance must be in the same VPC with specified security group rule configurations.</p>
<p id="CacheMasterSlave__p14803202620398">For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
</div></div>
</li><li id="CacheMasterSlave__li017927194718"><strong id="CacheMasterSlave__b056638104917">Application</strong><p id="CacheMasterSlave__p36064574817">The Redis client of the instance, which is the application running on the ECS.</p>
<p id="CacheMasterSlave__p20951317243">DCS Redis instances are compatible with the Redis protocol, and can be accessed through open-source clients. For details about accessing DCS instances, see <a href="dcs-ug-0916002.html">Accessing an Instance</a>.</p>
</li><li id="CacheMasterSlave__li81722784711"><strong id="CacheMasterSlave__b18417232969">DCS instance</strong><p id="CacheMasterSlave__p141487982311">Indicates a master/standby DCS instance which has a master node and a standby node. By default, data persistence is enabled and data is synchronized between the two nodes.</p>
<p id="CacheMasterSlave__p1542317478287">DCS monitors the availability of the instance in real time. If the master node becomes faulty, the standby node becomes the master node and resumes service provisioning.</p>
<p id="CacheMasterSlave__p828195918488">DCS Redis 3.0 instances are accessed through port 6379 by default. Port customization is not supported.</p>
</li></ul>
</div>
<div class="section" id="CacheMasterSlave__section5805185095215"><a name="CacheMasterSlave__section5805185095215"></a><a name="section5805185095215"></a><h4 class="sectiontitle">Architecture of Master/Standby DCS Redis 4.0/5.0/6.0 Instances</h4><p id="CacheMasterSlave__p9460152115104">The following figure shows the architecture of a master/standby DCS Redis 4.0/5.0/6.0 instance.</p>
<div class="fignone" id="CacheMasterSlave__fig174945301094"><span class="figcap"><b>Figure 2 </b>Architecture of a master/standby DCS Redis 4.0/5.0/6.0 instance</span><br><span><img class="eddx" id="CacheMasterSlave__image1040685511346" src="en-us_image_0000001528638365.png"></span></div>
<div class="section" id="CacheMasterSlave__section5805185095215"><a name="CacheMasterSlave__section5805185095215"></a><a name="section5805185095215"></a><h4 class="sectiontitle">Architecture of Master/Standby DCS Redis 4.0/5.0/6.0/7.0 Instances</h4><p id="CacheMasterSlave__p9460152115104">The following figure shows the architecture of a master/standby DCS Redis 4.0/5.0/6.0/7.0 instance.</p>
<div class="fignone" id="CacheMasterSlave__fig174945301094"><span class="figcap"><b>Figure 1 </b>Architecture of a master/standby DCS Redis 4.0/5.0/6.0/7.0 instance</span><br><span><img class="eddx" id="CacheMasterSlave__image1040685511346" src="en-us_image_0000001528638365.png"></span></div>
<p id="CacheMasterSlave__p08712785615">Architecture description:</p>
<ol id="CacheMasterSlave__ol1898612288020"><li id="CacheMasterSlave__li693387115">Each master/standby DCS Redis 4.0/5.0/6.0 instance has two connection addresses. When connecting to such an instance, you can use the read/write domain name address to connect to the master node or use the read-only domain name address to connect to the standby node.<p id="CacheMasterSlave__p153591895112"><a name="CacheMasterSlave__li693387115"></a><a name="li693387115"></a>The connection addresses can be obtained on the instance details page on the DCS console.</p>
</li><li id="CacheMasterSlave__li121237313010">Master/standby DCS Redis 4.0/5.0/6.0 instances support Sentinels. Sentinels monitor the running status of the master and standby nodes. If the master node becomes faulty, a failover will be performed.<p id="CacheMasterSlave__p137811591512"><a name="CacheMasterSlave__li121237313010"></a><a name="li121237313010"></a>Sentinels are invisible to you and is used only in the service. </p>
</li><li id="CacheMasterSlave__li18916171615119">A standby node has the same specifications as a master node. A master/standby instance consists of a pair of master and standby nodes by default.</li><li id="CacheMasterSlave__li1236204215435">To access a DCS Redis 4.0/5.0/6.0 instance, you can customize the port. If no port is specified, the default port 6379 will be used. In the architecture diagram, port 6379 is used. If you have customized a port, replace <strong id="CacheMasterSlave__b116713868943641">6379</strong> with the actual port.</li></ol>
<div class="note" id="CacheMasterSlave__note1291809114711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p5974816314">To implement read/write splitting using a master/standby instance, ensure that your client can distinguish between read and write requests. The client directs write requests to the read/write domain name and read requests to the read-only domain name.</p>
<p id="CacheMasterSlave__p691817934713"><strong id="CacheMasterSlave__b86651730122714">Requests to the read-only domain name address may fail if the standby node of a master/standby DCS Redis 4.0/5.0</strong><strong id="CacheMasterSlave__b176668302272">/6.0</strong><strong id="CacheMasterSlave__b36667302276"> instance is faulty. For higher reliability and lower latency, do not use the read-only address.</strong></p>
<ol id="CacheMasterSlave__ol1898612288020"><li id="CacheMasterSlave__li693387115">Each master/standby DCS Redis 4.0 or later instance has two connection addresses. When connecting to such an instance, you can use the read/write domain name address to connect to the master node or use the read-only domain name address to connect to the standby node.<p id="CacheMasterSlave__p153591895112"><a name="CacheMasterSlave__li693387115"></a><a name="li693387115"></a>The connection addresses can be obtained on the instance details page on the DCS console.</p>
</li><li id="CacheMasterSlave__li121237313010">Master/Standby DCS Redis 4.0 and later instances support Sentinels. Sentinels monitor the running status of the master and standby nodes. If the master node becomes faulty, a failover will be performed.<p id="CacheMasterSlave__p137811591512"><a name="CacheMasterSlave__li121237313010"></a><a name="li121237313010"></a>Sentinels are invisible to you and is used only in the service. </p>
</li><li id="CacheMasterSlave__li18916171615119">A standby node has the same specifications as a master node. A master/standby instance consists of a pair of master and standby nodes by default.</li><li id="CacheMasterSlave__li1236204215435">To access a DCS Redis 4.0 or later instance, you can customize the port. If no port is specified, the default port 6379 will be used. In the architecture diagram, port 6379 is used. If you have customized a port, replace <strong id="CacheMasterSlave__b116713868943641">6379</strong> with the actual port.</li></ol>
<div class="note" id="CacheMasterSlave__note1291809114711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="CacheMasterSlave__ul86981216501"><li id="CacheMasterSlave__li1069872135011">To implement read/write splitting using a master/standby instance, ensure that your client can distinguish between read and write requests. The client directs write requests to the read/write domain name and read requests to the read-only domain name.</li><li id="CacheMasterSlave__li1869814211506">Requests to the read-only domain name address may fail if the standby node of a master/standby DCS Redis 4.0 or later instance is faulty. For higher reliability and lower latency, <strong id="CacheMasterSlave__b16139419467">do not use the read-only address</strong>.</li></ul>
</div></div>
</div>
</div>

View File

@ -75,6 +75,8 @@
<div class="fignone" id="CacheProxy__fig736144082814"><span class="figcap"><b>Figure 1 </b>Distributed architecture of Redis Cluster</span><br><span><img id="CacheProxy__image0855192718314" src="en-us_image_0277578727.png"></span></div>
</li><li id="CacheProxy__li1693714855516">Presharding<p id="CacheProxy__p2019185113552"><a name="CacheProxy__li1693714855516"></a><a name="li1693714855516"></a>There are 16,384 hash slots in each Redis Cluster. The mapping between hash slots and Redis nodes is stored in Redis Servers. To compute what is the hash slot of a given key, simply take the CRC16 of the key modulo 16384. Example command output</p>
<div class="fignone" id="CacheProxy__fig114922024115011"><span class="figcap"><b>Figure 2 </b>Redis Cluster presharding</span><br><span><img id="CacheProxy__image1087382672319" src="en-us_image_0000001280621500.png"></span></div>
<div class="note" id="CacheProxy__note2338843193520"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="CacheProxy__ul19828205815355"><li id="CacheProxy__li48066223614">Each shard of a Redis Cluster is a master/standby Redis instance. When the master node on a shard is faulty, the connections on the shard are interrupted in seconds, and the shard becomes unavailable. The standby node is automatically switched over within 15 to 30 seconds. The fault only affects the shard itself.</li><li id="CacheProxy__li139101734102215">When a master node on a single shard in a redis cluster is faulty, after a master/standby switchover is complete, the master node (already switched to the replica) is not recovered immediately and services will fail to access it. In this case, configure a Redis SDK by referring to <a href="dcs-ug-0512002.html">Access in Different Languages</a>.</li></ul>
</div></div>
</li></ul>
</div>
</div>

View File

@ -9,16 +9,15 @@
</li><li id="CacheSingleNode__li975015614309">Out-of-the-box usability and no data persistence<p id="CacheSingleNode__p667242253214"><a name="CacheSingleNode__li975015614309"></a><a name="li975015614309"></a>Single-node DCS instances can be used out of the box because they do not involve data loading. If your service requires high QPS, you can warm up the data beforehand to avoid strong concurrency impact on the backend database.</p>
</li><li id="CacheSingleNode__li11291719163215">Low-cost and suitable for development and testing<p id="CacheSingleNode__p763085119554"><a name="CacheSingleNode__li11291719163215"></a><a name="li11291719163215"></a>Single-node instances are 40% cheaper than master/standby DCS instances, suitable for setting up development or testing environments.</p>
</li></ol>
<p id="CacheSingleNode__p188211915114319">In summary, single-node DCS instances support highly concurrent read/write operations, but do not support data persistence. Data will be deleted after instances are restarted. They are suitable for scenarios which do not require data persistence, such as database front-end caching, to accelerate access and ease the concurrency load off the backend. If the desired data does not exist in the cache, requests will go to the database. When restarting the service or the DCS instance, you can pre-generate cache data from the disk database to relieve pressure on the backend during startup.</p>
<p id="CacheSingleNode__p188211915114319">In summary, single-node DCS instances support highly concurrent read/write operations, but do not support data persistence. Data will be deleted after instances are restarted or stopped. They are suitable for scenarios which do not require data persistence, such as database front-end caching, to accelerate access and ease the concurrency load off the backend. If the desired data does not exist in the cache, requests will go to the database. When restarting the service or the DCS instance, you can pre-generate cache data from the disk database to relieve pressure on the backend during startup.</p>
</div>
<div class="section" id="CacheSingleNode__section350919180019"><h4 class="sectiontitle">Architecture</h4><p id="CacheSingleNode__p169821159154813"><a href="#CacheSingleNode__fig15457185394718">Figure 1</a> shows the architecture of single-node DCS Redis instances.</p>
<div class="note" id="CacheSingleNode__note12240134982910"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p11242249122915">To access a DCS Redis 3.0 instance, you must use port 6379. To access a DCS Redis 4.0/5.0/6.0 instance, you can customize the port. If no port is specified, the default port 6379 will be used. In the following architecture, port 6379 is used. If you have customized a port, replace <strong id="CacheSingleNode__b1442135013241">6379</strong> with the actual port.</p>
<div class="note" id="CacheSingleNode__note12240134982910"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p11242249122915">To access a DCS Redis 3.0 instance, you must use port 6379. To access a DCS Redis 4.0 or later instance, you can customize the port. If no port is specified, the default port 6379 will be used. In the following architecture, port 6379 is used. If you have customized a port, replace <strong id="CacheSingleNode__b1442135013241">6379</strong> with the actual port.</p>
</div></div>
<div class="fignone" id="CacheSingleNode__fig15457185394718"><a name="CacheSingleNode__fig15457185394718"></a><a name="fig15457185394718"></a><span class="figcap"><b>Figure 1 </b>Single-node DCS Redis instance architecture</span><br><span><img id="CacheSingleNode__image9134201365216" src="en-us_image_0296784660.png"></span></div>
<p id="CacheSingleNode__p153106583326">Architecture description:</p>
<ul id="CacheSingleNode__ul1631417191120"><li id="CacheSingleNode__li20179270479"><strong id="CacheSingleNode__b264814218559">VPC</strong><p id="CacheSingleNode__p89401530124718">All server nodes of the instance run in the same VPC.</p>
<div class="note" id="CacheSingleNode__note04501339113"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p124516392019">For intra-VPC access, the client and the instance must be in the same VPC with specified security group rule configurations.</p>
<p id="CacheSingleNode__p14803202620398">For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
<div class="note" id="CacheSingleNode__note04501339113"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p124516392019">For intra-VPC access, the client and the instance must be in the same VPC. For a Redis 3.0 instance, security group rules are required.</p>
</div></div>
</li><li id="CacheSingleNode__li017927194718"><strong id="CacheSingleNode__b386793812488">Application</strong><p id="CacheSingleNode__p36064574817">The client of the instance, which is the application running on an Elastic Cloud Server (ECS).</p>
<p id="CacheSingleNode__p19314439510">DCS Redis instances are compatible with the Redis protocol, and can be accessed through open-source clients. For details about accessing DCS instances, see <a href="dcs-ug-0916002.html">Accessing an Instance</a>.</p>

View File

@ -7,17 +7,17 @@
<div class="section" id="GlobalDRPolicy__en-us_topic_0161126124_section9873193151517"><h4 class="sectiontitle">Single-AZ HA</h4><p id="GlobalDRPolicy__en-us_topic_0161126124_p11449191363119">Single-AZ deployment means to deploy an instance within a physical equipment room. DCS provides process/service HA, data persistence, and hot standby DR policies for different types of DCS instances.</p>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p1795194162611"><strong id="GlobalDRPolicy__en-us_topic_0161126124_b67201447135919">Single-node DCS instance</strong>: When DCS detects a process fault, a new process is started to ensure service HA.</p>
<div class="fignone" id="GlobalDRPolicy__en-us_topic_0161126124_fig175040231000"><span class="figcap"><b>Figure 2 </b>HA for a single-node DCS instance deployed within an AZ</span><br><span><img class="vsd" id="GlobalDRPolicy__en-us_topic_0161126124_image164201427202219" src="en-us_image_0266235448.png"></span></div>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p398014445284"><strong id="GlobalDRPolicy__en-us_topic_0161126124_b166451111105">Master/Standby DCS instance</strong>: Data is persisted to disk in the master node and incrementally synchronized and persisted to the standby node, achieving hot standby and data persistence.</p>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p398014445284">By default, instances except for single-node ones support data persistence. Data is persisted to disk in the master node and incrementally synchronized and persisted to the standby node, achieving hot standby and persistent data backups.</p>
<p id="GlobalDRPolicy__p185011530001">For master/standby or read/write splitting instances, and each shard of cluster instances, the master node process synchronizes and persists data to the standby node processes, as shown in the following figure.</p>
<div class="fignone" id="GlobalDRPolicy__en-us_topic_0161126124_fig9238184592511"><span class="figcap"><b>Figure 3 </b>HA for a master/standby DCS instance deployed within an AZ</span><br><span><img class="vsd" id="GlobalDRPolicy__en-us_topic_0161126124_image169901810234" src="en-us_image_0266235321.png"></span></div>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p81313812814"><strong id="GlobalDRPolicy__en-us_topic_0161126124_b568512479108">Cluster DCS instance</strong>: Similar to a master/standby instance, data in each shard (instance process) of a cluster instance is synchronized between master and standby nodes and persisted on both nodes.</p>
<div class="fignone" id="GlobalDRPolicy__en-us_topic_0161126124_fig18044436405"><span class="figcap"><b>Figure 4 </b>HA for a cluster DCS instance deployed within an AZ</span><br><span><img class="vsd" id="GlobalDRPolicy__en-us_topic_0161126124_image03261413152416" src="en-us_image_0266235394.png"></span></div>
</div>
<div class="section" id="GlobalDRPolicy__en-us_topic_0161126124_section724471151511"><h4 class="sectiontitle">Cross-AZ DR</h4><p id="GlobalDRPolicy__en-us_topic_0161126124_p73698714013">The master and standby nodes of a master/standby or cluster DCS instance can be deployed across AZs (in different equipment rooms). Power supplies and networks of different AZs are physically isolated. When a fault occurs in the AZ where the master node is deployed, the standby node connects to the client and takes over data read and write operations.</p>
<div class="fignone" id="GlobalDRPolicy__en-us_topic_0161126124_fig2046754742112"><span class="figcap"><b>Figure 5 </b>Cross-AZ deployment of a master/standby DCS instance</span><br><span><img class="vsd" id="GlobalDRPolicy__en-us_topic_0161126124_image1079294613241" src="en-us_image_0266235441.png"></span></div>
<div class="note" id="GlobalDRPolicy__en-us_topic_0161126124_note41824212218"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="GlobalDRPolicy__en-us_topic_0161126124_p17181423225">This mechanism applies in a similar way to a cluster DCS instance. Each shard (process) is deployed across AZs.</p>
</div></div>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p1333015655118">When creating a master/standby or cluster DCS instance, select a standby AZ that is different from the primary AZ.</p>
<div class="fignone" id="GlobalDRPolicy__fig595045613515"><span class="figcap"><b>Figure 6 </b>Selecting different AZs</span><br><span><img id="GlobalDRPolicy__image149501556173516" src="en-us_image_0000001536314713.png"></span></div>
<div class="section" id="GlobalDRPolicy__en-us_topic_0161126124_section724471151511"><h4 class="sectiontitle">Cross-AZ DR</h4><p id="GlobalDRPolicy__en-us_topic_0161126124_p73698714013">The master and standby nodes of a master/standby, read/write splitting, or cluster DCS instance can be deployed across AZs (in different equipment rooms). Power supplies and networks of different AZs are physically isolated. When a fault occurs in the AZ where the master node is deployed, the standby node connects to the client and takes over data read and write operations.</p>
<div class="fignone" id="GlobalDRPolicy__fig2046754742112"><span class="figcap"><b>Figure 4 </b>Cross-AZ deployment of a master/standby DCS instance</span><br><span><img class="eddx" id="GlobalDRPolicy__image2014016314351" src="en-us_image_0000002163572305.png"></span></div>
<div class="fignone" id="GlobalDRPolicy__fig1777792414411"><span class="figcap"><b>Figure 5 </b>Cross-AZ deployment of a read/write splitting DCS instance</span><br><span><img class="eddx" id="GlobalDRPolicy__image27781241441" src="en-us_image_0000002128172684.png"></span></div>
<div class="fignone" id="GlobalDRPolicy__fig98521916174213"><span class="figcap"><b>Figure 6 </b>Cross-AZ deployment of a Proxy Cluster DCS instance</span><br><span><img class="eddx" id="GlobalDRPolicy__image1876424515320" src="en-us_image_0000002163572313.png"></span></div>
<div class="fignone" id="GlobalDRPolicy__fig64021629332"><span class="figcap"><b>Figure 7 </b>Cross-AZ deployment of a Redis Cluster DCS instance</span><br><span><img class="eddx" id="GlobalDRPolicy__image1140292113311" src="en-us_image_0000002128172688.png"></span></div>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p1333015655118">When creating a master/standby, read/write splitting, or cluster DCS instance, select a standby AZ that is different from the primary AZ.</p>
<div class="fignone" id="GlobalDRPolicy__fig595045613515"><span class="figcap"><b>Figure 8 </b>Selecting different AZs</span><br><span><img id="GlobalDRPolicy__image149501556173516" src="en-us_image_0000001536314713.png"></span></div>
<div class="note" id="GlobalDRPolicy__note58555412312"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="GlobalDRPolicy__ul103873167571"><li id="GlobalDRPolicy__li15388141615577">You can deploy your application across AZs to ensure both data reliability and service availability in the event of power supply or network disruptions.</li><li id="GlobalDRPolicy__li9388316115715">Cross-AZ instances do not support password changes, command renaming, and specification modification when an AZ is faulty.</li></ul>
</div></div>
</div>

View File

@ -3,13 +3,13 @@
<h1 class="topictitle1">Identifying Requirements</h1>
<div id="body8662426"><p id="PurchasePreparation__en-us_topic_0168497785_p35841666509">Before creating a DCS instance, identify your requirements and complete the following preparations:</p>
<ol id="PurchasePreparation__en-us_topic_0168497785_ol8797163185312"><li id="PurchasePreparation__en-us_topic_0168497785_li479893115317">Decide on the required cache engine version.<p id="PurchasePreparation__en-us_topic_0168497785_p1570920515610"><a name="PurchasePreparation__en-us_topic_0168497785_li479893115317"></a><a name="en-us_topic_0168497785_li479893115317"></a>Different Redis versions have different features. For details, see <a href="RedisDifference.html">Comparing Redis Versions</a>.</p>
</li><li id="PurchasePreparation__en-us_topic_0168497785_li479873115320">Decide on the required instance type.<p id="PurchasePreparation__en-us_topic_0168497785_p7482257123713"><a name="PurchasePreparation__en-us_topic_0168497785_li479873115320"></a><a name="en-us_topic_0168497785_li479873115320"></a>DCS provides single-node, master/standby, Proxy Cluster, and Redis Cluster types of instances. Each type has its own architecture. For details about the instance architectures, see <a href="dcs-pd-200312001.html">DCS Instance Types</a>.</p>
</li><li id="PurchasePreparation__en-us_topic_0168497785_li479873115320">Decide on the required instance type.<p id="PurchasePreparation__en-us_topic_0168497785_p7482257123713"><a name="PurchasePreparation__en-us_topic_0168497785_li479873115320"></a><a name="en-us_topic_0168497785_li479873115320"></a>DCS provides single-node, master/standby, read/write splitting, Proxy Cluster, and Redis Cluster types of instances. Each type has its own architecture. For details about the instance architectures, see <a href="dcs-pd-200312001.html">DCS Instance Types</a>.</p>
</li><li id="PurchasePreparation__en-us_topic_0168497785_li17984375315">Decide on the required instance specification.<p id="PurchasePreparation__p186331251181116"><a name="PurchasePreparation__en-us_topic_0168497785_li17984375315"></a><a name="en-us_topic_0168497785_li17984375315"></a>Each specification specifies the maximum available memory, number of connections, and bandwidth. For details, see <a href="en-us_topic_0054235835.html">DCS Instance Specifications</a>.</p>
</li><li id="PurchasePreparation__en-us_topic_0168497785_li187982355319">Decide on the region and whether cross-AZ deployment is required.<p id="PurchasePreparation__en-us_topic_0168497785_p92195185414"><a name="PurchasePreparation__en-us_topic_0168497785_li187982355319"></a><a name="en-us_topic_0168497785_li187982355319"></a>Choose a region closest to your application to reduce latency.</p>
<p id="PurchasePreparation__en-us_topic_0168497785_p15928161731110">A region consists of multiple availability zones (AZs) with physically isolated power supplies and networks. Master/standby and cluster DCS instances can be deployed across AZs.</p>
<div class="note" id="PurchasePreparation__en-us_topic_0168497785_note6826904912"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="PurchasePreparation__en-us_topic_0168497785_ul3826100994"><li id="PurchasePreparation__en-us_topic_0168497785_li0826200195">If a master/standby or cluster DCS instance is deployed across AZs, faults in an AZ do not affect cache nodes in other AZs. This is because when the master node is faulty, the standby cache node will automatically become the master node to provide services. Such deployment achieves better disaster recovery.</li><li id="PurchasePreparation__en-us_topic_0168497785_li182617019920">Deploying a DCS instance across AZs slightly reduces network efficiency compared with deploying an instance within an AZ. Therefore, if a DCS instance is deployed across AZs, synchronization between master and standby cache nodes is slightly less efficient.</li></ul>
<p id="PurchasePreparation__en-us_topic_0168497785_p15928161731110">A region consists of multiple availability zones (AZs) with physically isolated power supplies and networks. Master/Standby, read/write splitting, and cluster DCS instances can be deployed across AZs.</p>
<div class="note" id="PurchasePreparation__en-us_topic_0168497785_note6826904912"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="PurchasePreparation__en-us_topic_0168497785_ul3826100994"><li id="PurchasePreparation__en-us_topic_0168497785_li0826200195">If a master/standby, read/write splitting, or cluster DCS instance is deployed across AZs, faults in an AZ do not affect cache nodes in other AZs. This is because when the master node is faulty, the standby cache node will automatically become the master node to provide services. Such deployment achieves better disaster recovery.</li><li id="PurchasePreparation__en-us_topic_0168497785_li182617019920">Deploying a DCS instance across AZs slightly reduces network efficiency compared with deploying an instance within an AZ. Therefore, if a DCS instance is deployed across AZs, synchronization between master and standby cache nodes is slightly less efficient.</li></ul>
</div></div>
</li><li id="PurchasePreparation__en-us_topic_0168497785_li279803125315">Decide whether backup policies are required.<p id="PurchasePreparation__p15224832164414"><a name="PurchasePreparation__en-us_topic_0168497785_li279803125315"></a><a name="en-us_topic_0168497785_li279803125315"></a>Currently, backup policies can be configured only for master/standby and cluster DCS instances. For details about backup and restoration, see <a href="en-us_topic_0079835992.html">Overview</a>.</p>
</li><li id="PurchasePreparation__en-us_topic_0168497785_li279803125315">Decide whether backup policies are required.<p id="PurchasePreparation__p15224832164414"><a name="PurchasePreparation__en-us_topic_0168497785_li279803125315"></a><a name="en-us_topic_0168497785_li279803125315"></a>Currently, backup restoration policies can be configured for instances other than single-node ones. For details about backup and restoration, see <a href="en-us_topic_0079835992.html">Overview</a>.</p>
</li></ol>
</div>
<div>

View File

@ -2,15 +2,15 @@
<h1 class="topictitle1">Comparing Redis Versions</h1>
<div id="body8662426"><p id="RedisDifference__en-us_topic_0147231413_p17821915171115">When creating a DCS Redis instance, you can select the cache engine version and the instance type.</p>
<ul id="RedisDifference__en-us_topic_0147231413_ul0128672131"><li id="RedisDifference__en-us_topic_0147231413_li17128775131"><strong id="RedisDifference__en-us_topic_0147231413_b10691123654311">Version</strong><p id="RedisDifference__en-us_topic_0147231413_p48271921131515">DCS supports Redis 3.0/4.0/5.0/6.0. The following table describes the differences between these versions.</p>
<ul id="RedisDifference__en-us_topic_0147231413_ul0128672131"><li id="RedisDifference__en-us_topic_0147231413_li17128775131"><strong id="RedisDifference__en-us_topic_0147231413_b10691123654311">Version</strong><p id="RedisDifference__en-us_topic_0147231413_p48271921131515">DCS supports Redis 3.0/4.0/5.0/6.0<span id="RedisDifference__text1227912251543">/7.0</span>. The following table describes the differences between these versions.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RedisDifference__en-us_topic_0147231413_table3788103816552" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Differences between Redis versions</caption><thead align="left"><tr id="RedisDifference__en-us_topic_0147231413_row478910381556"><th align="left" class="cellrowborder" valign="top" width="9.919008099190082%" id="mcps1.3.2.1.3.2.5.1.1"><p id="RedisDifference__en-us_topic_0147231413_p3789193875510">Feature</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.847415258474154%" id="mcps1.3.2.1.3.2.5.1.2"><p id="RedisDifference__en-us_topic_0147231413_p5789183810553">Redis 3.0</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.65633436656334%" id="mcps1.3.2.1.3.2.5.1.3"><p id="RedisDifference__en-us_topic_0147231413_p10790938135520">Redis 4.0 &amp; Redis 5.0</p>
<th align="left" class="cellrowborder" valign="top" width="36.65633436656334%" id="mcps1.3.2.1.3.2.5.1.3"><p id="RedisDifference__en-us_topic_0147231413_p10790938135520">Redis 4.0 and Redis 5.0</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.577242275772424%" id="mcps1.3.2.1.3.2.5.1.4"><p id="RedisDifference__p954021115310">Redis 6.0</p>
<th align="left" class="cellrowborder" valign="top" width="27.577242275772424%" id="mcps1.3.2.1.3.2.5.1.4"><p id="RedisDifference__p954021115310">Redis 6.0<span id="RedisDifference__text1551305575513">/7.0</span></p>
</th>
</tr>
</thead>
@ -20,7 +20,7 @@
</td>
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__p149257484812">Redis 4.0.14 and 5.0.14, respectively</p>
</td>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p8926134816815">6.2.7</p>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p8926134816815">Redis 6.2.7 and 7.2, respectively</p>
</td>
</tr>
<tr id="RedisDifference__en-us_topic_0147231413_row779019388558"><td class="cellrowborder" valign="top" width="9.919008099190082%" headers="mcps1.3.2.1.3.2.5.1.1 "><p id="RedisDifference__en-us_topic_0147231413_p10790163875516">Instance deployment mode</p>
@ -63,9 +63,9 @@
</td>
<td class="cellrowborder" valign="top" width="25.847415258474154%" headers="mcps1.3.2.1.3.2.5.1.2 "><p id="RedisDifference__en-us_topic_0147231413_p1279023812559">Single-node, master/standby, and Proxy Cluster</p>
</td>
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__en-us_topic_0147231413_p4790438135511">Single-node, master/standby and Redis Cluster</p>
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__en-us_topic_0147231413_p4790438135511">Single-node, master/standby, Proxy Cluster, read/write splitting, and Redis Cluster</p>
</td>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p1154061195320">Single-node, master/standby, Redis Cluster</p>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p1154061195320">Single-node, master/standby, and Redis Cluster</p>
</td>
</tr>
<tr id="RedisDifference__en-us_topic_0147231413_row10764145318"><td class="cellrowborder" valign="top" width="9.919008099190082%" headers="mcps1.3.2.1.3.2.5.1.1 "><p id="RedisDifference__en-us_topic_0147231413_p1764134139">Scale-up or scale-down</p>
@ -81,9 +81,9 @@
</td>
<td class="cellrowborder" valign="top" width="25.847415258474154%" headers="mcps1.3.2.1.3.2.5.1.2 "><p id="RedisDifference__en-us_topic_0147231413_p495617416314">Supported for master/standby and cluster instances</p>
</td>
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__en-us_topic_0147231413_p99561648316">Supported for master/standby and cluster instances</p>
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__en-us_topic_0147231413_p99561648316">Supported for master/standby, read/write splitting, and cluster instances</p>
</td>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p1254010111536">Supported for master/standby instances</p>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p1254010111536">Supported for master/standby and cluster instances</p>
</td>
</tr>
</tbody>
@ -91,7 +91,7 @@
</div>
<div class="note" id="RedisDifference__en-us_topic_0147231413_note1177317222288"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="RedisDifference__en-us_topic_0147231413_p677412212815">The underlying architectures vary by Redis version. Once a Redis version is chosen, it cannot be changed. For example, you cannot upgrade a DCS Redis 3.0 instance to Redis 4.0 or 5.0. If you require a higher Redis version, create a new instance that meets your requirements and then migrate data from the old instance to the new one.</p>
</div></div>
</li><li id="RedisDifference__en-us_topic_0147231413_li1612811716135"><strong id="RedisDifference__en-us_topic_0147231413_b1293715259192">Instance type</strong><p id="RedisDifference__en-us_topic_0147231413_p1982518509152">Select from single-node, master/standby, and cluster types. For details about their architectures and application scenarios, see <a href="dcs-pd-200312001.html">DCS Instance Types</a>.</p>
</li><li id="RedisDifference__en-us_topic_0147231413_li1612811716135"><strong id="RedisDifference__en-us_topic_0147231413_b1293715259192">Instance type</strong><p id="RedisDifference__en-us_topic_0147231413_p1982518509152">Select from single-node, master/standby, read/write splitting, and cluster types. For details about their architectures and application scenarios, see <a href="dcs-pd-200312001.html">DCS Instance Types</a>.</p>
</li></ul>
</div>
<div>

View File

@ -24,9 +24,8 @@
</tbody>
</table>
</div>
<div class="section" id="TagManagement__section184051819123810"><h4 class="sectiontitle">Procedure</h4><ol id="TagManagement__ol546918324217"><li id="TagManagement__li1799392835619"><span>Log in to the DCS console.</span></li><li id="TagManagement__li19668467518"><span>Click <span><img id="TagManagement__image144339315587" src="en-us_image_0000001148443454.png"></span> in the upper left corner and select a region and a project.</span></li><li id="TagManagement__li18411387341"><span>In the navigation pane, choose <strong id="TagManagement__b1745220350597">Cache Manager</strong>.</span></li></ol><ol start="4" id="TagManagement__ol3625154473819"><li id="TagManagement__li19501824184620"><span>Click the name of an instance.</span></li><li id="TagManagement__li189991214141019"><span>Choose <strong id="TagManagement__b104560562919">Instance Configuration</strong> &gt; <strong id="TagManagement__b1015610111013">Tags</strong>.</span><p><p id="TagManagement__p16898133410247">View the tags of the instance.</p>
</p></li><li id="TagManagement__li658882719391"><span>Perform the following operations as required:</span><p><ul id="TagManagement__ul16826112920406"><li id="TagManagement__li482619297402">Add a tag<ol type="a" id="TagManagement__ol17680111725217"><li id="TagManagement__li2068081725212">Click <strong id="TagManagement__b15344451175319">Add/Edit Tag</strong>.<p id="TagManagement__p204582911522">If you have created predefined tags, select a predefined pair of tag key and value. To view predefined tags or create tags, click <strong id="TagManagement__b4645113574819">View predefined tags</strong>. You will be directed to the TMS console.</p>
<p id="TagManagement__p0455299528">You can also create new tags by entering <strong id="TagManagement__b45633910492">Tag key</strong> and <strong id="TagManagement__b1956916918495">Tag value</strong>.</p>
<div class="section" id="TagManagement__section184051819123810"><h4 class="sectiontitle">Procedure</h4><ol id="TagManagement__ol546918324217"><li id="TagManagement__li1799392835619"><span>Log in to the DCS console.</span></li><li id="TagManagement__li19668467518"><span>Click <span><img id="TagManagement__image118901444113" src="en-us_image_0143929918.png"></span> in the upper left corner and select a region and a project.</span></li><li id="TagManagement__li18411387341"><span>In the navigation pane, choose <span class="uicontrol" id="TagManagement__uicontrol145491045164318"><b>Cache Manager</b></span>.</span></li></ol><ol start="4" id="TagManagement__ol3625154473819"><li id="TagManagement__li19501824184620"><span>Click the name of an instance.</span></li><li id="TagManagement__li189991214141019"><span>Choose <strong id="TagManagement__b104560562919">Instance Configuration</strong> &gt; <strong id="TagManagement__b1015610111013">Tags</strong>.</span><p><p id="TagManagement__p16898133410247">View the tags of the instance.</p>
</p></li><li id="TagManagement__li658882719391"><span>Perform the following operations as required:</span><p><ul id="TagManagement__ul16826112920406"><li id="TagManagement__li482619297402">Add a tag<ol type="a" id="TagManagement__ol17680111725217"><li id="TagManagement__li2068081725212">Click <strong id="TagManagement__b15344451175319">Add/Edit Tag</strong>. You can create new tags by entering <strong id="TagManagement__b194957209348">Tag key</strong> and <strong id="TagManagement__b349510208346">Tag value</strong>.<p id="TagManagement__p204582911522">If you have created predefined tags, select a predefined pair of tag key and value. To view predefined tags or create tags, click <strong id="TagManagement__b4645113574819">View predefined tags</strong>. You will be directed to the TMS console.</p>
</li><li id="TagManagement__li187061836205217">Click <strong id="TagManagement__b1720916342491">OK</strong>.</li></ol>
</li><li id="TagManagement__li29623919408">Modify a tag<p id="TagManagement__p78321156282"><a name="TagManagement__li29623919408"></a><a name="li29623919408"></a>Click <strong id="TagManagement__b112595814535">Add/Edit Tag</strong>. In the displayed <strong id="TagManagement__b12251558165319">Add/Edit Tag</strong> dialog box, delete the desired key, add the key again, enter a new tag value, and click <strong id="TagManagement__b7251258115310">Add</strong>.</p>
</li><li id="TagManagement__li5768114518406">Delete a tag<p id="TagManagement__p38252410120"><a name="TagManagement__li5768114518406"></a><a name="li5768114518406"></a>In the row containing the tag to be deleted, click <strong id="TagManagement__b10627355164911">Delete</strong> in the <strong id="TagManagement__b9633165511495">Operation</strong> column. Then click <strong id="TagManagement__b156339556495">Yes</strong>.</p>

View File

@ -1,13 +1,13 @@
<a name="dcs-faq-022025"></a><a name="dcs-faq-022025"></a>
<h1 class="topictitle1">Should I Use a Domain Name or an IP Address to Connect to a DCS Redis Instance?</h1>
<div id="body8662426"><ul id="dcs-faq-022025__en-us_topic_0000001384917470_ul89122251302"><li id="dcs-faq-022025__en-us_topic_0000001384917470_li1791232514013">Single-node, and Proxy Cluster:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p6197182914019"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li1791232514013"></a><a name="en-us_topic_0000001384917470_li1791232514013"></a>Each instance has only one IP address and one domain name address. The addresses remain unchanged before and after master/standby switchover. You can use either address to connect to the instance.</p>
<div id="body8662426"><ul id="dcs-faq-022025__en-us_topic_0000001384917470_ul89122251302"><li id="dcs-faq-022025__en-us_topic_0000001384917470_li1791232514013">Single-node, read/write splitting, and Proxy Cluster:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p6197182914019"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li1791232514013"></a><a name="en-us_topic_0000001384917470_li1791232514013"></a>Each instance has only one IP address and one domain name address. The addresses remain unchanged before and after master/standby switchover. You can use either address to connect to the instance.</p>
</li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li1591315257017">Master/Standby:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p146226296134"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li1591315257017"></a><a name="en-us_topic_0000001384917470_li1591315257017"></a>Each instance has one IP address and two domain name addresses. One of the domain name addresses is used only for processing read requests. The addresses remain unchanged after master/standby switchover. You can use any address to connect to the instance.</p>
<p id="dcs-faq-022025__en-us_topic_0000001384917470_p962218293137">When you use a domain name address, distinguish between read and write requests. If you use <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b10918133171317">Connection Address</strong> or <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b13759750111320">IP Address</strong>, functions are not affected. If you use <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b32901621131411">Read-only Address</strong>, only read requests are processed.</p>
<p id="dcs-faq-022025__en-us_topic_0000001384917470_p962218293137">When you use a domain name address, distinguish between read and write requests. If you use <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b10918133171317">Connection Address</strong> or <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b13759750111320">IP Address</strong>, functions are not affected. If you use <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b32901621131411">Read-only Address</strong>, only read requests are processed. You are advised to use read/write splitting instances if you have read/write splitting requirements.</p>
</li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li19131252011">Redis Cluster:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p36421369014"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li19131252011"></a><a name="en-us_topic_0000001384917470_li19131252011"></a>A Redis Cluster instance has multiple pairs of master and replica IP addresses and one domain name address. You can use any address to connect to the instance.</p>
<p id="dcs-faq-022025__en-us_topic_0000001384917470_p1351193812014">The connected node sends requests to the correct node. All nodes in the cluster can receive requests. <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b11191691310">Configure multiple or all IP addresses</strong> to prevent single points of failure.</p>
</li></ul>
<div class="note" id="dcs-faq-022025__en-us_topic_0000001384917470_note73804252286"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-faq-022025__en-us_topic_0000001384917470_ul238318197019"><li id="dcs-faq-022025__en-us_topic_0000001384917470_li938310191402">Domain names cannot be resolved across regions. If the client and the DCS Redis instance are not in the same region, the instance cannot be accessed using its domain name address. You can manually map the domain name to the IP address in the <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b195681294755139">hosts</strong> file or access the instance using its IP address. </li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li738417192013">For details about how to connect to an instance, see <a href="dcs-ug-0916002.html">Accessing an Instance</a>.</li></ul>
<div class="note" id="dcs-faq-022025__en-us_topic_0000001384917470_note73804252286"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-faq-022025__en-us_topic_0000001384917470_ul238318197019"><li id="dcs-faq-022025__en-us_topic_0000001384917470_li938310191402">Domain names cannot be resolved across regions. If the client server and the DCS Redis instance are not in the same region, the instance cannot be accessed using its domain name address. You can manually map the domain name to the IP address in the <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b195681294755139">hosts</strong> file or access the instance using its IP address. </li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li738417192013">For details about how to connect to an instance, see <a href="dcs-ug-0916002.html">Accessing an Instance</a>.</li></ul>
</div></div>
</div>
<div>

View File

@ -4,8 +4,7 @@
<h1 class="topictitle1">Will Cached Data Be Retained After an Instance Is Restarted?</h1>
<div id="body8662426"><p id="dcs-faq-0220330__en-us_topic_0000001226633976_p2938536145015">After a single-node DCS instance is restarted, data in the instance is deleted.</p>
<p id="dcs-faq-0220330__en-us_topic_0000001226633976_p157943519577">Master/Standby and cluster instances (except single-replica clusters) support AOF persistence by default. Data is retained after these instances are restarted.</p>
<p id="dcs-faq-0220330__en-us_topic_0000001226633976_p2938236195019">If AOF persistence is disabled (<strong id="dcs-faq-0220330__en-us_topic_0000001226633976_b1775833072617">appendonly</strong> is set to <strong id="dcs-faq-0220330__en-us_topic_0000001226633976_b1880493211267">no</strong>), data is deleted after the instances are restarted.</p>
<p id="dcs-faq-0220330__en-us_topic_0000001226633976_p157943519577">Master/Standby, read/write splitting, 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 (<strong id="dcs-faq-0220330__en-us_topic_0000001226633976_b1991201018525">appendonly</strong> is set to <strong id="dcs-faq-0220330__en-us_topic_0000001226633976_b1891212106528">no</strong>), data is deleted after the instances are restarted.</p>
</div>
<div>
<div class="familylinks">

View File

@ -8,7 +8,7 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0730013.html">Can I Change the VPC and Subnet for a DCS Redis Instance?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0730014.html">Why Aren't Security Groups Configured for DCS Redis 4.0/5.0/6.0 Instances?</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-faq-0730014.html">Why Aren't Security Groups Configured for DCS Redis 4.0 and Later Instances?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0730015.html">Do DCS Redis Instances Limit the Size of a Key or Value?</a></strong><br>
</li>

View File

@ -8,7 +8,7 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0730054.html">Can I Export Backup Data of DCS Redis Instances to RDB Files Using the Console?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0427081.html">Does DCS Support Data Persistence? What Is the Impact of Persistence?</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-faq-0427081.html">Do DCS Redis Instances Support Data Persistence? What Is the Impact of Persistence?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210706001.html">When Will AOF Rewrites Be Triggered?</a></strong><br>
</li>
@ -16,8 +16,6 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210721001.html">How Do I Enable the SYNC and PSYNC Commands?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210721002.html">Why Does Migration Task Creation Fail?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-11185.html">Will the Same Keys Be Overwritten During Data Migration or Backup Import?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-090626001.html">Online Migration with Rump</a></strong><br>

View File

@ -1,8 +1,10 @@
<a name="dcs-faq-0427057"></a><a name="dcs-faq-0427057"></a>
<h1 class="topictitle1">Is There a Time Limit on Executing Redis Commands? What Will Happen If a Command Times Out?</h1>
<div id="body8662426"><p id="dcs-faq-0427057__en-us_topic_0000001198023667_p127571020163120">Redis command timeouts can be controlled on the client end or server end.</p>
<ul id="dcs-faq-0427057__en-us_topic_0000001198023667_ul12261193311317"><li id="dcs-faq-0427057__en-us_topic_0000001198023667_li7261183303115">Timeouts on the client end are controlled in the client code. You can determine the timeouts that suit service needs. For example, if you use Lettuce, a Java client, configure the <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b11785832605555">timeout</strong> parameter.</li><li id="dcs-faq-0427057__en-us_topic_0000001198023667_li1368413512311">On the server end, the <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b14521440025555">timeout</strong> parameter is set to <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b18874047065555">0</strong> by default, indicating that connections will never be terminated. Modify the parameter setting by referring to <a href="dcs-ug-0312024.html">Modifying Configuration Parameters</a>.</li></ul>
<div id="body8662426"><p id="dcs-faq-0427057__en-us_topic_0000001198023667_p127571020163120">Redis timeouts happen on the client or server.</p>
<ul id="dcs-faq-0427057__en-us_topic_0000001198023667_ul12261193311317"><li id="dcs-faq-0427057__en-us_topic_0000001198023667_li7261183303115">Timeouts on the client are managed in the client code. Services can determine an appropriate timeout. For example, parameter <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b11785832605555">timeout</strong> can be configured on Java Lettuce.<p id="dcs-faq-0427057__en-us_topic_0000001198023667_p45561737164218">When a command times out on the client, errors, command blocks, or client connection retries may occur.</p>
</li><li id="dcs-faq-0427057__en-us_topic_0000001198023667_li1368413512311">On the server, the <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b14521440025555">timeout</strong> parameter is set to <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b18874047065555">0</strong> by default, indicating that connections will not be terminated. To modify the setting, see <a href="dcs-ug-0312024.html">Modifying Configuration Parameters</a>.<p id="dcs-faq-0427057__en-us_topic_0000001198023667_p0371123564612">If the <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b412517213252">timeout</strong> parameter is not <strong id="dcs-faq-0427057__en-us_topic_0000001198023667_b651113418250">0</strong>, idle connections between the client and server will be terminated as specified.</p>
</li></ul>
</div>
<div>
<div class="familylinks">

View File

@ -1,18 +1,20 @@
<a name="dcs-faq-0427081"></a><a name="dcs-faq-0427081"></a>
<h1 class="topictitle1">Does DCS Support Data Persistence? What Is the Impact of Persistence?</h1>
<div id="body8662426"><div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section54961613182719"><h4 class="sectiontitle">Support for Persistence</h4><ul id="dcs-faq-0427081__en-us_topic_0000001152024118_ul13785171114168"><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li12785181119169">DCS Redis instances:<ul id="dcs-faq-0427081__en-us_topic_0000001152024118_ul8386756113825"><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li40228198113825">Single-node: Data persistence is not supported.</li><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li43901409113836">Master/standby and cluster (except single-replica clusters): Data persistence is supported.</li></ul>
</li></ul>
<h1 class="topictitle1">Do DCS Redis Instances Support Data Persistence? What Is the Impact of Persistence?</h1>
<div id="body8662426"><div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section54961613182719"><h4 class="sectiontitle">Is Persistence Supported?</h4><p id="dcs-faq-0427081__en-us_topic_0000001152024118_p1698818103475">Single-node: No</p>
<p id="dcs-faq-0427081__en-us_topic_0000001152024118_p8379515174720">Master/Standby, read/write splitting, and cluster (except single-replica clusters): Yes</p>
</div>
<div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section7456131223018"><h4 class="sectiontitle">Persistence Modes</h4><ul id="dcs-faq-0427081__en-us_topic_0000001152024118_ul8704048102717"><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li16479171616113">DCS supports only AOF persistence by default. You can enable or disable persistence as required. All instances except single-node and single-replica cluster ones are created with AOF persistence enabled.</li><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li20704144872715">DCS does not support RDB persistence by default and you cannot configure the <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b10732728165418">save</strong> parameter. If RDB persistence is required for a master/standby or cluster instance of Redis 4.0 or later, you can use the backup and restoration function to back up the instance data to an RDB file and store the data in OBS.</li></ul>
<div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section7456131223018"><h4 class="sectiontitle">How Is Data Persisted?</h4><ul id="dcs-faq-0427081__en-us_topic_0000001152024118_ul8704048102717"><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li16479171616113">DCS Redis instances supports only AOF persistence by default. You can enable or disable persistence as required. All instances except single-node and single-replica cluster ones are created with AOF persistence enabled.</li><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li20704144872715">DCS Redis instances do not support RDB persistence by default and the <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b10732728165418">save</strong> parameter cannot be manually configured. If RDB persistence is required for a master/standby or cluster instance of Redis 4.0 or later, you can use the backup and restoration function to back up the instance data in an RDB file and store the data in OBS.</li></ul>
</div>
<div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section1456541017316"><h4 class="sectiontitle">Disk Used for Persistence</h4><p id="dcs-faq-0427081__en-us_topic_0000001152024118_p13729156103118">For DCS Redis 4.0 and later instances, data is persisted to SSD disks.</p>
</div>
<div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section1530716418282"><h4 class="sectiontitle">Impact of AOF Persistence</h4><div class="p" id="dcs-faq-0427081__en-us_topic_0000001152024118_p154892314174">After AOF persistence is enabled, the Redis-Server process needs to record operations in the AOF file for data persistence.<ul id="dcs-faq-0427081__en-us_topic_0000001152024118_ul1986274393117"><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li3321124219310">If the disk or I/O of the underlying compute node is faulty, the latency may increase or a master/standby switchover may occur.</li><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li415512683212">Redis-Server periodically rewrites the AOF. During a rewrite, the latency may be high for a short time. For details about the AOF rewriting rules, see <a href="dcs-faq-210706001.html">When Will AOF Rewrites Be Triggered?</a></li></ul>
<div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section1530716418282"><h4 class="sectiontitle">Impact of AOF Persistence</h4><div class="p" id="dcs-faq-0427081__en-us_topic_0000001152024118_p154892314174">After AOF persistence is enabled, the Redis-Server process records operations in the AOF file for data persistence. This may have the following impacts:<ul id="dcs-faq-0427081__en-us_topic_0000001152024118_ul1986274393117"><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li3321124219310">If the disk or I/O of the underlying compute node is faulty, the latency may increase or a master/standby switchover may occur.</li><li id="dcs-faq-0427081__en-us_topic_0000001152024118_li415512683212">Redis-Server periodically rewrites the AOF. During a rewrite, the latency may be high for a short time. For details about the AOF rewriting rules, see <a href="dcs-faq-210706001.html">When Will AOF Rewrites Be Triggered?</a></li></ul>
</div>
<p id="dcs-faq-0427081__en-us_topic_0000001152024118_p13384536152612">If DCS instances are used for application acceleration, you are advised to disable AOF persistence for higher performance and stability.</p>
<p id="dcs-faq-0427081__en-us_topic_0000001152024118_p2024623618266"><strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b14799129183512">Exercise caution when disabling AOF persistence. After it is disabled, cached data may be lost in extreme scenarios, for example, when both the master and standby nodes are faulty.</strong></p>
<p id="dcs-faq-0427081__en-us_topic_0000001152024118_p13246173612268">To disable AOF persistence, set parameter <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b158831227155919">appendonly</strong> to <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b488312785910">no</strong> on the instance details page.</p>
</div>
<div class="section" id="dcs-faq-0427081__en-us_topic_0000001152024118_section8353113714294"><h4 class="sectiontitle">Configuring Redis Persistence</h4><p id="dcs-faq-0427081__en-us_topic_0000001152024118_p13246173612268">Set the instance configuration parameter <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b522175911910">appendonly</strong> to <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b1423959121913">no</strong> to disable, or <strong id="dcs-faq-0427081__en-us_topic_0000001152024118_b178018533212">yes</strong> to enable AOF persistence. (Not available for single-node instances.)</p>
<p id="dcs-faq-0427081__en-us_topic_0000001152024118_p647075416397">For details, see <a href="dcs-ug-0312024.html">Modifying Configuration Parameters</a>.</p>
</div>
</div>
<div>

View File

@ -16,7 +16,7 @@
</tr>
<tr id="dcs-faq-0521003__en-us_topic_0000001233623890_row19535181616171"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.1.1.3.1.1 "><p id="dcs-faq-0521003__en-us_topic_0000001233623890_p4535016181713">Hot key</p>
</td>
<td class="cellrowborder" valign="top" width="79.51%" headers="mcps1.3.1.1.3.1.2 "><p id="dcs-faq-0521003__en-us_topic_0000001233623890_p18689338178">A key is defined as a hot key if it is frequently requested or if it occupies a large number of resources. For example:</p>
<td class="cellrowborder" valign="top" width="79.51%" headers="mcps1.3.1.1.3.1.2 "><p id="dcs-faq-0521003__en-us_topic_0000001233623890_p18689338178">A hot key is most frequently accessed, or consumes significant resources. For example:</p>
<ul id="dcs-faq-0521003__en-us_topic_0000001233623890_ul196833311171"><li id="dcs-faq-0521003__en-us_topic_0000001233623890_li126833312175">In a cluster instance, a shard processes 10,000 requests per second, among which 3000 are performed on the same key.</li><li id="dcs-faq-0521003__en-us_topic_0000001233623890_li106813336173">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 <strong id="dcs-faq-0521003__en-us_topic_0000001233623890_b55302156146">HGETALL</strong> operation on a Hash key.</li></ul>
</td>
</tr>

View File

@ -1,8 +1,10 @@
<a name="dcs-faq-0603001"></a><a name="dcs-faq-0603001"></a>
<h1 class="topictitle1">Why Is the Rejected Connections Metric Displayed?</h1>
<div id="body8662426"><p id="dcs-faq-0603001__en-us_topic_0000001198023693_p490381214435">If the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b98701745355210">Rejected Connections</strong> metric is displayed, check if the number of connected clients exceeds the maximum allowed number of connections of the instances.</p>
<ul id="dcs-faq-0603001__en-us_topic_0000001198023693_ul62821695257"><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li3282899258">To check the maximum allowed number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b18884174881">Parameters</strong> tab page of the instance and check the value of the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b588474885">maxclients</strong> parameter. (Proxy Cluster instances do not have this parameter. You can view the maximum number of connections on the instance creation page.)</li><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li92826922519">To check the current number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b25901273816">Performance Monitoring</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b1859012271981">Connected Clients</strong> metric.</li></ul>
<div id="body8662426"><p id="dcs-faq-0603001__en-us_topic_0000001198023693_p490381214435">If the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b123141047143011">Rejected Connections</strong> metric is displayed, check if the number of connected clients exceeds the maximum allowed number of connections of the instances.</p>
<div class="note" id="dcs-faq-0603001__en-us_topic_0000001198023693_note14590113901411"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-0603001__en-us_topic_0000001198023693_p1759183951415">The <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b115411912143419">Rejected Connections</strong> metric of data nodes can be checked only for master/standby, cluster, and read/write splitting DCS Redis 4.0/5.0/6.0 instances.</p>
</div></div>
<ul id="dcs-faq-0603001__en-us_topic_0000001198023693_ul62821695257"><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li3282899258">To check the maximum number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b8297181416395">Parameters</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b12754617193911">maxclients</strong> metric. (Currently, read/write splitting instances do not have this parameter. To query the maximum connections of them, see .)</li><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li92826922519">To check the current number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b25901273816">Performance Monitoring</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b1859012271981">Connected Clients</strong> metric.</li></ul>
<p id="dcs-faq-0603001__en-us_topic_0000001198023693_p1375612232417">If the current number of connections reaches the upper limit, you can adjust the value of <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b21271135920">maxclients</strong>. If the value of <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b7602223799">maxclients</strong> can no longer be increased, increase the instance specifications.</p>
</div>
<div>

View File

@ -1,7 +1,7 @@
<a name="dcs-faq-0730001"></a><a name="dcs-faq-0730001"></a>
<h1 class="topictitle1">Does DCS Support Access over Public Networks?</h1>
<div id="body1596093268949"><p id="dcs-faq-0730001__p151602565397">No. DCS instances cannot be access at their EIPs over public networks. To ensure security, the ECS that serves as a client and the DCS instance that the client will access must belong to the same VPC.</p>
<div id="body1596093268949"><p id="dcs-faq-0730001__p151602565397">No. DCS instances cannot be accessed at their EIPs over public networks. To ensure security, the ECS that serves as a client and the DCS instance that the client will access must belong to the same VPC.</p>
</div>
<div>
<div class="familylinks">

View File

@ -6,13 +6,13 @@
<p id="dcs-faq-0730009__en-us_topic_0152099099_p3701016105918">For security purposes, DCS does not support the <strong id="dcs-faq-0730009__b28725425920">CONFIG</strong> command initiated by a client. You need to perform the following steps:</p>
<ol id="dcs-faq-0730009__en-us_topic_0152099099_ol82491552120"><li id="dcs-faq-0730009__en-us_topic_0152099099_li32480551812">On the DCS console, set the value of the <strong id="dcs-faq-0730009__b7186568598">notify-keyspace-event</strong> parameter to <strong id="dcs-faq-0730009__b17186196125917">Egx</strong> for a DCS Redis instance.</li><li id="dcs-faq-0730009__en-us_topic_0152099099_li924845512118">Add the following content to the XML configuration file of the Spring framework:<p id="dcs-faq-0730009__en-us_topic_0152099099_p2097611571110"><a name="dcs-faq-0730009__en-us_topic_0152099099_li924845512118"></a><a name="en-us_topic_0152099099_li924845512118"></a>&lt;util:constant</p>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p672110325">static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/&gt;</p>
</li><li id="dcs-faq-0730009__en-us_topic_0152099099_li182493557111">Modify the related Spring code. Enable the <strong id="dcs-faq-0730009__b3571493597">ConfigureRedisAction.NO_OP</strong> bean component to forbid a client to invoke the <strong id="dcs-faq-0730009__b195816965917">CONFIG</strong> command.<p id="dcs-faq-0730009__en-us_topic_0152099099_p161361613726">@Bean</p>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p1913611137218">public static ConfigureRedisAction configureRedisAction() {</p>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p4136121312218">return ConfigureRedisAction.NO_OP;</p>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p8136111317210">}</p>
</li><li id="dcs-faq-0730009__en-us_topic_0152099099_li182493557111">Modify the related Spring code. Enable the <strong id="dcs-faq-0730009__b3571493597">ConfigureRedisAction.NO_OP</strong> bean component to forbid a client to invoke the <strong id="dcs-faq-0730009__b195816965917">CONFIG</strong> command.<pre class="screen" id="dcs-faq-0730009__screen12275192515303">@Bean
public static ConfigureRedisAction configureRedisAction() {
return ConfigureRedisAction.NO_OP;
}</pre>
</li></ol>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p319234318111">For more information, see the <a href="https://docs.spring.io/spring-session/docs/current/api/" target="_blank" rel="noopener noreferrer">Spring Session Documentation</a>.</p>
<div class="notice" id="dcs-faq-0730009__en-us_topic_0152099099_note139026388342"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-faq-0730009__en-us_topic_0152099099_p990233883412">Session sharing is supported only by <strong id="dcs-faq-0730009__b1487021465913">single-node</strong> and <strong id="dcs-faq-0730009__b12870191425910">master/standby</strong> DCS Redis instances, but not by cluster DCS Redis instances.</p>
<div class="notice" id="dcs-faq-0730009__en-us_topic_0152099099_note139026388342"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-faq-0730009__en-us_topic_0152099099_p990233883412">Session sharing is supported by single-node, read/write splitting, and master/standby DCS Redis instances, but not by cluster DCS Redis instances.</p>
</div></div>
</div>
<div>

View File

@ -8,7 +8,7 @@
</li><li id="dcs-faq-0730010__en-us_topic_0152099099_li1017384662415">Check if the maximum bandwidth has been reached.<p id="dcs-faq-0730010__en-us_topic_0152099099_p1797526102510"><a name="dcs-faq-0730010__en-us_topic_0152099099_li1017384662415"></a><a name="en-us_topic_0152099099_li1017384662415"></a>If the bandwidth reaches the maximum bandwidth for the corresponding instance specifications, Redis connections may time out.</p>
</li><li id="dcs-faq-0730010__en-us_topic_0152099099_li1846772016228">For a DCS Redis 3.0 instance, check the inbound access rules of the security group.<p id="dcs-faq-0730010__en-us_topic_0152099099_p14645112182815"><a name="dcs-faq-0730010__en-us_topic_0152099099_li1846772016228"></a><a name="en-us_topic_0152099099_li1846772016228"></a>Intra-VPC access: If the Redis client and the Redis instance are bound with different security groups, allow inbound access over port 6379 for the security group of the instance.</p>
<p id="dcs-faq-0730010__p14803202620398">For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
</li><li id="dcs-faq-0730010__li2046822714264">For a DCS Redis 4.0/5.0/6.0 instance, check the whitelist configuration.<p id="dcs-faq-0730010__p86935385270"><a name="dcs-faq-0730010__li2046822714264"></a><a name="li2046822714264"></a>If the instance has a whitelist, ensure that the client IP address is included in the whitelist. Otherwise, the connection will fail.</p>
</li><li id="dcs-faq-0730010__li2046822714264">For a DCS Redis 4.0 or later instance, check the whitelist configuration.<p id="dcs-faq-0730010__p86935385270"><a name="dcs-faq-0730010__li2046822714264"></a><a name="li2046822714264"></a>If the instance has a whitelist, ensure that the client IP address is included in the whitelist. Otherwise, the connection will fail.</p>
<p id="dcs-faq-0730010__p1429974202718">For details, see <a href="dcs-ug-190812001.html">Managing IP Address Whitelist</a>.</p>
<p id="dcs-faq-0730010__p13299216102715">If the client IP address has changed, add the new IP address to the whitelist.</p>
</li><li id="dcs-faq-0730010__en-us_topic_0152099099_li10464192019419">Check the configuration parameter <strong id="dcs-faq-0730010__b13215165255914">notify-keyspace-events</strong>.<p id="dcs-faq-0730010__en-us_topic_0152099099_p66120341344">Set <strong id="dcs-faq-0730010__b1961115532594">notify-keyspace-events</strong> to <strong id="dcs-faq-0730010__b1761113531598">Egx</strong>.</p>

View File

@ -1,7 +1,7 @@
<a name="dcs-faq-0730014"></a><a name="dcs-faq-0730014"></a>
<h1 class="topictitle1">Why Aren't Security Groups Configured for DCS Redis 4.0/5.0/6.0 Instances?</h1>
<div id="body1596093268949"><p id="dcs-faq-0730014__en-us_topic_0152099097_p16123134244116">Currently, DCS Redis 4.0/5.0/6.0 instances use VPC endpoints and do not support security groups. You can configure whitelists instead. For details, see <a href="dcs-ug-190812001.html">Managing IP Address Whitelist</a>.</p>
<h1 class="topictitle1">Why Aren't Security Groups Configured for DCS Redis 4.0 and Later Instances?</h1>
<div id="body1596093268949"><p id="dcs-faq-0730014__en-us_topic_0152099097_p16123134244116">Currently, DCS Redis 4.0 and later instances use VPC endpoints and do not support security groups. You can configure whitelists instead. For details, see <a href="dcs-ug-190812001.html">Managing IP Address Whitelist</a>.</p>
<p id="dcs-faq-0730014__p167460299191">To allow access only from specific IP addresses to a DCS Redis instance, add the IP addresses to the instance whitelist.</p>
<p id="dcs-faq-0730014__p8907193444015">If no whitelists are added to the instance whitelist or the whitelist function is disabled, all IP addresses that can communicate with the VPC can access the instance.</p>
</div>

View File

@ -1,8 +1,8 @@
<a name="dcs-faq-0730021"></a><a name="dcs-faq-0730021"></a>
<h1 class="topictitle1">Does DCS for Redis Support Sentinel?</h1>
<div id="body1596093268950"><p id="dcs-faq-0730021__en-us_topic_0152099097_p047315232012">Cluster instances and master/standby DCS Redis 4.0 and later instances support Sentinels. Sentinels monitor the running status of both the master and standby nodes of a master/standby instance and each shard of a cluster instance. If the master node becomes faulty, a failover will be performed.</p>
<p id="dcs-faq-0730021__en-us_topic_0152099097_p74691819125910">DCS for Redis 3.0 does not support Redis Sentinel. Instead, it uses keepalive to monitor master and replica nodes and to manage failovers.</p>
<div id="body1596093268950"><p id="dcs-faq-0730021__en-us_topic_0152099097_p047315232012">Master/Standby, read/write splitting, and cluster DCS Redis 4.0 and later instances support Sentinels (Each shard of a cluster is a master/standby instance.). Sentinels monitor the running status of both the master and standby nodes of a master/standby instance and each shard of a cluster instance. If the master node becomes faulty, a failover will be performed.</p>
<p id="dcs-faq-0730021__en-us_topic_0152099097_p74691819125910">DCS Redis 3.0 does not support Sentinels.</p>
</div>
<div>
<div class="familylinks">

View File

@ -6,6 +6,13 @@
</li><li id="dcs-faq-0730026__en-us_topic_0152099097_li1188105085912">Redis 4.0 and later<p id="dcs-faq-0730026__en-us_topic_0152099097_p12318114516310"><a name="dcs-faq-0730026__en-us_topic_0152099097_li1188105085912"></a><a name="en-us_topic_0152099097_li1188105085912"></a>You can specify a port (ranging from 1 to 65535) or use the default port (6379) for accessing an instance. If no port is specified, the default port will be used.</p>
</li></ul>
<p id="dcs-faq-0730026__p14803202620398">If the instance and the client use different security groups, you must configure access rules for the security groups, allowing access through the specified port. For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
<div class="section" id="dcs-faq-0730026__section1437115203556"><h4 class="sectiontitle">Customizing a Port</h4><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p1273833961320">When creating a DCS Redis 4.0, 5.0, or 6.0 instance, you can enter a port number for <strong id="dcs-faq-0730026__en-us_topic_0000001152024128_b112918395463">IP Address</strong>. If you do not specify a port, the default port 6379 is used.</p>
</div>
<div class="section" id="dcs-faq-0730026__section11705172516555"><h4 class="sectiontitle">Changing the Port</h4><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p1328334019314">After a DCS Redis 4.0 or later instance is created, you can change its port.</p>
<ol id="dcs-faq-0730026__en-us_topic_0000001152024128_ol1265264643120"><li id="dcs-faq-0730026__en-us_topic_0000001152024128_li4813522103211">In the navigation pane of the DCS console, choose <strong id="dcs-faq-0730026__b1663581420218">Cache Manager</strong>.</li><li id="dcs-faq-0730026__en-us_topic_0000001152024128_li1265284614313">Click a DCS Redis instance.</li><li id="dcs-faq-0730026__en-us_topic_0000001152024128_li913104903219">In the <strong id="dcs-faq-0730026__b1595161919219">Connection</strong> area, click <span><img id="dcs-faq-0730026__en-us_topic_0000001152024128_image2519832134711" src="en-us_image_0000001785451408.png"></span> next to <strong id="dcs-faq-0730026__b0595619142116">Connection Address</strong>.<div class="notice" id="dcs-faq-0730026__en-us_topic_0000001152024128_note1314191813279"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p01422018172717">After the port is changed, all connections to the Redis instance are interrupted, and services are connected to the new port.</p>
</div></div>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">

View File

@ -1,7 +1,7 @@
<a name="dcs-faq-0730029"></a><a name="dcs-faq-0730029"></a>
<h1 class="topictitle1">Does DCS Support Cross-AZ Deployment?</h1>
<div id="body1596093268950"><p id="dcs-faq-0730029__p15277568910">Master/Standby and cluster DCS Redis instances can be deployed across availability zones (AZs).</p>
<div id="body1596093268950"><p id="dcs-faq-0730029__p15277568910">Master/Standby, read/write splitting, and cluster DCS Redis instances can be deployed across availability zones (AZs).</p>
<ul id="dcs-faq-0730029__en-us_topic_0152099097_ul1253034413517"><li id="dcs-faq-0730029__en-us_topic_0152099097_li35311444514">If instance nodes in an AZ are faulty, nodes in other AZs will not be affected. The standby node automatically becomes the master node to continue to operate, ensuring disaster recovery (DR).</li><li id="dcs-faq-0730029__en-us_topic_0152099097_li7539944115110">Cross-AZ deployment does not compromise the speed of data synchronization between the master and standby nodes.</li></ul>
</div>
<div>

View File

@ -2,7 +2,7 @@
<h1 class="topictitle1">Can I Recover Data from Deleted DCS Instances?</h1>
<div id="body1596093268951"><p id="dcs-faq-0730034__en-us_topic_0152099097_p1631651782618">If a DCS instance is automatically deleted or manually deleted through the Redis client, its data cannot be retrieved. If you have backed up the instance, you can restore its data from the backup. However, the restoration will overwrite the data written in during the period from the backup and the restoration.</p>
<p id="dcs-faq-0730034__p3823245101117">You can restore backup data to a master/standby cluster, or instance through <strong id="dcs-faq-0730034__b119161431502">Backups &amp; Restorations</strong> on the DCS console. For details, see <a href="dcs-ug-0312033.html">Restoring a DCS Instance</a>.</p>
<p id="dcs-faq-0730034__p3823245101117">You can restore backup data to an instance other than a single-node one through <strong id="dcs-faq-0730034__b119161431502">Backups &amp; Restorations</strong> on the DCS console. For details, see <a href="dcs-ug-0312033.html">Restoring a DCS Instance</a>.</p>
<p id="dcs-faq-0730034__en-us_topic_0152099097_p16241771816"></p>
<p id="dcs-faq-0730034__p1195017431792">If a DCS instance is deleted, the instance data and its backup will also be deleted. Before deleting an instance, you can download the backup files of the instance for permanent local storage and can also migrate them to a new instance if you need to restore the data. For details about how to download the backup data, see <a href="dcs-ug-0312034.html">Downloading a Backup File</a></p>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<h1 class="topictitle1">When Does a Master/Standby Switchover Occur?</h1>
<div id="body1596093777162"><p id="dcs-faq-0730058__en-us_topic_0209664638_p1273026135619">A master/standby switchover may occur in the following scenarios:</p>
<ul id="dcs-faq-0730058__en-us_topic_0209664638_ul13825740165612"><li id="dcs-faq-0730058__en-us_topic_0209664638_li1182614407563">A master/standby switchover operation is initiated on the DCS Console.</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li68263401567">If the master node of a master/standby instance fails, a master/standby switchover will be triggered.<p id="dcs-faq-0730058__en-us_topic_0209664638_p1493444911524"><a name="dcs-faq-0730058__en-us_topic_0209664638_li68263401567"></a><a name="en-us_topic_0209664638_li68263401567"></a>For example, running commands that consume a lot of resources, such as <strong id="dcs-faq-0730058__b61671835105">KEYS</strong> commands, will cause CPU usage to spike and as result triggers a master/standby switchover.</p>
</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li108263402566">If you restart a master/standby instance on the DCS console, a master/standby switchover will be triggered.</li><li id="dcs-faq-0730058__li117061731711">If you scale up a single-node or master/standby instance, a master/standby switchover will be triggered.<p id="dcs-faq-0730058__p1761969151711"><a name="dcs-faq-0730058__li117061731711"></a><a name="li117061731711"></a>During scale-up, a new standby node with the new specifications is created. After full and incremental data on the master node is synchronized to the standby node, a master/standby switchover is performed and the original node is deleted.</p>
</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li108263402566">If you restart a master/standby instance on the DCS console, a master/standby switchover will be triggered.</li><li id="dcs-faq-0730058__li117061731711">If you scale up a single-node, read/write splitting, or master/standby instance, a master/standby switchover will be triggered.<p id="dcs-faq-0730058__p1761969151711"><a name="dcs-faq-0730058__li117061731711"></a><a name="li117061731711"></a>During scale-up, a new standby node with the new specifications is created. After full and incremental data on the master node is synchronized to the standby node, a master/standby switchover is performed and the original node is deleted.</p>
</li></ul>
<p id="dcs-faq-0730058__en-us_topic_0209664638_p151011145582">After a master/standby switchover occurs, you will receive a notification. Check whether the client services are running properly. If not, check whether the TCP connection is normal and whether it can be re-established after the master/standby switchover to restore the services.</p>
</div>

View File

@ -1,7 +1,7 @@
<a name="dcs-faq-210721001"></a><a name="dcs-faq-210721001"></a>
<h1 class="topictitle1">How Do I Enable the SYNC and PSYNC Commands?</h1>
<div id="body8662426"><ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul1666918584815"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li1466916586812">Migration within DCS:<ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul1472135412128"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li69200418467">By default, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b127652727655526">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b19178583755526">PSYNC</strong> commands can be used when self-hosted Redis is migrated to DCS.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li14623145012123">During online migration between DCS Redis instances in the same region under the same account, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b167198299220">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b772013299226">PSYNC</strong> commands are automatically enabled.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li20191657171219">During online migration between DCS Redis instances in different regions or under different accounts within a region, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b165486245055526">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b90855318855526">PSYNC</strong> commands are not automatically enabled, and online migration cannot be used. You can migrate data using backup files.</li></ul>
<div id="body8662426"><ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul1666918584815"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li1466916586812">Migration within DCS:<ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul1472135412128"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li8142121643119">If the online migration task uses the same account and region as the source instance, select a DCS instance (cloud Redis) as the source. The <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b689193418475">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b15660133616479">PSYNC</strong> commands will be automatically allowed on the source instance.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li20191657171219">If the online migration task uses a different account or in a different region from the source instance, the source instance cannot be a DCS instance (cloud Redis) and the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b816484618474">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b216444613478">PSYNC</strong> commands are disabled on the source instance. In this case, online migration on the console is unavailable. You can migrate data using backup import.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li117351712193017">By default, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b1951313425614">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b1151313475612">PSYNC</strong> commands can be used when self-hosted Redis is migrated to DCS.</li></ul>
</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li103531442997">Migration from other cloud vendors to DCS:<ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul54348203145"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li14143216171411">Generally, cloud vendors disable the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b10319177112310">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b532057162317">PSYNC</strong> commands. If you want to use the online migration function on the DCS console, contact the O&amp;M personnel of the source cloud vendor to enable the commands. For offline migration, you can import backup files.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li2506152321415">If incremental migration is not required, you can perform full migration by referring to <a href="dcs-migrate-0220411.html">Online Full Migration of Redis from Another Cloud with redis-shake</a>. This method does not depend on <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b16910144613214">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b4911346132114">PSYNC</strong>.</li></ul>
</li></ul>
</div>

View File

@ -1,13 +0,0 @@
<a name="dcs-faq-210721002"></a><a name="dcs-faq-210721002"></a>
<h1 class="topictitle1">Why Does Migration Task Creation Fail?</h1>
<div id="body8662426"><p id="dcs-faq-210721002__en-us_topic_0000001198023687_p7789185510414">Possible causes:</p>
<ol id="dcs-faq-210721002__en-us_topic_0000001198023687_ol28091255164112"><li id="dcs-faq-210721002__en-us_topic_0000001198023687_li780995518416">The underlying resources are insufficient.</li><li id="dcs-faq-210721002__en-us_topic_0000001198023687_li980945524114">The specifications of the ECS used for the migration are insufficient.</li><li id="dcs-faq-210721002__en-us_topic_0000001198023687_li1580985574119">The memory of the target Redis created before the migration is less than that of the source Redis.</li></ol>
<p id="dcs-faq-210721002__en-us_topic_0000001198023687_p4794458134810">In such cases, contact technical support.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326024.html">Data Backup, Export, and Migration</a></div>
</div>
</div>

View File

@ -30,7 +30,7 @@
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p1468117261724">Maximum number of idle connections</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p122427181866">Set this parameter to the value of <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b869519610315">maxTotal</strong>.</p>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p122427181866">Use the same configuration as <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b643310615302">maxTotal</strong>.</p>
</td>
</tr>
<tr id="dcs-faq-211230001__en-us_topic_0000001239245837_row1584272310599"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p8933419409">minIdle</p>
@ -45,14 +45,14 @@
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p17894533524">Maximum waiting time for obtaining a connection, in milliseconds</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p25395103714">The recommended maximum waiting time for obtaining a connection from the connection pool is the maximum tolerable timeout of a single service minus the timeout for command execution. For example, if the maximum tolerable HTTP timeout is 15s and the timeout of Redis requests is 10s, set this parameter to 5s.</p>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p25395103714">The recommended maximum waiting time for obtaining a connection from the connection pool is the maximum tolerable timeout of a single service minus the timeout for command execution. For example, if the maximum tolerable HTTP failure is 15s and the timeout of Redis requests is 10s, set this parameter to 5s.</p>
</td>
</tr>
<tr id="dcs-faq-211230001__en-us_topic_0000001239245837_row384202316597"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p19702736502">timeout</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p196888421226">Command execution timeout, in milliseconds</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p17281229170">This parameter indicates the maximum timeout for running a Redis command. Set this parameter based on the service logic. Generally, you are advised to set this timeout to longer than 210 ms to ensure network fault tolerance. For special detection logic or environment exception detection, you can adjust this timeout to seconds.</p>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p17281229170">This parameter indicates the maximum timeout for running a Redis command. Set this parameter based on the service logic. You are advised to set this timeout to least 210 ms to ensure network fault tolerance. For special detection logic or environment exception detection, you can adjust this timeout to seconds.</p>
</td>
</tr>
<tr id="dcs-faq-211230001__en-us_topic_0000001239245837_row118426236590"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p17702036801">minEvictableIdleTimeMillis</p>
@ -73,7 +73,7 @@
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p484382315595">Indicates whether to check the connection validity using the <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b177701137120">ping</strong> command when borrowing connections from the resource pool. Invalid connections will be removed.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p1934211121883">If your service is extremely sensitive to connections and the performance is acceptable, you can set this parameter to <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b286415515319">True</strong>. Generally, you are advised to set this parameter to <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b94794018416">False</strong> to enable idle connection detection.</p>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p1934211121883">If your service is extremely sensitive to connections and the performance is acceptable, you can set this parameter to <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b286415515319">True</strong>. Generally, you are advised to set this parameter to <strong id="dcs-faq-211230001__en-us_topic_0000001239245837_b94794018416">False</strong> to disable idle connection detection.</p>
</td>
</tr>
<tr id="dcs-faq-211230001__en-us_topic_0000001239245837_row17843823105914"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dcs-faq-211230001__en-us_topic_0000001239245837_p13702103616013">testWhileIdle</p>

View File

@ -1,8 +1,8 @@
<a name="dcs-faq-221222"></a><a name="dcs-faq-221222"></a>
<h1 class="topictitle1">Is the Read-only Address of a Master/Standby Instance Connected to the Master or Standby Node?</h1>
<div id="body8662426"><p id="dcs-faq-221222__en-us_topic_0000001431664584_p8060118">A master/standby DCS Redis 4.0/5.0/6.0 instance has a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b8927124911157">Connection Address</strong> and a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b1927124921519">Read-only Address</strong>. The connection address is used to connect to the master node of the instance, and the read-only address is used to connect to the standby node of the instance.</p>
<p id="dcs-faq-221222__en-us_topic_0000001431664584_p99251850144516">For details, see <a href="CacheMasterSlave.html#CacheMasterSlave__section5805185095215">Architecture of Master/Standby DCS Redis 4.0/5.0/6.0 Instances</a>.</p>
<div id="body8662426"><p id="dcs-faq-221222__en-us_topic_0000001431664584_p8060118">A master/standby DCS Redis 4.0 or later instance has a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b148059329615">Connection Address</strong> and a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b1180533218611">Read-only Address</strong>. The connection address is used to connect to the master node of the instance, and the read-only address is used to connect to the standby node of the instance.</p>
<p id="dcs-faq-221222__en-us_topic_0000001431664584_p99251850144516">For details, see <a href="CacheMasterSlave.html#CacheMasterSlave__section5805185095215">Architecture of Master/Standby DCS Redis Instances</a>.</p>
<div class="fignone" id="dcs-faq-221222__en-us_topic_0000001431664584_fig1636541875315"><span class="figcap"><b>Figure 1 </b>Instance addresses</span><br><span><img id="dcs-faq-221222__en-us_topic_0000001431664584_image336621810537" src="en-us_image_0000001431665772.png"></span></div>
<p id="dcs-faq-221222__en-us_topic_0000001431664584_p4769144185313">By default, the client reads and writes data on the master node. Data is synchronized to the standby node. To implement read/write splitting, ensure that your client can distinguish between read and write requests. The client directs write requests to the read/write domain name and read requests to the read-only domain name.</p>
</div>

View File

@ -1,10 +1,13 @@
<a name="dcs-migrate-0220411"></a><a name="dcs-migrate-0220411"></a>
<h1 class="topictitle1">Online Full Migration of Redis from Another Cloud with redis-shake</h1>
<div id="body0000001252915134"><p id="dcs-migrate-0220411__p5787143145417">redis-shake is an open-source Redis migration tool. Its <strong id="dcs-migrate-0220411__b723122553519">rump</strong> mode allows you to obtain the full data of a source Redis using the <strong id="dcs-migrate-0220411__b1721910153613">SCAN</strong> command and write the data to a target Redis. This migration solution does not involve the <strong id="dcs-migrate-0220411__b7902752123611">SYNC</strong> or <strong id="dcs-migrate-0220411__b11730115443612">PSYNC</strong> command and can be widely used for migration between self-built Redis and cloud Redis.</p>
<p id="dcs-migrate-0220411__p1197516426595">This section describes how to use the <strong id="dcs-migrate-0220411__b14142161645314">rump</strong> mode of redis-shake to migrate the full Redis data of another cloud service vendor at a time online to DCS.</p>
<h1 class="topictitle1">Migrating from Another Cloud Online Using redis-shake</h1>
<div id="body0000001252915134"><p id="dcs-migrate-0220411__p5787143145417">redis-shake is an open-source Redis migration tool. Its <strong id="dcs-migrate-0220411__b0794181720311">rump</strong> mode allows you to obtain the full data of a source Redis using the <strong id="dcs-migrate-0220411__b4794917338">SCAN</strong> command and write the data to a target Redis. This migration solution does not involve the <strong id="dcs-migrate-0220411__b67946171732">SYNC</strong> or <strong id="dcs-migrate-0220411__b18794171711311">PSYNC</strong> command and can be widely used for migration between self-built Redis and cloud Redis.</p>
<p id="dcs-migrate-0220411__p1197516426595">This section describes how to use the <strong id="dcs-migrate-0220411__b3995182210311">rump</strong> mode of redis-shake to migrate the full Redis data of another cloud service vendor at a time online to DCS.</p>
<div class="fignone" id="dcs-migrate-0220411__fig413301355"><span class="figcap"><b>Figure 1 </b>Data flow in this solution</span><br><span><img class="eddx" id="dcs-migrate-0220411__image141318018356" src="en-us_image_0000001252755478.png"></span></div>
<div class="section" id="dcs-migrate-0220411__section175461313181014"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-0220411__ul173951945161011"><li id="dcs-migrate-0220411__li670798205113">A <a href="dcs-ug-0312003.html">DCS Redis instance</a> has been created on the target cloud.</li><li id="dcs-migrate-0220411__li1707885513">An ECS has been created on the target cloud for running redis-shake.</li><li id="dcs-migrate-0220411__li853633720249">The ECS is in the same VPC as the DCS Redis instance and bound with an EIP.</li><li id="dcs-migrate-0220411__li7896125614717">The <strong id="dcs-migrate-0220411__b1797812714015">rump</strong> mode does not support incremental data migration. To keep data consistency, stop writing data to the source Redis before migration.</li><li id="dcs-migrate-0220411__li33921654778">This solution applies only to same-database mapping and does not apply to inter-database mapping.</li><li id="dcs-migrate-0220411__li1840043412101">If the source Redis has multiple databases (there are databases other than DB0), and your DCS instance is a cluster, this solution cannot be used. (Cluster DCS instances support only DB0.)</li></ul>
<p id="dcs-migrate-0220411__p1784717248411"></p>
<div class="section" id="dcs-migrate-0220411__section4545827559"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migrate-0220411__ul1042312424515"><li id="dcs-migrate-0220411__li19895144315514">The <strong id="dcs-migrate-0220411__b19813202549">rump</strong> mode does not support incremental data migration. To keep data consistency, stop writing data to the source Redis before migration.</li><li id="dcs-migrate-0220411__li1589574316515">This solution applies only to same-database mapping and does not apply to inter-database mapping.</li><li id="dcs-migrate-0220411__li9895443154">If the source Redis has multiple databases (there are databases other than DB0), and your DCS instance is a cluster, this solution cannot be used. (Cluster DCS instances support only DB0.)</li><li id="dcs-migrate-0220411__li921571317245">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
</div>
<div class="section" id="dcs-migrate-0220411__section175461313181014"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-0220411__ul173951945161011"><li id="dcs-migrate-0220411__li670798205113">A <a href="dcs-ug-0312003.html">DCS Redis instance</a> has been created.</li><li id="dcs-migrate-0220411__li1707885513">An ECS has been created for running redis-shake. The ECS must use the same VPC as the Redis instance, and be bound to EIPs.</li></ul>
</div>
<div class="section" id="dcs-migrate-0220411__section4705105323111"><h4 class="sectiontitle">Procedure</h4><ol id="dcs-migrate-0220411__ol205640192327"><li id="dcs-migrate-0220411__li13849164817164"><span>Install Nginx on the ECS and the source forwarding server. The following describes how to install Nginx on an ECS running CentOS 7.x. The commands vary depending on the OS.</span><p><ol type="a" id="dcs-migrate-0220411__ol119934157811"><li id="dcs-migrate-0220411__li1157785919418">Add Nginx to the Yum repository.<pre class="screen" id="dcs-migrate-0220411__screen1772818581207">sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm</pre>
</li><li id="dcs-migrate-0220411__li144619714412">Check whether Nginx has been added successfully.<pre class="screen" id="dcs-migrate-0220411__screen057611169213">yum search nginx</pre>
@ -33,8 +36,8 @@ vi nginx.conf</pre>
<p id="dcs-migrate-0220411__p593853532713">If the port is being listened, Nginx has been started successfully.</p>
<div class="fignone" id="dcs-migrate-0220411__fig15433124613489"><span class="figcap"><b>Figure 3 </b>Verification result</span><br><span><img id="dcs-migrate-0220411__image1243324614819" src="en-us_image_0000001299513869.png"></span></div>
</li></ol>
</p></li><li id="dcs-migrate-0220411__li107681114289"><span>Configure Nginx forwarding for the ECS.</span><p><ol type="a" id="dcs-migrate-0220411__ol1151616220369"><li id="dcs-migrate-0220411__li10516172263616">Log in to the Linux ECS and run the following commands to open and modify the configuration file:<p id="dcs-migrate-0220411__p10914155310204"><a name="dcs-migrate-0220411__li10516172263616"></a><a name="li10516172263616"></a><strong id="dcs-migrate-0220411__b1635831183610">cd /etc/nginx</strong></p>
<p id="dcs-migrate-0220411__p951915610209"><strong id="dcs-migrate-0220411__b156351631173618">vi nginx.conf</strong></p>
</p></li><li id="dcs-migrate-0220411__li107681114289"><span>Configure Nginx forwarding for the ECS.</span><p><ol type="a" id="dcs-migrate-0220411__ol1151616220369"><li id="dcs-migrate-0220411__li10516172263616">Log in to the Linux ECS and run the following commands to open and modify the configuration file:<pre class="screen" id="dcs-migrate-0220411__screen3530192115614">cd /etc/nginx
vi nginx.conf</pre>
</li><li id="dcs-migrate-0220411__li28611116103716">Configuration example:<pre class="screen" id="dcs-migrate-0220411__screen1418219241098">stream {
server {
listen 6666;
@ -53,7 +56,7 @@ vi nginx.conf</pre>
</p></li><li id="dcs-migrate-0220411__li1629316143413"><span>Run the following command on the ECS to test the network connection of port 6666:</span><p><pre class="screen" id="dcs-migrate-0220411__screen9189230121519">redis-cli -h {target_ecs_address} -p 6666 -a {password}</pre>
<p id="dcs-migrate-0220411__p16330112132510"><em id="dcs-migrate-0220411__i132590214215">{target_ecs_address}</em> is the EIP of the ECS, <strong id="dcs-migrate-0220411__b1927283314218">6666</strong> is the listening port of the ECS, and <em id="dcs-migrate-0220411__i254115492111">{password}</em> is the source Redis password. If there is no password, leave it blank.</p>
<div class="fignone" id="dcs-migrate-0220411__fig1168715172413"><span class="figcap"><b>Figure 6 </b>Connection example</span><br><span><img id="dcs-migrate-0220411__image446672703311" src="en-us_image_0000001252915210.png"></span></div>
</p></li><li id="dcs-migrate-0220411__li13564181913214"><span>Prepare the migration tool redis-shake.</span><p><ol type="a" id="dcs-migrate-0220411__ol0483154263117"><li id="dcs-migrate-0220411__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-0220411__li15905189153217">Download redis-shake. Version 2.0.3 is used as an example. You can use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-0220411__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz</pre>
</p></li><li id="dcs-migrate-0220411__li13564181913214"><span>Prepare the migration tool redis-shake.</span><p><ol type="a" id="dcs-migrate-0220411__ol0483154263117"><li id="dcs-migrate-0220411__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-0220411__li15905189153217">Download redis-shake on the ECS. Version 2.0.3 is used as an example. You can use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-0220411__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz</pre>
</li><li id="dcs-migrate-0220411__li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-0220411__screen65481045101912">tar -xvf redis-shake-v2.0.3.tar.gz</pre>
</li></ol>
</p></li><li id="dcs-migrate-0220411__li188959963517"><span>Configure the redis-shake configuration file.</span><p><ol type="a" id="dcs-migrate-0220411__ol1210514325499"><li id="dcs-migrate-0220411__li1311918125196">Go to the directory generated after the decompression.<pre class="screen" id="dcs-migrate-0220411__screen383515448361">cd redis-shake-v2.0.3</pre>
@ -79,7 +82,7 @@ vi nginx.conf</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migrating Redis Data from Another Cloud to DCS</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migration from Another Cloud</a></div>
</div>
</div>

View File

@ -1,53 +1,44 @@
<a name="dcs-migrate-1117003"></a><a name="dcs-migrate-1117003"></a>
<h1 class="topictitle1">Offline Migration of Redis Cluster from Another Cloud with redis-shake</h1>
<h1 class="topictitle1">Backup Import from Another Cloud Using redis-shake</h1>
<div id="body1605698129613"><p id="dcs-migrate-1117003__p783020494275">redis-shake is an open-source tool for migrating data online or offline (by importing backup files) between Redis Clusters. If the source Redis Cluster is deployed in another cloud, and online migration is not supported, you can migrate data by importing backup files.</p>
<p id="dcs-migrate-1117003__p4375394487">If the source Redis and the target Redis cannot be connected, or the source Redis is deployed on other clouds, you can migrate data by importing backup files.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1814154103513">The following describes how to use redis-shake for backup migration to a DCS Redis Cluster instance.</p>
<div class="section" id="dcs-migrate-1117003__dcs-migrate-demo02_section2230197183316"><h4 class="sectiontitle">Importing Backup Files</h4><p id="dcs-migrate-1117003__dcs-migrate-demo02_p1897312853312">If the source Redis and the destitution Redis cannot be connected, or the source Redis is deployed on other clouds, you can migrate data by importing backup files.</p>
<ol id="dcs-migrate-1117003__dcs-migrate-demo02_ol082075784215"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li18820145718421">Create a Redis Cluster instance on the DCS console.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p17820457194216"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li18820145718421"></a><a name="dcs-migrate-demo02_li18820145718421"></a>The memory of this instance cannot be smaller than that of the source Redis.</p>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119">Run the following command to obtain the IP addresses and port numbers of all masters of the source Redis and target Redis:<p id="dcs-migrate-1117003__dcs-migrate-demo02_p522517529213"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119"></a><a name="dcs-migrate-demo02_li104985015119"></a><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b15225175214219">redis-cli -h <em id="dcs-migrate-1117003__dcs-migrate-demo02_i1422585211213">{redis_address}</em> -p <em id="dcs-migrate-1117003__dcs-migrate-demo02_i1722525219212">{redis_port}</em> -a <em id="dcs-migrate-1117003__dcs-migrate-demo02_i1022516521523">{redis_password}</em> cluster nodes</strong></p>
<div class="section" id="dcs-migrate-1117003__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migrate-1117003__dcs-migrate-demo03_dcs-migration-0312010_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
</div>
<div class="section" id="dcs-migrate-1117003__section175461313181014"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-1117003__ul173951945161011"><li id="dcs-migrate-1117003__li670798205113">A <a href="dcs-ug-0312003.html">DCS Redis instance</a> has been created. Note that the memory of the DCS Redis Cluster instance cannot be smaller than that of the source cluster.</li><li id="dcs-migrate-1117003__li1707885513">An ECS has been created for running redis-shake. The ECS must use the same VPC, subnet, and security group as the Redis instance.</li></ul>
</div>
<div class="section" id="dcs-migrate-1117003__dcs-migrate-demo02_section2230197183316"><h4 class="sectiontitle">Procedure</h4><ol id="dcs-migrate-1117003__dcs-migrate-demo02_ol082075784215"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119">Access the target Redis instance using <a href="dcs-ug-0326009.html">redis-cli</a>. Obtain the IP address and port of the master node of the target instance.<pre class="screen" id="dcs-migrate-1117003__screen37731629115010">redis-cli -h {target_redis_address} -p {target_redis_port} -a {target_redis_password} cluster nodes</pre>
<ul id="dcs-migrate-1117003__ul2057651023615"><li id="dcs-migrate-1117003__li1057631073615"><em id="dcs-migrate-1117003__i417715011301">{target_redis_address}</em>: connection address of the target DCS Redis instance.</li><li id="dcs-migrate-1117003__li11692143833618"><em id="dcs-migrate-1117003__i1874445714305">{target_redis_port}</em>: port of the target DCS Redis instance.</li><li id="dcs-migrate-1117003__li11364957133613"><em id="dcs-migrate-1117003__i348901593114">{target_redis_password}</em>: password for connecting to the target DCS Redis instance.</li></ul>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p6225352528">In the command output similar to the following, obtain the IP addresses and ports of all masters.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1222510522212"><span><img id="dcs-migrate-1117003__dcs-migrate-demo02_image122251352628" src="en-us_image_0293282053.png"></span></p>
<div class="note" id="dcs-migrate-1117003__dcs-migrate-demo02_note222585210212"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-1117003__dcs-migrate-demo02_p5225252728">After Redis is installed, it runs with redis-cli. To install Redis on CentOS, run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b44671243078">yum install redis</strong> command.</p>
</li><li id="dcs-migrate-1117003__li13564181913214">Install redis-shake on the prepared ECS.<ol type="a" id="dcs-migrate-1117003__ol0483154263117"><li id="dcs-migrate-1117003__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-1117003__li15905189153217">Download redis-shake on the ECS. Version 2.0.3 is used as an example. You can use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-1117003__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz</pre>
</li><li id="dcs-migrate-1117003__li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-1117003__screen65481045101912">tar -xvf redis-shake-v2.0.3.tar.gz</pre>
</li></ol>
<div class="note" id="dcs-migrate-1117003__dcs-migrate-demo02_note1279444614610"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-1117003__dcs-migrate-demo02_p979434611610">If the source Redis is deployed in the data center intranet, install redis-shake on the intranet server. Export data and then upload the data to the cloud server as instructed by the following steps.</p>
</div></div>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li18820857174214">Prepare a cloud server and install redis-shake.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1682145784219"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li18820857174214"></a><a name="dcs-migrate-demo02_li18820857174214"></a>redis-shake must be able to access the target Redis and bound to an EIP.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1082175714429">You can use ECS and configure the same VPC, subnet, and security group for the ECS and the DCS instance.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p88217579422"><a href="https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz" target="_blank" rel="noopener noreferrer">Download</a> and decompress the release version of redis-shake. (The following uses v2.1.2 as an example. You can also use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a>.)</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p15821257194213"><span><img id="dcs-migrate-1117003__dcs-migrate-demo02_image1782145704210" src="en-us_image_0293282054.png"></span></p>
<div class="note" id="dcs-migrate-1117003__dcs-migrate-demo02_note1279444614610"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-1117003__dcs-migrate-demo02_p979434611610">If the source Redis is deployed in the data center intranet, install redis-shake on the intranet server. Export data and then upload the data to the cloud server as instructed by the following steps</p>
</div></div>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li31771323165319">Export the RDB file.<ul id="dcs-migrate-1117003__dcs-migrate-demo02_ul181391212136"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li5813141221318">Edit the <strong id="dcs-migrate-1117003__b197048921212">redis-shake.conf</strong> file by providing the following information about all the masters of both the source and the target:<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen1248155110107">source.type = cluster
# If there is no password, skip the following parameter.
source.password_raw = {source_redis_password}
# IP addresses and port numbers of all masters of the source Redis Cluster, which are separated by semicolons (;).
source.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}…{masterN_ip}:{masterN_port}</pre>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li8813201217136">Run the following command to export the RDB file:<p id="dcs-migrate-1117003__dcs-migrate-demo02_p331212346137"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li8813201217136"></a><a name="dcs-migrate-demo02_li8813201217136"></a><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b1931273412131">./redis-shake -type dump -conf redis-shake.conf</strong></p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p0312193411319">If the following information is displayed in the execution log, the backup file is exported successfully:</p>
<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen5845144815132">execute runner[*run.CmdDump] finished!</pre>
<div class="note" id="dcs-migrate-1117003__note123524443215"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-1117003__p14352184452118">If you cannot export the source Redis backup files using this method due to cloud vendors' restrictions on the <strong id="dcs-migrate-1117003__b159737194296">SYNC</strong> and <strong id="dcs-migrate-1117003__b1864462218292">PSYNC</strong> commands, export the files on the source console or contact the source technical support.</p>
</div></div>
</li></ul>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li2088910245149">Import the RDB file.<ol type="a" id="dcs-migrate-1117003__dcs-migrate-demo02_ol2327112018216"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li6327192011215">Import the RDB file (or files) to the cloud server. The cloud server must be connected to the target DCS instance.</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li832782018219">Edit the redis-shake configuration file.<div class="p" id="dcs-migrate-1117003__dcs-migrate-demo02_p1825892672116"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li832782018219"></a><a name="dcs-migrate-demo02_li832782018219"></a>Edit the <strong id="dcs-migrate-1117003__b19204181619121">redis-shake.conf</strong> file by providing the following information about all the masters of both the source and the target:<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen1882155716429">target.type = cluster
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li31771323165319">Export the RDB file from the source Redis console. If the RDB file cannot be exported, contact customer service of the source.</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li2088910245149">Import the RDB file.<ol type="a" id="dcs-migrate-1117003__dcs-migrate-demo02_ol2327112018216"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li6327192011215">Import the RDB file (or files) to the cloud server. The cloud server must be connected to the target DCS instance.</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li832782018219">Edit the redis-shake configuration file <strong id="dcs-migrate-1117003__b197112413318">redis-shake.conf</strong>.<pre class="screen" id="dcs-migrate-1117003__screen162871920114818">vim redis-shake.conf</pre>
<div class="p" id="dcs-migrate-1117003__dcs-migrate-demo02_p1825892672116">Add the following information about all the masters of the target:<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen1882155716429">target.type = cluster
# If there is no password, skip the following parameter.
target.password_raw = {target_redis_password}
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
target.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}{masterN_ip}:{masterN_port}
target.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}...{masterN_ip}:{masterN_port}
# List the RDB files to be imported, separated by semicolons (;).
rdb.input = {local_dump.0};{local_dump.1};{local_dump.2};{local_dump.3}</pre>
</div>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p2840103122112">Save and exit.</p>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1132710201214">Run the following command to import the RDB file to the target instance:<p id="dcs-migrate-1117003__dcs-migrate-demo02_p592783512112"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li1132710201214"></a><a name="dcs-migrate-demo02_li1132710201214"></a><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b89111406213">./redis-shake -type restore -conf redis-shake.conf</strong></p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p2840103122112">Press <strong id="dcs-migrate-1117003__b15410152310348">Esc</strong> to exit the editing mode and enter <strong id="dcs-migrate-1117003__b12411192311340">:wq!</strong>. Press <strong id="dcs-migrate-1117003__b104111223133417">Enter</strong> to save the configuration and exit the editing interface.</p>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1132710201214">Run the following command to import the RDB file to the target instance:<pre class="screen" id="dcs-migrate-1117003__screen5901225105614">./redis-shake -type restore -conf redis-shake.conf</pre>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p123611640122113">If the following information is displayed in the execution log, the backup file is imported successfully:</p>
<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen152647172316">Enabled http stats, set status (incr), and wait forever.</pre>
</li></ol>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216">Verify the migration.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1682214570429"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216"></a><a name="dcs-migrate-demo02_li1382275724216"></a>After data synchronization, access the DCS Redis Cluster instance using redis-cli. Run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b05331233101217">info</strong> command to query the number of keys in the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b0427123710120">Keyspace</strong> section to confirm that data has been fully imported.</p>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216">Verify the migration.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1682214570429"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216"></a><a name="dcs-migrate-demo02_li1382275724216"></a>After data synchronization, access the target Redis Cluster DCS instance using redis-cli. Run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b05331233101217">info</strong> command to query the number of keys in the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b0427123710120">Keyspace</strong> section to confirm that data has been fully imported.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p0822357184215">If the data has not been fully imported, run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b1185520418128">flushall</strong> or <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b1585610471215">flushdb</strong> command to clear the cached data in the instance, and synchronize data again.</p>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migrating Redis Data from Another Cloud to DCS</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migration from Another Cloud</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
<a name="dcs-migrate-demo03"></a><a name="dcs-migrate-demo03"></a>
<h1 class="topictitle1">Self-Hosted Redis Cluster Migration with redis-shake (RDB)</h1>
<div id="body0000001963924208"><p id="dcs-migrate-demo03__p2682105116534">redis-shake is an open-source tool for migrating data online or offline (by importing backup files) between Redis Clusters. Data can be migrated to DCS Redis Cluster instances seamlessly because DCS Redis Cluster inherits the native Redis Cluster design.</p>
<p id="dcs-migrate-demo03__p1814154103513">The following describes how to use Linux redis-shake to migrate self-hosted Redis Cluster to a DCS Redis Cluster instance offline.</p>
<div class="note" id="dcs-migrate-demo03__note1435519462169"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-demo03__p0356174613168">If the source Redis and the target Redis cannot be connected, or the source Redis is deployed on other clouds, you can migrate data by importing backup files.</p>
</div></div>
<div class="section" id="dcs-migrate-demo03__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migrate-demo03__dcs-migration-0312010_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
</div>
<div class="section" id="dcs-migrate-demo03__section11655174618156"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-demo03__ul1119121144311"><li id="dcs-migrate-demo03__li10204184311">A DCS Redis Cluster instance has been created. For details about how to create one, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.<p id="dcs-migrate-demo03__p261218321933">The memory of the target Redis instance cannot be smaller than that of the source Redis.</p>
</li><li id="dcs-migrate-demo03__li1863392615714">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migrate-demo03__i44414446619"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>. Select the same VPC, subnet, and security group as the DCS Redis Cluster instance.</li></ul>
</div>
<div class="section" id="dcs-migrate-demo03__section460232510584"><h4 class="sectiontitle">Obtaining Information of the Source and Target Redis Nodes</h4><ol id="dcs-migrate-demo03__dcs-migrate-demo02_ol937917016457"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li10140101218452">Connect to the source and target Redis instances, respectively. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li75216113412">In online migration of Redis Clusters, the migration must be performed node by node. Run the following command to query the IP addresses and ports of all nodes in both the source and target Redis Clusters.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen9190174216389">redis-cli -h {redis_address} -p {redis_port} -a {redis_password} cluster nodes</pre>
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p18729195453"><em id="dcs-migrate-demo03__dcs-migrate-demo02_i38712590538">{redis_address}</em> indicates the Redis connection address, <em id="dcs-migrate-demo03__dcs-migrate-demo02_i19381910105416">{redis_port}</em> indicates the Redis port, and <em id="dcs-migrate-demo03__dcs-migrate-demo02_i6189101415410">{redis_password}</em> indicates the Redis connection password.</p>
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p1719124210381">In the command output similar to the following, obtain the IP addresses and ports of all masters.</p>
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p151917424388"><span><img id="dcs-migrate-demo03__dcs-migrate-demo02_image201913423389" src="en-us_image_0000002001365365.png"></span></p>
</li></ol>
</div>
<div class="section" id="dcs-migrate-demo03__section194954610107"><h4 class="sectiontitle">Installing RedisShake</h4><ol id="dcs-migrate-demo03__ol0483154263117"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li630814352317">Log in to the ECS.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li15905189153217">Run the following command on the ECS to download the redis-shake: This section uses v2.1.2 as an example. You can also download <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz</pre>
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen65481045101912">tar -xvf redis-shake-v2.1.2.tar.gz</pre>
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p17330129173"><span><img id="dcs-migrate-demo03__dcs-migrate-demo02_image64611312101716" src="en-us_image_0000001964888588.png"></span></p>
</li></ol>
<div class="note" id="dcs-migrate-demo03__note206760465302"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-demo03__p1767612462306">If the source cluster is deployed in the data center intranet, install redis-shake on the intranet server. Export the source cluster backup file by referring to <a href="#dcs-migrate-demo03__section03191023122013">Exporting the Backup File</a>. Upload the backup to the cloud server as instructed by the following steps</p>
</div></div>
</div>
<div class="section" id="dcs-migrate-demo03__section03191023122013"><a name="dcs-migrate-demo03__section03191023122013"></a><a name="section03191023122013"></a><h4 class="sectiontitle">Exporting the Backup File</h4><ol id="dcs-migrate-demo03__ol4778145172215"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li52093712471">Go to the redis-shake directory.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen383515448361">cd redis-shake-v2.0.3</pre>
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li427914206484">Edit the <strong id="dcs-migrate-demo03__b3204145510919">redis-shake.conf</strong> file by providing the following information about all the masters of the source:<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen162871920114818">vim redis-shake.conf</pre>
<div class="p" id="dcs-migrate-demo03__p993616452112">The modification is as follows:<pre class="screen" id="dcs-migrate-demo03__screen16360202195">source.type = cluster
# If there is no password, skip the following parameter.
source.password_raw = <em id="dcs-migrate-demo03__i18434722205519">{source_redis_password}</em>
# IP addresses and port numbers of all masters of the source Redis Cluster, which are separated by semicolons (;).
source.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}...{masterN_ip}:{masterN_port}</pre>
</div>
<p id="dcs-migrate-demo03__p13451352185320">Press <strong id="dcs-migrate-demo03__b291619255105">Esc</strong> to exit the editing mode and enter <strong id="dcs-migrate-demo03__b149171525141018">:wq!</strong>. Press <strong id="dcs-migrate-demo03__b191719256101">Enter</strong> to save the configuration and exit the editing interface.</p>
</li><li id="dcs-migrate-demo03__li8360907199">Run the following command to export the RDB file:<pre class="screen" id="dcs-migrate-demo03__screen23603014196">./redis-shake -type dump -conf redis-shake.conf</pre>
<p id="dcs-migrate-demo03__p1636090141916">If the following information is displayed in the execution log, the backup file is exported successfully:</p>
<pre class="screen" id="dcs-migrate-demo03__screen1136019021916">execute runner[*run.CmdDump] finished!</pre>
</li></ol>
</div>
<div class="section" id="dcs-migrate-demo03__section2080311555197"><h4 class="sectiontitle">Importing the Backup File</h4><ol id="dcs-migrate-demo03__ol111816368209"><li id="dcs-migrate-demo03__li191811936152013">Import the RDB file (or files) to the cloud server. The cloud server must be connected to the target DCS instance.</li><li id="dcs-migrate-demo03__li14181436192017">Edit the <strong id="dcs-migrate-demo03__b1499583514117">redis-shake.conf</strong> file by providing the following information about all the masters of the target:<pre class="screen" id="dcs-migrate-demo03__screen191681859101516">vim redis-shake.conf</pre>
<div class="p" id="dcs-migrate-demo03__p41818364205">The modification is as follows:<pre class="screen" id="dcs-migrate-demo03__screen7181193610202">target.type = cluster
# If there is no password, skip the following parameter.
target.password_raw = <em id="dcs-migrate-demo03__i9467443105512">{target_redis_password}</em>
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
target.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}...{masterN_ip}:{masterN_port}
# List the RDB files to be imported, separated by semicolons (;).
rdb.input = <em id="dcs-migrate-demo03__i3730185065519">{local_dump.0}</em>;<em id="dcs-migrate-demo03__i14546185455512">{local_dump.1}</em>;<em id="dcs-migrate-demo03__i1995455815557">{local_dump.2}</em>;<em id="dcs-migrate-demo03__i1934719515563">{local_dump.3}</em></pre>
</div>
<p id="dcs-migrate-demo03__p1318118362202">Press <strong id="dcs-migrate-demo03__b19176122691010">Esc</strong> to exit the editing mode and enter <strong id="dcs-migrate-demo03__b1617610262109">:wq!</strong>. Press <strong id="dcs-migrate-demo03__b1017662611013">Enter</strong> to save the configuration and exit the editing interface.</p>
</li><li id="dcs-migrate-demo03__li7181133632011">Run the following command to import the RDB file to the target instance:<pre class="screen" id="dcs-migrate-demo03__screen18181153610204">./redis-shake -type restore -conf redis-shake.conf</pre>
<p id="dcs-migrate-demo03__p51811436102018">If the following information is displayed in the execution log, the backup file is imported successfully:</p>
<pre class="screen" id="dcs-migrate-demo03__screen15182153642013">Enabled http stats, set status (incr), and wait forever.</pre>
</li></ol>
</div>
<div class="section" id="dcs-migrate-demo03__section19218115382215"><h4 class="sectiontitle">Verifying the Migration</h4><ol id="dcs-migrate-demo03__dcs-migrate-demo02_ol1397335516813"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li180911211257">After the data synchronization, connect to the Redis Cluster DCS instance by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li199735553817">Run the <strong id="dcs-migrate-demo03__dcs-migrate-demo02_b8904623195811">info</strong> command to check whether the data has been successfully imported as required.<p id="dcs-migrate-demo03__dcs-migrate-demo02_p03492001695">If the data has not been fully imported, run the <strong id="dcs-migrate-demo03__dcs-migrate-demo02_b79291718165918">flushall</strong> or <strong id="dcs-migrate-demo03__dcs-migrate-demo02_b3929218155919">flushdb</strong> command to clear the cached data in the target instance, and migrate data again.</p>
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li105900617920">After the verification is complete, delete the redis shake configuration file.</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312002.html">Migrating Data from Self-Hosted Redis to DCS</a></div>
</div>
</div>

View File

@ -6,7 +6,7 @@
<ul id="dcs-migration-0312001__ul457705155215"><li id="dcs-migration-0312001__li357712516527">Number of instances</li><li id="dcs-migration-0312001__li8577165195216">Number of databases (DBs) configured for each instance</li><li id="dcs-migration-0312001__li557713565211">Number of keys in each DB</li><li id="dcs-migration-0312001__li1157712519528">DBs used for your services</li><li id="dcs-migration-0312001__li657718515219">Space occupied by each instance</li><li id="dcs-migration-0312001__li25771158521">Redis version</li><li id="dcs-migration-0312001__li657735205219">Redis instance configurations (single-node, master/standby, or cluster)</li><li id="dcs-migration-0312001__li1557712519523">Mapping relationships between your services and instances</li></ul>
<div class="p" id="dcs-migration-0312001__p8830161915411">Plan the following information about DCS instances based on the collected information:<ul id="dcs-migration-0312001__ul15121195213"><li id="dcs-migration-0312001__li1851191155213">Number of instances to be applied for</li><li id="dcs-migration-0312001__li7511411105216">Specifications and type (single-node, master/standby, or cluster) of each instance</li><li id="dcs-migration-0312001__li3511811135213">Virtual Private Clouds (VPCs), security groups, and subnets, and security groups, to which the instances and services belong</li></ul>
</div>
<div class="note" id="dcs-migration-0312001__note11930516145410"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312001__p155612389542"><strong id="dcs-migration-0312001__b9330144195714">redis-cli -h ${redis_address} -p ${port}</strong></p>
<div class="note" id="dcs-migration-0312001__note11930516145410"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312001__p155612389542"><strong id="dcs-migration-0312001__b201782211339">redis-cli -h $<em id="dcs-migration-0312001__i141789233316">{redis_address}</em> -p $<em id="dcs-migration-0312001__i101781623336">{port}</em></strong></p>
<ul id="dcs-migration-0312001__ul11495162312529"><li id="dcs-migration-0312001__li134951023105214">Run the following command to query the data distribution and obtain the IDs of DBs with data and the number of keys in each DB:<p id="dcs-migration-0312001__p11853195155715"><a name="dcs-migration-0312001__li134951023105214"></a><a name="li134951023105214"></a><strong id="dcs-migration-0312001__b1433164118577">info keyspace</strong></p>
<p id="dcs-migration-0312001__p18605830175613">Query and record the number of keys in each DB for subsequent migration verification.</p>
</li></ul>
@ -20,7 +20,7 @@
</li><li id="dcs-migration-0312001__li162628541998">Network resources<p id="dcs-migration-0312001__p186421445181610"><a name="dcs-migration-0312001__li162628541998"></a><a name="li162628541998"></a>Create VPCs and subnets based on service planning.</p>
</li><li id="dcs-migration-0312001__li82629546911">Server resources<p id="dcs-migration-0312001__p1263043101011"><a name="dcs-migration-0312001__li82629546911"></a><a name="li82629546911"></a>Apply for ECSs to bear Redis clients. The ECSs are used to export or import cached data.</p>
<p id="dcs-migration-0312001__p5977141363919">Recommended ECS specifications are 8 vCPUs | 16 GB or higher.</p>
</li><li id="dcs-migration-0312001__li202621754798">DCS instances<p id="dcs-migration-0312001__p1342513716103"><a name="dcs-migration-0312001__li202621754798"></a><a name="li202621754798"></a>Create DCS instances based on the migration planning. If the number of instances exceeds the default quota, submit a service ticket or contact technical support.</p>
</li><li id="dcs-migration-0312001__li202621754798">DCS instances<p id="dcs-migration-0312001__p1342513716103"><a name="dcs-migration-0312001__li202621754798"></a><a name="li202621754798"></a>Create DCS instances based on the migration planning. If the number of instances exceeds the default quota, submit a service ticket or contact customer service.</p>
</li><li id="dcs-migration-0312001__li142621854098">Related tools<p id="dcs-migration-0312001__p05851412171015"><a name="dcs-migration-0312001__li142621854098"></a><a name="li142621854098"></a>Install the FTP tool and Redis migration tools.</p>
</li><li id="dcs-migration-0312001__li1326375417911">Information to be collected<p id="dcs-migration-0312001__p1193681416108"><a name="dcs-migration-0312001__li1326375417911"></a><a name="li1326375417911"></a>Collect the contact information of people involved in the migration, server addresses, login credentials, cache instance information, and DB information.</p>
</li><li id="dcs-migration-0312001__li726312541897">Overall migration plan<p id="dcs-migration-0312001__p17491017201011"><a name="dcs-migration-0312001__li726312541897"></a><a name="li726312541897"></a>Formulate the overall migration plan, including the personnel arrangement, rehearsal, migration, verification, service switchover, and rollback solutions.</p>

View File

@ -4,15 +4,17 @@
<div id="body1521459102464"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dcs-migration-190703003.html">Online Migration of Self-Hosted Redis</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-190703003.html">Migrating Self-Built Redis Online</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-190703002.html">Backup Migration of Self-Hosted Redis</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-190703002.html">Self-Hosted Redis Migration with Backup Files</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312010.html">Self-Hosted Redis Migration with redis-cli (AOF)</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312011.html">Self-Hosted Redis Migration with redis-cli (RDB)</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake (Online)</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-demo03.html">Self-Hosted Redis Cluster Migration with redis-shake (RDB)</a></strong><br>
</li>
</ul>

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,35 @@
<a name="dcs-migration-0312004"></a><a name="dcs-migration-0312004"></a>
<h1 class="topictitle1">Backup Migration Between Regions or Redis Versions</h1>
<div id="body1605611630232"><div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section2033617489354"><h4 class="sectiontitle">Application Scenarios</h4><p id="dcs-migration-0312004__dcs-migration-190703002_p592264013322">Use the DCS console to migrate Redis data from Redis of another cloud or self-hosted Redis to DCS for Redis.</p>
<p id="dcs-migration-0312004__dcs-migration-190703002_p542904425717">Simply download the source Redis data and then upload the data to an OBS bucket in the same region as the target DCS Redis instance. After you have created a migration task on the DCS console, DCS will read data from the OBS bucket and data will be migrated to the target instance.</p>
<p id="dcs-migration-0312004__dcs-migration-190703002_p19560545183013">.aof, .rdb, .zip, and .tar.gz files can be uploaded to OBS buckets. You can directly upload .aof and .rdb files or compress them into .zip or .tar.gz files before uploading.</p>
<h1 class="topictitle1">Backup Import Between DCS Redis Instances</h1>
<div id="body8662426"><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p9488889217">You can migrate data between DCS instances by importing backup files.</p>
<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul82381214112412"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li3238714152411">If the source Redis and target Redis are in the same region under the same DCS account, and the source Redis is not a single-node instance, see <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027">Importing Backup Data from a Redis Instance</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li132386143242">If the source Redis and target Redis are in different regions or under different DCS accounts, or the source Redis is a single-node instance, see <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358">Importing Backup Data from an OBS Bucket</a>.</li></ul>
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section393611177"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312004__dcs-migration-190703002_ul6904185261112"><li id="dcs-migration-0312004__dcs-migration-190703002_li883710301127">The OBS bucket must be in the same region as the target DCS Redis instance. </li><li id="dcs-migration-0312004__dcs-migration-190703002_li923118413317">The data files to be uploaded must be in the .aof, .rdb, .zip, or .tar.gz format.</li><li id="dcs-migration-0312004__dcs-migration-190703002_li64753803210">To migrate data from a single-node or master/standby Redis instance of another cloud, create a backup task and download the backup file.</li><li id="dcs-migration-0312004__dcs-migration-190703002_li12471738123211">To migrate data from a cluster Redis instance of another cloud, download all backup files, upload all of them to the OBS bucket, and select all of them for the migration. Each backup file contains data for a shard of the instance.</li></ul>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section1128152020384"><a name="dcs-migration-0312004__dcs-migration-190703002_section1128152020384"></a><a name="dcs-migration-190703002_section1128152020384"></a><h4 class="sectiontitle">Step 1: Prepare the Target DCS Redis Instance</h4><ul id="dcs-migration-0312004__dcs-migration-190703002_ul727834515383"><li id="dcs-migration-0312004__dcs-migration-190703002_li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_li5270324091">If you already have a DCS Redis instance, you do not need to create one again, but you need to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>.</li></ul>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section119981132024"><h4 class="sectiontitle">Step 2: Create an OBS Bucket and Upload Backup Files</h4><ol id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol14268144310394"><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li526813435394"><span>Create an OBS bucket.</span><p><ol type="a" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol1428871018424"><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li928820103427">Log in to the OBS Console and click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b166887291556">Create Bucket</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810">Select a region.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p6758547101115"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a><a name="dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a>The OBS bucket must be in the same region as the target DCS Redis instance.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li17551201611127">Specify <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b35011159155518">Bucket Name</strong>.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p13756232101216">The bucket name must meet the naming rules specified on the console.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li7374556111414">Set <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b6855154112512">Storage Class</strong> to <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b4856246254">Standard</strong>, <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b15857194162510">Warm</strong> or <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b8857184172513">Cold</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1599313751414">Set <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b106244293384">Bucket Policy</strong> to <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b16228222115810">Private</strong>, <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b288452010585">Public Read</strong>, or <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b48751517175816">Public Read and Write</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8943153811198">Configure default encryption.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1095473710153">Click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b27676134598">Create Now</strong>.</li></ol>
</p></li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li11932341124013"><span>Upload the backup data files to the OBS bucket by using OBS Browser+.</span><p><p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p5866126154517">If the backup file to be uploaded does not exceed 5 GB, upload the file using the OBS console by referring to step <a href="#dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8307135965315">3</a>.</p>
<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p78781449183">If the backup file to be uploaded is larger than 5 GB, perform the following steps to upload the file using OBS Browser+.</p>
<ol type="a" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol159571723610"><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1695767113614">Download OBS Browser+.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p16850164915377"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1695767113614"></a><a name="dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1695767113614"></a>For details, see section "Downloading OBS Browser+" in <em id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_i17217435104313">Object Storage Service (OBS) Tools Guide (OBS Browser+)</em>.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li11225208162112">Install OBS Browser+.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p1022518842111"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li11225208162112"></a><a name="dcs-migration-190703002_dcs-ug-0312037_li11225208162112"></a>For details, see section "Installing OBS Browser+" in <em id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_i118557531214">Object Storage Service (OBS) Tools Guide (OBS Browser+)</em>.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li201961913103814">Log in to OBS Browser+.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p1119621313811"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li201961913103814"></a><a name="dcs-migration-190703002_dcs-ug-0312037_li201961913103814"></a>For details, see section "Logging In to OBS Browser+" in <em id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_i104881711215">Object Storage Service (OBS) Tools Guide (OBS Browser+)</em>.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li144125145718">Create a bucket.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li10948943114817">Upload backup data.</li></ol>
</p></li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8307135965315"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8307135965315"></a><a name="dcs-migration-190703002_dcs-ug-0312037_li8307135965315"></a><span>On the OBS console, upload the backup data files to the OBS bucket.</span><p><div class="p" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p73071659115311">Perform the following steps if the backup file size does not exceed 5 GB:<ol type="a" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_ol17307059105315"><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li11425644112117">In the bucket list, click the name of the created bucket.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li6425134472111">In the navigation pane, choose <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b7335667220">Objects</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li8425844162114">On the <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b1434535111128">Objects</strong> tab page, click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b8346251131216">Upload Object</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li4601227114516">Upload the objects.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p2092314104615"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li4601227114516"></a><a name="dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li4601227114516"></a>To upload objects, drag files or folders to the <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b1466016717292">Upload Object</strong> area or click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b13375203619291">add file</strong>. A maximum of 100 files can be uploaded at a time. The total size cannot exceed 5 GB.</p>
<div class="fignone" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_fig184786179256"><span class="figcap"><b>Figure 1 </b>Uploading an object</span><br><span><img id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_image174788172258" src="en-us_image_0000001634759086.png"></span></div>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li29854713516">(Optional) Select <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b418982912617">KMS encryption</strong> to encrypt the file you want to upload.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li103071459205315">Click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b2373124572710">Upload</strong>.</li></ol>
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815"></a><a name="en-us_topic_0000001893744560_section7611653155815"></a><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul17431141717136"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li984724094">You have successfully backed up the source Redis instance.<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul32651722396"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li16326201099">For <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027">Importing Backup Data from a Redis Instance</a>, you do not need to download the backup file to the local PC. For details about how to back up data, see <a href="dcs-ug-0312032.html">Manually Backing Up a DCS Instance</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li193934251896">For <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358">Importing Backup Data from an OBS Bucket</a>, download the backup file to the local PC by referring to <a href="dcs-ug-0312034.html">Downloading a Backup File</a>.</li></ul>
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li543141716137">You have prepared the target Redis instance. If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p11513147445">Redis is backward compatible. The target instance version must be the same as or later than the source instance version.</p>
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li184311817111318">Ensure that the target Redis instance has sufficient storage space. You can clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
</div>
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027"></a><a name="en-us_topic_0000001893744560_section168361859027"></a><h4 class="sectiontitle">Importing Backup Data from a Redis Instance</h4><ol id="dcs-migration-0312004__en-us_topic_0000001893744560_ol1694114110143"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li109411816148"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li5415759599"><span>Click <span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_i0d8b8411c49244f694e4f9ebeef4b3c5" src="en-us_image_0000001999635737.png"></span> in the upper left corner of the console and select the region where your source and target instances are located.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1094120141419"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1424285011577">Data Migration</strong>. The migration task list is displayed.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li39411114149"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b7180145855711">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li49416181414"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1422038133115">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1294114141413"><span>For source Redis, set <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b53391211165812">Data Source</strong> to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b2033941195812">Redis</strong>.</span><p><div class="fignone" id="dcs-migration-0312004__en-us_topic_0000001893744560_fig38031824194312"><span class="figcap"><b>Figure 1 </b>Selecting a data source (Redis)</span><br><span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_image3803132434312" src="en-us_image_0000001955154978.png"></span></div>
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1594112116144"><span>For <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b25981239185918">Source Redis Instance</strong>, select the source instance to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li294112114146"><span>Select the backup task whose data is to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li394112191415"><span>For <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b7542142819110">Target Redis Instance</strong>, select the DCS Redis instance prepared in <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815">Prerequisites</a>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li9942101151410"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li119421618149"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li15942121171414"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p5942141171410">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b3492173611113">Successful</strong>.</p>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section9876193816277"><h4 class="sectiontitle">Step 3: Create a Migration Task</h4><ol id="dcs-migration-0312004__dcs-migration-190703002_ol81391154144716"><li id="dcs-migration-0312004__dcs-migration-190703002_li390016374490"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__dcs-migration-190703002_b5554182981516">Data Migration</strong>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li67372014165120"><span>Click <strong id="dcs-migration-0312004__dcs-migration-190703002_b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li14133134613500"><span>Enter the task name and description.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-0312004__dcs-migration-190703002_b1378581610478">Source Redis</strong> area, select <strong id="dcs-migration-0312004__dcs-migration-190703002_b19787171684717">OBS Bucket</strong> for <strong id="dcs-migration-0312004__dcs-migration-190703002_b19254112645013">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li1281412951215"><span>Click <strong id="dcs-migration-0312004__dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li1264738143811"><span>In the <strong id="dcs-migration-0312004__dcs-migration-190703002_b7459123818489">Target Redis</strong> area, select the <strong id="dcs-migration-0312004__dcs-migration-190703002_b81601464910">Target Redis Instance</strong> prepared in <a href="#dcs-migration-0312004__dcs-migration-190703002_section1128152020384">Step 1: Prepare the Target DCS Redis Instance</a>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__dcs-migration-190703002_b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-0312004__dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-0312004__dcs-migration-190703002_p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__dcs-migration-190703002_b38116245234">Successful</strong>.</p>
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358"></a><a name="en-us_topic_0000001893744560_section12790115912358"></a><h4 class="sectiontitle">Importing Backup Data from an OBS Bucket</h4><p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p542904425717">Simply download the source Redis data and then upload the data to an OBS bucket in the same account and region as the target DCS Redis instance. After you have created a backup import task, data in the OBS bucket will be read and migrated to the target Redis.</p>
<div class="note" id="dcs-migration-0312004__en-us_topic_0000001893744560_note1024063013419"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul119151459102810"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li89154599284">.aof, .rdb, .zip, and .tar.gz files can be uploaded to OBS buckets. You can directly upload .aof and .rdb files or compress them into .zip or .tar.gz files before uploading.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li159151759132820">To migrate data from a cluster Redis instance, download all backup files and upload all of them to the OBS bucket. Each backup file contains data for a shard of the instance. During the migration, you need to select backup files of all shards.</li></ul>
</div></div>
</div>
<ol id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_ol14268144310394"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li9758112393116"><span><strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b25243103616">Create an OBS bucket in the account and region where the target Redis instance is located.</strong> If a qualified OBS bucket is available, you do not need to create one.</span><p><div class="p" id="dcs-migration-0312004__en-us_topic_0000001893744560_p1381182583111">When creating an OBS bucket, pay attention to the configuration of the following parameters. For details on how to set other parameters, see "Creating a Bucket" in <em id="dcs-migration-0312004__en-us_topic_0000001893744560_i104378420812">Object Storage Service User Guide</em>.<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul1676254012574"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li18762740185715"><strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b322512612920">Region</strong>:<p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p1348814534465">The OBS bucket must be in the same region as the target DCS Redis instance.</p>
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li276217409575"><strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b15127014688">Default Storage Class</strong>: Select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b151276143820">Standard</strong> or <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b19127714085">Infrequent Access</strong>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p65128619477">Do not select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b103601829135710">Archive</strong>. Otherwise, the migration will fail.</p>
</li></ul>
</div>
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li18291101435517"><span>Upload the backup file to the OBS bucket. </span><p><ol type="a" id="dcs-migration-0312004__en-us_topic_0000001893744560_ol16799172411561"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1713414272578">In the bucket list, click the name of the created bucket.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li17134202715717">In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b7335667220">Objects</strong>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li61348275576">On the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b132501351112019">Objects</strong> tab page, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b11250651142011">Upload Object</strong>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li17134142735713">Specify <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b166741139152">Storage Class</strong>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p819410917232">Do not select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b15813617181611">Archive</strong>. Otherwise, the migration will fail.</p>
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li513562715716">Upload the objects.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p19534101014172"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_li513562715716"></a><a name="en-us_topic_0000001893744560_li513562715716"></a>Drag files or folders to the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b1466016717292">Upload Object</strong> area or click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b13375203619291">add file</strong>.</p>
<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1534181091717">A maximum of 100 files can be uploaded at a time. The total size cannot exceed 5 GB. If the total size of files to be uploaded exceeds 5 GB, click "How to Upload a File Larger than 5 GB" in the upper part of the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1831256132219">Upload Object</strong> dialog box and perform operations as instructed.</p>
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li2013511276574">Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b4446102218714">Upload</strong>.</li></ol>
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li390016374490"><span>Click <span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_image1225093910911" src="en-us_image_0000001963155450.png"></span> in the upper left corner and choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1829716568220">Distributed Cache Service for Redis</strong> under <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b11297155672219">Databases</strong> to open the DCS console.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b3976141122312">Data Migration</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li67372014165120"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li14133134613500"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1280408183113">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b5520013112315">Source Redis</strong> area, select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b85201113132311">OBS Bucket</strong> for <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b752051314230">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li144211117547"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1264738143811"><span>In the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b109978308239">Target Redis</strong> area, select the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1499713302236">Target Redis Instance</strong> prepared in <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815">Prerequisites</a>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b678586674">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1464484671">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b390188571">Next</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1746812449">Submit</strong>.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b38116245234">Successful</strong>.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312008.html">Migrating Data Between DCS Instances</a></div>

View File

@ -1,22 +1,19 @@
<a name="dcs-migration-0312005"></a><a name="dcs-migration-0312005"></a>
<h1 class="topictitle1">Migrating Redis Data from Another Cloud to DCS</h1>
<div id="body1605605684737"><p id="dcs-migration-0312005__p8060118"></p>
<h1 class="topictitle1">Migration from Another Cloud</h1>
<div id="body1605605684737"><p id="dcs-migration-0312005__p8060118"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dcs-migration-0312006.html">Online Migration from Another Cloud</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-0312006.html">Migrating Redis from Another Cloud Online</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-1117001.html">Backup Migration from Another Cloud</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-1117001.html">Backup Import from Another Cloud</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-090626001_0.html">Online Migration with Rump</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-1117003.html">Offline Migration of Redis Cluster from Another Cloud with redis-shake</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migrate-1117003.html">Backup Import from Another Cloud Using redis-shake</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-0220411.html">Online Full Migration of Redis from Another Cloud with redis-shake</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migrate-0220411.html">Migrating from Another Cloud Online Using redis-shake</a></strong><br>
</li>
</ul>

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,10 @@
<h1 class="topictitle1">Migrating Data from DCS to Self-Hosted Redis</h1>
<div id="body1522316340539"><div class="section" id="dcs-migration-0312007__section121241237151615"><h4 class="sectiontitle">Scenario</h4><p id="dcs-migration-0312007__p728264411616">You can use the online migration function of the DCS console to migrate DCS Redis instances to your self-hosted Redis. You can also export the DCS instance data to an RDB file and import it to local or self-hosted Redis.</p>
</div>
<div class="section" id="dcs-migration-0312007__section823282683416"><h4 class="sectiontitle">Recommended Solutions</h4><ul id="dcs-migration-0312007__ul146877230392"><li id="dcs-migration-0312007__li79463226563">Online migration on the DCS console<p id="dcs-migration-0312007__p191215426567"><a name="dcs-migration-0312007__li79463226563"></a><a name="li79463226563"></a>For details, see <a href="dcs-migration-190703003.html">Online Migration of Self-Hosted Redis</a>. Select <strong id="dcs-migration-0312007__b191027113344">Self-hosted Redis</strong> and enter the target Redis address when configuring the target Redis.</p>
</li><li id="dcs-migration-0312007__li1268742313396">Use redis-cli or the DCS console to export the DCS instance data to an RDB file, and then use redis-shake to import the file to the target.<p id="dcs-migration-0312007__p1059121862218"><a name="dcs-migration-0312007__li1268742313396"></a><a name="li1268742313396"></a>For details about how to install and use redis-shake, see <a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake</a> and <a href="https://github.com/alibaba/RedisShake/blob/release-v2.1.1-20210903/conf/redis-shake.conf" target="_blank" rel="noopener noreferrer">redis-shake configuration instructions</a>.</p>
<div class="section" id="dcs-migration-0312007__section823282683416"><h4 class="sectiontitle">Recommended Solutions</h4><ul id="dcs-migration-0312007__ul146877230392"><li id="dcs-migration-0312007__li79463226563">Online migration on the DCS console<p id="dcs-migration-0312007__p191215426567"><a name="dcs-migration-0312007__li79463226563"></a><a name="li79463226563"></a>For details, see <a href="dcs-migration-190703003.html">Migrating Self-Built Redis Online</a>. Select <strong id="dcs-migration-0312007__b191027113344">Self-hosted Redis</strong> and enter the target Redis address when configuring the target Redis.</p>
</li><li id="dcs-migration-0312007__li1268742313396">Use redis-cli or the DCS console to export the DCS instance data to an RDB file, and then use redis-shake to import the file to the target.<p id="dcs-migration-0312007__p1059121862218"><a name="dcs-migration-0312007__li1268742313396"></a><a name="li1268742313396"></a>For details about how to install and use redis-shake, see <a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake (Online)</a> and <a href="https://github.com/alibaba/RedisShake/blob/release-v2.1.1-20210903/conf/redis-shake.conf" target="_blank" rel="noopener noreferrer">redis-shake configuration instructions</a>.</p>
</li></ul>
<ul id="dcs-migration-0312007__ul1962111468814"><li id="dcs-migration-0312007__li462194615818">Rump<p id="dcs-migration-0312007__p106751953891"><a name="dcs-migration-0312007__li462194615818"></a><a name="li462194615818"></a>This tool is recommended for online migration if possible. For details, see <a href="dcs-migration-090626001_0.html">Online Migration with Rump</a>.</p>
<ul id="dcs-migration-0312007__ul1962111468814"><li id="dcs-migration-0312007__li462194615818">Rump<p id="dcs-migration-0312007__p106751953891"><a name="dcs-migration-0312007__li462194615818"></a><a name="li462194615818"></a>This tool is recommended for online migration if possible. For details, see <a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a>.</p>
</li></ul>
</div>
</div>

View File

@ -4,9 +4,9 @@
<div id="body1522317011304"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dcs-migration-0312003.html">Online Migration Between DCS Redis Instances</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-0312003.html">Online Migration Between Instances</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312004.html">Backup Migration Between Regions or Redis Versions</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-migration-0312004.html">Backup Import Between DCS Redis Instances</a></strong><br>
</li>
</ul>

View File

@ -1,30 +1,36 @@
<a name="dcs-migration-0312010"></a><a name="dcs-migration-0312010"></a>
<h1 class="topictitle1">Self-Hosted Redis Migration with redis-cli (AOF)</h1>
<div id="body1521621550550"><div class="section" id="dcs-migration-0312010__section6939586315"><h4 class="sectiontitle">Introduction</h4><p id="dcs-migration-0312010__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server.</p>
<p id="dcs-migration-0312010__p745081364515">Run the following command to download Redis:</p>
<p id="dcs-migration-0312010__p820445422318"><strong id="dcs-migration-0312010__b113982613241">wget http://download.redis.io/releases/redis-5.0.8.tar.gz</strong></p>
<p id="dcs-migration-0312010__p1458314211314">This section describes how to use redis-cli to migrate a data from a self-hosted Redis instance to a DCS instance.</p>
<div id="body1521621550550"><p id="dcs-migration-0312010__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server. This section describes how to use redis-cli to migrate a data from a self-hosted Redis instance to a DCS instance.</p>
<p id="dcs-migration-0312010__p187251431124014">An AOF file can be generated quickly. It applies to scenarios where you can access the Redis server and modify the configurations, such as scenarios with self-built Redis servers.</p>
<div class="section" id="dcs-migration-0312010__section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312010__ul144975114312"><li id="dcs-migration-0312010__li11497511123114">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-0312010__li4497511153115">Smaller target instance specifications than source instance specifications may cause failures.</li><li id="dcs-migration-0312010__li43541426123817">Migrate data during off-peak hours.</li><li id="dcs-migration-0312010__li3936193514315">Before data migration, suspend your services so that data changes newly generated will not be lost during the migration.</li></ul>
</div>
<div class="section" id="dcs-migration-0312010__section715982193316"><h4 class="sectiontitle">Step 1: Generating an AOF File</h4><div class="notice" id="dcs-migration-0312010__note17694182220346"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="dcs-migration-0312010__ul4345165217345"><li id="dcs-migration-0312010__li16345115233416">Before data migration, suspend your services so that data changes newly generated will not be lost during the migration.</li><li id="dcs-migration-0312010__li13242550342">Migrate data during off-peak hours.</li></ul>
</div></div>
<p id="dcs-migration-0312010__p4810151843510">Run the following command to enable cache persistence and obtain an AOF persistence file:</p>
<p id="dcs-migration-0312010__p87621845165017"><strong id="dcs-migration-0312010__b3974185419506">redis-cli -h <em id="dcs-migration-0312010__i31180255112">{source_redis_address}</em> -p 6379 -a <em id="dcs-migration-0312010__i25352263012">{password}</em> config set appendonly yes</strong></p>
<div class="section" id="dcs-migration-0312010__section722619530128"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312010__ul1119121144311"><li id="dcs-migration-0312010__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312010__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li><li id="dcs-migration-0312010__li72019114316">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migration-0312010__i397111469181"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>.</li></ul>
</div>
<div class="section" id="dcs-migration-0312010__section715982193316"><h4 class="sectiontitle">Generating an AOF File</h4><ol id="dcs-migration-0312010__ol51514326911"><li id="dcs-migration-0312010__li5535369167">Log in to the ECS.</li><li id="dcs-migration-0312010__li74512146382">Install redis-cli. The following steps assume that your client is installed on the Linux OS.<ol type="a" id="dcs-migration-0312010__ol14316633183210"><li id="dcs-migration-0312010__li61510320920">Run the following command to download Redis: You can also install other Redis versions. For details, see the <a href="https://redis.io/download?spm=a2c4g.11186623.2.15.4e732074zS4LSS#installation" target="_blank" rel="noopener noreferrer">Redis official website</a>.<pre class="screen" id="dcs-migration-0312010__screen49403453552">wget http://download.redis.io/releases/redis-5.0.8.tar.gz</pre>
</li><li id="dcs-migration-0312010__li145586109393">Run the following command to decompress the source code package of your Redis client:<pre class="screen" id="dcs-migration-0312010__screen11689857184920">tar -xzf redis-5.0.8.tar.gz</pre>
</li><li id="dcs-migration-0312010__li5558131033913">Run the following commands to go to the Redis directory and compile the source code of your Redis client:<pre class="screen" id="dcs-migration-0312010__screen1140715135010">cd redis-5.0.8
make
cd src</pre>
</li></ol>
</li><li id="dcs-migration-0312010__li524113915916">Run the following command to enable cache persistence and obtain the AOF persistence file:<pre class="screen" id="dcs-migration-0312010__screen1914272120563">redis-cli -h {source_redis_address} -p {port} -a {password} config set appendonly yes</pre>
<p id="dcs-migration-0312010__p250125111178"><em id="dcs-migration-0312010__i13984648182118">{source_redis_address}</em> is the connection address of the source Redis, <em id="dcs-migration-0312010__i171855567214">{port}</em> is the port of the source Redis, and <em id="dcs-migration-0312010__i72839692211">{password}</em> is the connection password of the source Redis.</p>
<p id="dcs-migration-0312010__p1274325217213">If the size of the AOF file does not change after you have enabled persistence, the AOF file contains full cached data.</p>
<div class="note" id="dcs-migration-0312010__note183105714711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312010__ul14169633163914"><li id="dcs-migration-0312010__li15169233123919">To find out the path for storing the AOF file, use redis-cli to access the Redis instance, and run the <strong id="dcs-migration-0312010__b61691633143916">config get dir</strong> command. Unless otherwise specified, the file is named as <strong id="dcs-migration-0312010__b9514329195810">appendonly.aof</strong> by default.</li><li id="dcs-migration-0312010__li151694330394">To disable synchronization after the AOF file is generated, use redis-cli to log in to the Redis instance and run the <strong id="dcs-migration-0312010__b171692033103916">config set appendonly no</strong> command.</li></ul>
</div></div>
</li></ol>
</div>
<div class="section" id="dcs-migration-0312010__section1146318206338"><h4 class="sectiontitle">Step 2: Uploading the AOF file to ECS</h4><ol id="dcs-migration-0312010__ol24089454211"><li id="dcs-migration-0312010__li4853142144220">To save the transmission time, compress the AOF file before transmission.</li><li id="dcs-migration-0312010__li84081442422">Upload the compressed file to ECS using an appropriate mode (for example, SFTP mode).</li></ol>
<div class="section" id="dcs-migration-0312010__section1146318206338"><h4 class="sectiontitle">Uploading the AOF file to ECS</h4><p id="dcs-migration-0312010__p155931633134017">To save time, you are advised to compress the AOF file and upload it to ECS using an appropriate mode (for example, SFTP mode).</p>
<div class="note" id="dcs-migration-0312010__note22211616174320"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312010__dcs-migration-0312012_p1922181634311">Ensure that the ECS has sufficient disk space for data file decompression, and can communicate with the DCS instance. Generally, the ECS and DCS instance are configured to belong to the same VPC and subnet, and the configured security group rules do not restrict access ports. For details about how to configure a security group, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
</div></div>
</div>
<div class="section" id="dcs-migration-0312010__section1458283216500"><h4 class="sectiontitle">Step 3: Importing Data</h4><p id="dcs-migration-0312010__p011163204217"><strong id="dcs-migration-0312010__b278592218432">redis-cli -h {dcs_instance_address} -p <em id="dcs-migration-0312010__i1590341311434">6379</em> -a {password} --pipe &lt; appendonly.aof</strong></p>
<div class="section" id="dcs-migration-0312010__section1458283216500"><h4 class="sectiontitle">Importing Data</h4><p id="dcs-migration-0312010__p674955013201">Log in to the ECS and run the following command to import data.</p>
<pre class="screen" id="dcs-migration-0312010__screen556113424442">redis-cli -h {dcs_instance_address} -p {port} -a {password} --pipe &lt; appendonly.aof</pre>
<p id="dcs-migration-0312010__p9732153942313"><em id="dcs-migration-0312010__i582833142315">{dcs_instance_address}</em> indicates the address of the target Redis instance, <em id="dcs-migration-0312010__i222815396233">{port}</em> indicates the port of the target Redis instance, and <em id="dcs-migration-0312010__i25712477234">{password}</em> indicates the password for connecting to the target Redis instance.</p>
<p id="dcs-migration-0312010__p1730911332441">It takes 4 to 10 seconds to import an AOF file of 1 million data (20 bytes per data segment) to a VPC.</p>
</div>
<div class="section" id="dcs-migration-0312010__section1762337185412"><h4 class="sectiontitle">Step 4: Verifying Migration</h4><p id="dcs-migration-0312010__p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-0312010__b4358102614910">info</strong> command to check whether the data has been successfully imported as required.</p>
<p id="dcs-migration-0312010__p1692631220146">If the data import fails, analyze the cause, modify the data import statement, run the <strong id="dcs-migration-0312010__b2512221013">flushall</strong> or <strong id="dcs-migration-0312010__b179081749105">flushdb</strong> command to clear the cached data in the instance, and import the data again.</p>
</div>
<div class="section" id="dcs-migration-0312010__section12903941155218"><h4 class="sectiontitle">Efficiency of Data Export and Import</h4><p id="dcs-migration-0312010__p187251431124014">An AOF file can be generated quickly. It applies to scenarios where you can access the Redis server and modify the configurations, such as scenarios with self-built Redis servers.</p>
<p id="dcs-migration-0312010__p106998316559">It takes 4s to 10s to import 1 million data records (20 bytes per data record) in a VPC.</p>
<div class="section" id="dcs-migration-0312010__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312010__p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-0312010__b4358102614910">info</strong> command to check whether the data has been successfully imported as required. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</p>
<p id="dcs-migration-0312010__p1692631220146">If the import fails, check the procedure. If the import command is incorrect, run the <strong id="dcs-migration-0312010__b4876205882515">flushall</strong> or <strong id="dcs-migration-0312010__b7685714263">flushdb</strong> command to clear the cache data in the target instance, modify the import command, and try again.</p>
</div>
</div>
<div>

View File

@ -1,43 +1,41 @@
<a name="dcs-migration-0312011"></a><a name="dcs-migration-0312011"></a>
<h1 class="topictitle1">Self-Hosted Redis Migration with redis-cli (RDB)</h1>
<div id="body1526373894623"><div class="section" id="dcs-migration-0312011__section6939586315"><h4 class="sectiontitle">Introduction</h4><p id="dcs-migration-0312011__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server.</p>
<p id="dcs-migration-0312011__p12921741468">redis-cli supports data export as an RDB file. If your Redis service does not support AOF file export, use redis-cli to obtain an RDB file. Then, use another tool (such as redis-shake) to import the file to a DCS instance.</p>
<p id="dcs-migration-0312011__p129191933133219">Operations described in this section are performed on the Linux OS.</p>
<p id="dcs-migration-0312011__p745081364515">Run the following command to download Redis. redis-cli can be used after installation and compilation.</p>
<p id="dcs-migration-0312011__p820445422318"><strong id="dcs-migration-0312011__b113982613241">wget http://download.redis.io/releases/redis-5.0.8.tar.gz</strong></p>
<div class="notice" id="dcs-migration-0312011__note4420253135811"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-migration-0312011__p74211653165818">The source Redis instance must support the <strong id="dcs-migration-0312011__b1059015293311">SYNC</strong> command, which is required when exporting the RDB file using redis-cli.</p>
<p id="dcs-migration-0312011__p41151724173212">The <strong id="dcs-migration-0312011__b1667829185716">SYNC</strong> command is not supported by DCS Reds 4.0/5.0/6.0 instances and cannot be used to export RDB files. To back up master/standby instance data, use the backup and restoration function provided by the DCS console.</p>
</div></div>
<div id="body1526373894623"><p id="dcs-migration-0312011__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server. redis-cli supports data export as an RDB file. If your Redis service does not support AOF file export, use redis-cli to obtain an RDB file. Then, use another tool (such as redis-shake) to import the file to a DCS instance.</p>
<div class="section" id="dcs-migration-0312011__section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312011__ul1383184352119"><li id="dcs-migration-0312011__li55401126183312">Migrate data during off-peak hours.</li><li id="dcs-migration-0312011__li1154265184218">When the source is Redis native cluster data, individually export the data of each node in the cluster, and then import the data node by node.</li><li id="dcs-migration-0312011__li921571317245">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
</div>
<div class="section" id="dcs-migration-0312011__section1072619547366"><h4 class="sectiontitle">Step 1: Preparation for Data Export</h4><p id="dcs-migration-0312011__p8135154810368">For master/standby or cluster DCS instances, there is a delay in writing data into an RDB file based on the delay policies configured in the <strong id="dcs-migration-0312011__b16275726195417">redis.conf</strong> file. Therefore, before data export, learn the RDB policy configurations of the Redis instance to be migrated, suspend your service systems, and then write the required number of test keys into the Redis instance. This ensures that the RDB file is newly generated.</p>
<p id="dcs-migration-0312011__p18440210183712">For the Redis service provided by a third-party cloud platform, you can contact its technical support to learn data writing policy configurations of an RDB file.</p>
<p id="dcs-migration-0312011__p3341948103814">For example, the default RDB policy configurations in the <strong id="dcs-migration-0312011__b8176925155613">redis.conf</strong> file are as follows:</p>
<pre class="screen" id="dcs-migration-0312011__screen9659163544115">save 900 1 //Writes changed data into an RDB file if there is any data change within 900s.
<div class="section" id="dcs-migration-0312011__section722619530128"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312011__ul1986482133811"><li id="dcs-migration-0312011__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312011__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
<ul id="dcs-migration-0312011__ul1119121144311"><li id="dcs-migration-0312011__li72019114316">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migration-0312011__dcs-migration-0312010_i397111469181"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>.</li><li id="dcs-migration-0312011__li41964541419"><strong id="dcs-migration-0312011__b1364317153019">The source self-hosted Redis instance must support the </strong><strong id="dcs-migration-0312011__b19556123172914">SYNC</strong><strong id="dcs-migration-0312011__b13364217193014"> command.</strong> Otherwise, the RDB file cannot be exported using redis-cli.</li></ul>
</div>
<div class="section" id="dcs-migration-0312011__section715982193316"><h4 class="sectiontitle">Exporting the RDB File</h4><ol id="dcs-migration-0312011__ol332285513561"><li id="dcs-migration-0312011__li6655153819127">Prepare for the export.<p id="dcs-migration-0312011__p34160614132"><a name="dcs-migration-0312011__li6655153819127"></a><a name="li6655153819127"></a>For master/standby or cluster DCS instances, there is a delay in writing data into an RDB file based on the delay policies configured in the <strong id="dcs-migration-0312011__b176051127193416">redis.conf</strong> file. Before data export, learn the RDB policy configurations of the Redis instance to be migrated, suspend your service systems, and then write the required number of test data into the Redis instance. This ensures that the RDB file is newly generated.</p>
<p id="dcs-migration-0312011__p1141617621317">For example, the default RDB policy configurations in the <strong id="dcs-migration-0312011__b3365853183418">redis.conf</strong> file are as follows:</p>
<pre class="screen" id="dcs-migration-0312011__screen1341618651316">save 900 1 //Writes changed data into an RDB file if there is any data change within 900s.
save 300 10 //Writes changed data into an RDB file if there are more than 10 data changes within 300s.
save 60 10000 //Writes changed data into an RDB file if there are more than 10,000 data changes within 60s.</pre>
<p id="dcs-migration-0312011__p119553170429">Based on the preceding policy configurations, after stopping your service systems from writing data into the Redis instances, you can manually write test data to trigger the policies, so that all service data can be synchronized to the RDB file.</p>
<p id="dcs-migration-0312011__p276881010502">You can delete the test data after data import.</p>
<div class="note" id="dcs-migration-0312011__note987954475012"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312011__p6880544125014">If there is any DB not used by your service systems, you can write test data into the DB, and run the <strong id="dcs-migration-0312011__b11467173213518">flushdb</strong> command to clear the DB after importing data into DCS.</p>
<p id="dcs-migration-0312011__p541614616130">Based on the preceding policy configurations, after stopping your service systems from writing data into the Redis instances, you can write test data to trigger the policies, so that all service data can be synchronized to the RDB file.</p>
<p id="dcs-migration-0312011__p6416368135">You can delete the test data after data import.</p>
<div class="note" id="dcs-migration-0312011__note74169631313"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312011__ul7191133864317"><li id="dcs-migration-0312011__li11911938104311">If there is any DB not used by your service systems, you can write test data into the DB, and run the <strong id="dcs-migration-0312011__b158771449113511">flushdb</strong> command to clear the database after importing data into DCS.</li><li id="dcs-migration-0312011__li141911638174312">Compared with master/standby instances, single-node instances without data persistence configured require a longer time for export of an RDB file, because the RDB file is temporarily generated.</li></ul>
</div></div>
</li><li id="dcs-migration-0312011__li5535369167">Log in to the ECS.</li><li id="dcs-migration-0312011__li61510320920">Install redis-cli. The following steps assume that your client is installed on the Linux OS.<ol type="a" id="dcs-migration-0312011__dcs-migration-0312010_ol14316633183210"><li id="dcs-migration-0312011__dcs-migration-0312010_li61510320920">Run the following command to download Redis: You can also install other Redis versions. For details, see the <a href="https://redis.io/download?spm=a2c4g.11186623.2.15.4e732074zS4LSS#installation" target="_blank" rel="noopener noreferrer">Redis official website</a>.<pre class="screen" id="dcs-migration-0312011__dcs-migration-0312010_screen49403453552">wget http://download.redis.io/releases/redis-5.0.8.tar.gz</pre>
</li><li id="dcs-migration-0312011__dcs-migration-0312010_li145586109393">Run the following command to decompress the source code package of your Redis client:<pre class="screen" id="dcs-migration-0312011__dcs-migration-0312010_screen11689857184920">tar -xzf redis-5.0.8.tar.gz</pre>
</li><li id="dcs-migration-0312011__dcs-migration-0312010_li5558131033913">Run the following commands to go to the Redis directory and compile the source code of your Redis client:<pre class="screen" id="dcs-migration-0312011__dcs-migration-0312010_screen1140715135010">cd redis-5.0.8
make
cd src</pre>
</li></ol>
</li><li id="dcs-migration-0312011__li15744151813501">Run the following command to export the RDB file:<pre class="screen" id="dcs-migration-0312011__screen17614142965716">redis-cli -h <em id="dcs-migration-0312011__i02045745318">{source_redis_address}</em> -p <em id="dcs-migration-0312011__i871581011537">{port}</em> -a <em id="dcs-migration-0312011__i1825120148535">{password}</em> --rdb <em id="dcs-migration-0312011__i1354615193531">{output.rdb}</em></pre>
<p id="dcs-migration-0312011__p1912591714586"><em id="dcs-migration-0312011__i166361442113616">{source_redis_address}</em> is the connection address of the source Redis, <em id="dcs-migration-0312011__i13637174283617">{port}</em> is the port of the source Redis, <em id="dcs-migration-0312011__i1637242183614">{password}</em> is the connection password of the source Redis, and <em id="dcs-migration-0312011__i449763413377">{output.rdb}</em> is the RDB file name.</p>
<p id="dcs-migration-0312011__p57491718145020">If "Transfer finished with success." is displayed after the command is executed, the file is exported successfully.</p>
</li></ol>
</div>
<div class="section" id="dcs-migration-0312011__section715982193316"><h4 class="sectiontitle">Step 2: Exporting an RDB File</h4><div class="notice" id="dcs-migration-0312011__note17694182220346"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ol id="dcs-migration-0312011__ol837212813714"><li id="dcs-migration-0312011__li737213281179">Migrate data during off-peak hours.</li><li id="dcs-migration-0312011__li53721928875">When exporting Redis Cluster data, individually export the data of each node in the cluster, and then import the data node by node.</li></ol>
</div></div>
<p id="dcs-migration-0312011__p4810151843510">Run the following command to export the RDB file:</p>
<p id="dcs-migration-0312011__p87621845165017"><strong id="dcs-migration-0312011__b3974185419506">redis-cli -h <em id="dcs-migration-0312011__i31180255112">{source_redis_address}</em> -p 6379 -a <em id="dcs-migration-0312011__i25352263012">{password}</em> --rdb <em id="dcs-migration-0312011__i6747449619">{output.rdb}</em></strong></p>
<p id="dcs-migration-0312011__p1274325217213">If "Transfer finished with success." is displayed after the command is executed, the file is exported successfully.</p>
</div>
<div class="section" id="dcs-migration-0312011__section1146318206338"><h4 class="sectiontitle">Step 3: Uploading the RDB File to ECS</h4><ol id="dcs-migration-0312011__ol24089454211"><li id="dcs-migration-0312011__li4853142144220">To save the transmission time, compress the RDB file before transmission.</li><li id="dcs-migration-0312011__li84081442422">Upload the compressed file to ECS using an appropriate mode (for example, SFTP mode).</li></ol>
<div class="section" id="dcs-migration-0312011__section1146318206338"><h4 class="sectiontitle">Uploading the RDB File to ECS</h4><p id="dcs-migration-0312011__p35492597526">To save time, you are advised to compress the RDB file and upload it to ECS using an appropriate mode (for example, SFTP mode).</p>
<div class="note" id="dcs-migration-0312011__note22211616174320"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-0312012_p1922181634311">Ensure that the ECS has sufficient disk space for data file decompression, and can communicate with the DCS instance. Generally, the ECS and DCS instance are configured to belong to the same VPC and subnet, and the configured security group rules do not restrict access ports. For details about how to configure a security group, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
</div></div>
</div>
<div class="section" id="dcs-migration-0312011__section1458283216500"><h4 class="sectiontitle">Step 4: Importing Data</h4><p id="dcs-migration-0312011__p61091244194614">Use redis-shake to import data.</p>
<div class="section" id="dcs-migration-0312011__section1458283216500"><h4 class="sectiontitle">Importing Data</h4><p id="dcs-migration-0312011__p61091244194614">Use redis-shake to import data.</p>
<p id="dcs-migration-0312011__p1363992155616">It takes 4 to 10 seconds to import an RDB file of 1 million data (20 bytes per data segment) to a VPC.</p>
</div>
<div class="section" id="dcs-migration-0312011__section1762337185412"><h4 class="sectiontitle">Step 5: Verifying Migration</h4><p id="dcs-migration-0312011__p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-0312011__b6969444183810">info</strong> command to check whether the data has been successfully imported as required.</p>
<p id="dcs-migration-0312011__p1692631220146">If the data import fails, analyze the cause, modify the data import statement, run the <strong id="dcs-migration-0312011__b854265193819">flushall</strong> or <strong id="dcs-migration-0312011__b1354385114387">flushdb</strong> command to clear the cached data in the instance, and import the data again.</p>
</div>
<div class="section" id="dcs-migration-0312011__section12903941155218"><h4 class="sectiontitle">Efficiency of Data Export and Import</h4><p id="dcs-migration-0312011__p187251431124014">Compared with master/standby instances, single-node instances without data persistence configured require a longer time for export of an RDB file, because the RDB file is temporarily generated.</p>
<p id="dcs-migration-0312011__p106998316559">It takes 4s to 10s to import 1 million data records (20 bytes per data record) in a VPC.</p>
<div class="section" id="dcs-migration-0312011__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312011__dcs-migration-0312010_p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-0312011__dcs-migration-0312010_b4358102614910">info</strong> command to check whether the data has been successfully imported as required. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</p>
<p id="dcs-migration-0312011__dcs-migration-0312010_p1692631220146">If the import fails, check the procedure. If the import command is incorrect, run the <strong id="dcs-migration-0312011__dcs-migration-0312010_b4876205882515">flushall</strong> or <strong id="dcs-migration-0312011__dcs-migration-0312010_b7685714263">flushdb</strong> command to clear the cache data in the target instance, modify the import command, and try again.</p>
</div>
</div>
<div>

View File

@ -1,7 +1,7 @@
<a name="dcs-migration-0312017"></a><a name="dcs-migration-0312017"></a>
<h1 class="topictitle1">Can I Migrate Data from a Multi-DB Source Redis Instance to a Cluster DCS Redis Instance?</h1>
<div id="body8662426"><p id="dcs-migration-0312017__dcs-migration-0312017_0_p183615550231">A total of 256 DBs (DB 0 to DB 255) can be configured for a single-node or master/standby DCS instance.</p>
<div id="body8662426"><p id="dcs-migration-0312017__dcs-migration-0312017_0_p183615550231">A total of 256 DBs (DB 0 to DB 255) can be configured for a single-node, read/write splitting, or master/standby DCS instance.</p>
<ul id="dcs-migration-0312017__dcs-migration-0312017_0_ul176819611816"><li id="dcs-migration-0312017__dcs-migration-0312017_0_li14499576813">If the target is a cluster instance (a cluster instance has only one DB):<p id="dcs-migration-0312017__dcs-migration-0312017_0_p798851853220"><a name="dcs-migration-0312017__dcs-migration-0312017_0_li14499576813"></a><a name="dcs-migration-0312017_0_li14499576813"></a>Solutions:</p>
<ol id="dcs-migration-0312017__dcs-migration-0312017_0_ol1565813100333"><li id="dcs-migration-0312017__dcs-migration-0312017_0_li8658181018332">Combine different DBs in the source Redis instance into one DB.</li><li id="dcs-migration-0312017__dcs-migration-0312017_0_li106581610193316">Apply for multiple DCS instances.</li></ol>
<p id="dcs-migration-0312017__dcs-migration-0312017_0_p1469491414337">After the migration, the instance connection address and DB IDs change. In this case, modify the configurations for your services.</p>

View File

@ -2,7 +2,7 @@
<h1 class="topictitle1">How Can I Migrate Partial Data?</h1>
<div id="body8662426"><p id="dcs-migration-0312018__dcs-migration-0312018_0_p1393310107339">The online migration function provided on the console does not support migration of specified DBs. If you want to migrate <strong id="dcs-migration-0312018__dcs-migration-0312018_0_b186107475395">specified Redis DBs</strong>, use redis-shake to export or import the specified DBs.</p>
<p id="dcs-migration-0312018__dcs-migration-0312018_0_p5807015155014">For details about how to install and use redis-shake, see <a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake</a> and <a href="https://github.com/alibaba/RedisShake/blob/release-v2.1.1-20210903/conf/redis-shake.conf" target="_blank" rel="noopener noreferrer">redis-shake configuration instructions</a>.</p>
<p id="dcs-migration-0312018__dcs-migration-0312018_0_p5807015155014">For details about how to install and use redis-shake, see <a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake (Online)</a> and <a href="https://github.com/alibaba/RedisShake/blob/release-v2.1.1-20210903/conf/redis-shake.conf" target="_blank" rel="noopener noreferrer">redis-shake configuration instructions</a>.</p>
<p id="dcs-migration-0312018__dcs-migration-0312018_0_p11230110211">To migrate <strong id="dcs-migration-0312018__dcs-migration-0312018_0_b20419998586">specified data</strong>, develop a script to obtain the specified keys and data and then import the data to a DCS instance.</p>
</div>
<div>

View File

@ -2,8 +2,8 @@
<h1 class="topictitle1">Overview</h1>
<div id="body39451090"><p id="dcs-migration-0713001__p5944111105818">Due to variations of Redis application environments and scenarios, migration solutions must be detailed to address actual requirements. The time required for data migration is related to the data volume, the location of source Redis data, and the network bandwidth. Record and evaluate the duration during the rehearsal phase.</p>
<p id="dcs-migration-0713001__p17957821205319">When migrating data, analyze the cache commands (reference: <a href="dcs-pd-200312003.html">Command Compatibility</a>) used by your service systems and verify the commands one by one during the rehearsal phase. If necessary, contact technical support.</p>
<div class="notice" id="dcs-migration-0713001__note1882733195414"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="dcs-migration-0713001__ul4720440175418"><li id="dcs-migration-0713001__li1872174020545">Data migration is an important and stringent task requiring high accuracy and timeliness. It varies depending on specific services and operation environments.</li><li id="dcs-migration-0713001__li1772124005414">Cases provided in this document are for reference only. Consider your service scenarios and requirements during actual migration.</li><li id="dcs-migration-0713001__li5721154015541">Some commands in this document contain instance passwords, which will be recorded in the operating system (OS). Ensure that the passwords are not disclosed and clear operation records in a timely manner.</li></ul>
<p id="dcs-migration-0713001__p17957821205319">When migrating data, analyze the cache commands (reference: <a href="dcs-pd-200312003.html">Command Compatibility</a>) used by your service systems and verify the commands one by one during the rehearsal phase. Contact customer service as needed.</p>
<div class="notice" id="dcs-migration-0713001__note1882733195414"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="dcs-migration-0713001__ul4720440175418"><li id="dcs-migration-0713001__li1872174020545">Data migration is important and stringent, requiring high accuracy and timeliness. It varies depending on specific services and operation environments.</li><li id="dcs-migration-0713001__li1772124005414">Cases provided in this document are for reference only. Consider your service scenarios and requirements during actual migration.</li><li id="dcs-migration-0713001__li5721154015541">Some commands in this document contain instance passwords, which will be recorded in the operating system (OS). Ensure that the passwords are not disclosed and clear operation records in a timely manner.</li></ul>
</div></div>
</div>
<div>

View File

@ -1,25 +1,27 @@
<a name="dcs-migration-090626001_0"></a><a name="dcs-migration-090626001_0"></a>
<h1 class="topictitle1">Online Migration with Rump</h1>
<div id="body1553053744074"><div class="section" id="dcs-migration-090626001_0__section1193154363718"><h4 class="sectiontitle">Background</h4><ul id="dcs-migration-090626001_0__ul197931754983"><li id="dcs-migration-090626001_0__li8793754683">Redis instances provided by some cloud service vendors do not allow <strong id="dcs-migration-090626001_0__b08001246111314">SLAVEOF</strong>, <strong id="dcs-migration-090626001_0__b158338513131">BGSAVE</strong>, and <strong id="dcs-migration-090626001_0__b19500157101316">PSYNC</strong> commands to be issued from Redis clients. As a result, redis-cli, redis-shake, and other tools cannot be used to export data.</li><li id="dcs-migration-090626001_0__li1079318542817">Using the <strong id="dcs-migration-090626001_0__b3616359158">KEYS</strong> command may block Redis.</li><li id="dcs-migration-090626001_0__li87935543815">Cloud service vendors usually only support downloading backup files. This method is suitable only for offline migration, featuring longer service interruption.</li></ul>
</div>
<p id="dcs-migration-090626001_0__p340635335419"><a href="https://github.com/stickermule/rump" target="_blank" rel="noopener noreferrer">Rump</a> is an open-source tool designed for migrating Redis data online. It supports migration between DBs of the same instance and between DBs of different instances.</p>
<h1 class="topictitle1">Online Migration from Another Cloud Using Rump</h1>
<div id="body1553053744074"><p id="dcs-migration-090626001_0__p17691161254412">Redis instances provided by some cloud service vendors do not allow <strong id="dcs-migration-090626001_0__b15161719161">SLAVEOF</strong>, <strong id="dcs-migration-090626001_0__b1160191463">BGSAVE</strong>, and <strong id="dcs-migration-090626001_0__b131616190617">PSYNC</strong> commands to be issued from Redis clients. As a result, redis-cli, redis-shake, and other tools cannot be used to export data. Using the <strong id="dcs-migration-090626001_0__b137918231766">KEYS</strong> command may block Redis. Cloud service vendors usually only support downloading backup files. This method is suitable only for offline migration, featuring longer service interruption.</p>
<p id="dcs-migration-090626001_0__p340635335419"><a href="https://github.com/stickermule/rump" target="_blank" rel="noopener noreferrer">Rump</a> is an open-source tool designed for migrating Redis data online. It supports migration between DBs of the same instance and between DBs of different instances. This section describes how to migrate another cloud to DCS by using Rump.</p>
<div class="section" id="dcs-migration-090626001_0__section15112341151110"><h4 class="sectiontitle">Migration Principles</h4><p id="dcs-migration-090626001_0__p33298338591">Rump uses the <strong id="dcs-migration-090626001_0__b13314192191916">SCAN</strong> command to acquire keys and the <strong id="dcs-migration-090626001_0__b1270819313207">DUMP</strong>/<strong id="dcs-migration-090626001_0__b470393712201">RESTORE</strong> command to get or set values.</p>
<p id="dcs-migration-090626001_0__p129101042181112">Featuring time complexity O(1), <strong id="dcs-migration-090626001_0__b15962155152218">SCAN</strong> is capable of quickly getting all keys. <strong id="dcs-migration-090626001_0__b1165910168233">DUMP</strong>/<strong id="dcs-migration-090626001_0__b97226143238">RESTORE</strong> is used to read/write values independent from the key type.</p>
<p id="dcs-migration-090626001_0__p0614184155815">Rump brings the following benefits:</p>
<ul id="dcs-migration-090626001_0__ul1261494185811"><li id="dcs-migration-090626001_0__li961454205818">The <strong id="dcs-migration-090626001_0__b1370720413335">SCAN</strong> command replaces the <strong id="dcs-migration-090626001_0__b195093219331">KEYS</strong> command to avoid blocking Redis.</li><li id="dcs-migration-090626001_0__li561664115820">Any type of data can be migrated.</li><li id="dcs-migration-090626001_0__li16162418580"><strong id="dcs-migration-090626001_0__b498810213348">SCAN</strong> and <strong id="dcs-migration-090626001_0__b9904327153415">DUMP</strong>/<strong id="dcs-migration-090626001_0__b1429420264343">RESTORE</strong> operations are pipelined, improving the network efficiency during data migration.</li><li id="dcs-migration-090626001_0__li116161447585">No temporary file is involved, saving disk space.</li><li id="dcs-migration-090626001_0__li11879125218371">Buffered channels are used to optimize performance of the source server.</li></ul>
<div class="notice" id="dcs-migration-090626001_0__note19814113120278"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ol id="dcs-migration-090626001_0__ol834219512587"><li id="dcs-migration-090626001_0__li193422565817">To cluster DCS instances, you cannot use Rump. Instead, use redis-shake or redis-cli.</li><li id="dcs-migration-090626001_0__li0342205105810">To prevent migration command resolution errors, do not include special characters (#@:) in the instance password.</li><li id="dcs-migration-090626001_0__li15450596504">Stop the service before migrating data. If data is kept being written in during the migration, some keys might be lost.</li></ol>
</div></div>
</div>
<div class="section" id="dcs-migration-090626001_0__section316216494313"><h4 class="sectiontitle">Step 1: Installing Rump</h4><ol id="dcs-migration-090626001_0__ol16364713164013"><li id="dcs-migration-090626001_0__li18365161374017">Download <a href="https://github.com/stickermule/rump/releases" target="_blank" rel="noopener noreferrer">Rump (release version)</a>.<p id="dcs-migration-090626001_0__p098152013138">On 64-bit Linux, run the following command:</p>
<p id="dcs-migration-090626001_0__p69815203130"><strong id="dcs-migration-090626001_0__b15981520191311">wget https://github.com/stickermule/rump/releases/download/0.0.3/rump-0.0.3-linux-amd64;</strong></p>
</li><li id="dcs-migration-090626001_0__li104653242407">After decompression, run the following commands to add the execution permission:<p id="dcs-migration-090626001_0__p7151991298"><a name="dcs-migration-090626001_0__li104653242407"></a><a name="li104653242407"></a><strong id="dcs-migration-090626001_0__b1350234701418">mv rump-0.0.3-linux-amd64 rump;</strong></p>
<p id="dcs-migration-090626001_0__p636011226414"><strong id="dcs-migration-090626001_0__b95041947141415">chmod +x rump;</strong></p>
<div class="section" id="dcs-migration-090626001_0__section14963195563714"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-090626001_0__ul32238126382"><li id="dcs-migration-090626001_0__li1822313129387">The target cannot be a cluster DCS instance.</li><li id="dcs-migration-090626001_0__li5223512123818">To prevent migration command resolution errors, do not include special characters (#@:) in the instance password.</li><li id="dcs-migration-090626001_0__li12231812133816">Before data migration, suspend your services. If data is kept being written in during the migration, some keys might be lost.</li><li id="dcs-migration-090626001_0__li921571317245">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
</div>
<div class="section" id="dcs-migration-090626001_0__section9563123842112"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-090626001_0__ul14456192935418"><li id="dcs-migration-090626001_0__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-090626001_0__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li><li id="dcs-migration-090626001_0__li128275278226">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migration-090626001_0__dcs-migrate-demo02_i344871153104631"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>.<p id="dcs-migration-090626001_0__dcs-migrate-demo02_p138084281778">Select the same VPC, subnet, and security group as the DCS Redis Cluster instance, and bind EIPs to the ECS.</p>
</li></ul>
</div>
<div class="section" id="dcs-migration-090626001_0__section316216494313"><h4 class="sectiontitle">Installing the Rump</h4><ol id="dcs-migration-090626001_0__ol16364713164013"><li id="dcs-migration-090626001_0__li13425165212590">Log in to the ECS.</li><li id="dcs-migration-090626001_0__li18365161374017">Download <a href="https://github.com/stickermule/rump/releases" target="_blank" rel="noopener noreferrer">Rump (release version)</a>.<p id="dcs-migration-090626001_0__p098152013138">On 64-bit Linux, run the following command:</p>
<pre class="screen" id="dcs-migration-090626001_0__screen572792410238">wget https://github.com/stickermule/rump/releases/download/0.0.3/rump-0.0.3-linux-amd64;</pre>
</li><li id="dcs-migration-090626001_0__li104653242407">After decompression, run the following commands to add the execution permission:<pre class="screen" id="dcs-migration-090626001_0__screen1735317032411">mv rump-0.0.3-linux-amd64 rump;
chmod +x rump;</pre>
</li></ol>
</div>
<div class="section" id="dcs-migration-090626001_0__section141871352314"><h4 class="sectiontitle">Step 2: Migrating Data</h4><p id="dcs-migration-090626001_0__p19624145315547"><strong id="dcs-migration-090626001_0__b5624185375417">rump</strong> <strong id="dcs-migration-090626001_0__b062413536545">-from</strong> {<em id="dcs-migration-090626001_0__i116249532547">source_redis_address</em>} <strong id="dcs-migration-090626001_0__b17624553165410">-to</strong> {<em id="dcs-migration-090626001_0__i862455317544">target_redis_address</em>}</p>
<p id="dcs-migration-090626001_0__p1387819484470">Parameter/Option description:</p>
<ul id="dcs-migration-090626001_0__ul1329418594559"><li id="dcs-migration-090626001_0__li729495905515"><em id="dcs-migration-090626001_0__i15359164216555">{source_redis_address}</em><p id="dcs-migration-090626001_0__p18240112751315">Source Redis instance address, in the format of redis://[user:password@]host:port/db. <strong id="dcs-migration-090626001_0__b1443491331614">[user:password@]</strong> is optional. If the instance is accessed in password-protected mode, you must specify the password in the RFC 3986 format. <strong id="dcs-migration-090626001_0__b1362925162011">user</strong> can be omitted, but the colon (:) cannot be omitted. For example, the address may be <strong id="dcs-migration-090626001_0__b1328114243813">redis://:mypassword@192.168.0.45:6379/1</strong>.</p>
<div class="section" id="dcs-migration-090626001_0__section141871352314"><h4 class="sectiontitle">Migrating Data</h4><p id="dcs-migration-090626001_0__p108479412467">Run the following command to migrate data:</p>
<pre class="screen" id="dcs-migration-090626001_0__screen13983121614716">rump -from {source_redis_address} -to {target_redis_address}</pre>
<ul id="dcs-migration-090626001_0__ul1329418594559"><li id="dcs-migration-090626001_0__li729495905515"><em id="dcs-migration-090626001_0__i145831453099">{source_redis_address}</em><p id="dcs-migration-090626001_0__p18240112751315">Source Redis instance address, in the format of redis://[user:password@]host:port/db. <strong id="dcs-migration-090626001_0__b1443491331614">[user:password@]</strong> is optional. If the instance is accessed in password-protected mode, you must specify the password in the RFC 3986 format. <strong id="dcs-migration-090626001_0__b1362925162011">user</strong> can be omitted, but the colon (:) cannot be omitted. For example, the address may be <strong id="dcs-migration-090626001_0__b1328114243813">redis://:mypassword@192.168.0.45:6379/1</strong>.</p>
<p id="dcs-migration-090626001_0__p6431942563"><strong id="dcs-migration-090626001_0__b19217515151510">db</strong> is the sequence number of the database. If it is not specified, the default value is 0.</p>
</li><li id="dcs-migration-090626001_0__li112941859115514">{<em id="dcs-migration-090626001_0__i1792821155512">target_redis_address</em>}<p id="dcs-migration-090626001_0__p5557561916">Address of the target Redis instance, in the same format as the source.</p>
<p id="dcs-migration-090626001_0__p161515242213">In the following example, data in DB0 of the source Redis is migrated to the target Redis whose connection address is 192.168.0.153. <strong id="dcs-migration-090626001_0__b13588039124010">******</strong> stands for the password.</p>
@ -31,7 +33,7 @@
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migrating Redis Data from Another Cloud to DCS</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migration from Another Cloud</a></div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More