forked from docs/doc-exports
Reviewed-by: Liudmila Denisova <ldenisov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
38 lines
7.7 KiB
HTML
38 lines
7.7 KiB
HTML
<a name="CacheMasterSlave"></a><a name="CacheMasterSlave"></a>
|
|
|
|
<h1 class="topictitle1">Master/Standby Redis</h1>
|
|
<div id="body1600250974776"><p id="CacheMasterSlave__p312320720233">This section describes master/standby DCS Redis instances.</p>
|
|
<div class="note" id="CacheMasterSlave__note67021744211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p157220441816">The major version cannot be upgraded. For example, a master/standby DCS Redis 4.0 instance cannot be upgraded to a master/standby DCS Redis 5.0 one. If your service requires the features of higher Redis versions, create a DCS Redis instance of a higher version and then migrate data from the old instance to the new one.</p>
|
|
</div></div>
|
|
<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__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>
|
|
<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__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 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>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-pd-200312001.html">DCS Instance Types</a></div>
|
|
</div>
|
|
</div>
|
|
|