forked from docs/doc-exports
Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
89 lines
8.1 KiB
HTML
89 lines
8.1 KiB
HTML
<a name="CacheProxy"></a><a name="CacheProxy"></a>
|
|
|
|
<h1 class="topictitle1">Redis Cluster</h1>
|
|
<div id="body1600250976541"><p id="CacheProxy__p4126104312716">Redis Cluster DCS instances use the native distributed implementation of Redis. Redis Cluster instances have the following features:</p>
|
|
<ul id="CacheProxy__ul1964019348598"><li id="CacheProxy__li14640193411596">They are compatible with native Redis clusters.</li><li id="CacheProxy__li1364018348592">They inherit the smart client design from Redis.</li><li id="CacheProxy__li864073411598">They deliver many times higher performance than master/standby instances.</li></ul>
|
|
<div class="section" id="CacheProxy__section880163191618"><h4 class="sectiontitle">Redis Cluster</h4><p id="CacheProxy__p1977021012338">The Redis Cluster instance type provided by DCS is compatible with the <a href="https://redis.io/topics/cluster-spec" target="_blank" rel="noopener noreferrer">native Redis Cluster</a>, which uses smart clients and a distributed architecture to perform sharding.</p>
|
|
<p id="CacheProxy__p164954315218"><a href="#CacheProxy__table3552324111">Table 1</a> lists the shard specification for different instance specifications.</p>
|
|
<p id="CacheProxy__p17223016111"><strong id="CacheProxy__b1157017616611">Size of a shard = Instance specification/Number of shards</strong>. For example, if a 48 GB instance has 6 shards, the size of each shard is 48 GB/6 = 8 GB.</p>
|
|
|
|
<div class="tablenoborder"><a name="CacheProxy__table3552324111"></a><a name="table3552324111"></a><table cellpadding="4" cellspacing="0" summary="" id="CacheProxy__table3552324111" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Specifications of Redis Cluster DCS instances</caption><thead align="left"><tr id="CacheProxy__row65521623113"><th align="left" class="cellrowborder" valign="top" width="44.12%" id="mcps1.3.3.5.2.3.1.1"><p id="CacheProxy__p1955210211118">Total Memory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.879999999999995%" id="mcps1.3.3.5.2.3.1.2"><p id="CacheProxy__p04843421456">Shards</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CacheProxy__row155314218115"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p491514405611">4 GB/8 GB/16 GB/24 GB/32 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p207903579620">3</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row1731117227614"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p99166401567">48 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p1779095710616">6</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row113126221669"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p891617401862">64 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p97906571561">8</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row10313162217619"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p19161140362">96 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p879011574611">12</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row93136221568"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p15916164015619">128 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p1679065712610">16</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row123147221965"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p1591613409619">192 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p137910577616">24</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row1297218281269"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p4916140966">256 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p87911957860">32</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row14566154853519"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p356774883515">384 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p10567548133513">48</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row8567124814359"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p14311185913513">512 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p20567184883518">64</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row7567114814356"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p967654163618">768 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p13568194813354">96</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CacheProxy__row1656844810350"><td class="cellrowborder" valign="top" width="44.12%" headers="mcps1.3.3.5.2.3.1.1 "><p id="CacheProxy__p209424813617">1024 GB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.879999999999995%" headers="mcps1.3.3.5.2.3.1.2 "><p id="CacheProxy__p155682483350">128</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="CacheProxy__ul123731121185515"><li id="CacheProxy__li3970143612556">Distributed architecture<p id="CacheProxy__p6111153985512"><a name="CacheProxy__li3970143612556"></a><a name="li3970143612556"></a>Any node in a Redis Cluster can receive requests. Received requests are then redirected to the right node for processing. Each node consists of a subset of one master and one (by default) or multiple replicas. The master or replica roles are determined through an election algorithm.</p>
|
|
<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>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-pd-200312001.html">DCS Instance Types</a></div>
|
|
</div>
|
|
</div>
|
|
|