{"id":34174,"date":"2023-06-10T17:48:47","date_gmt":"2022-11-21T07:49:26","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/"},"modified":"2024-04-30T08:13:41","modified_gmt":"2024-04-30T00:13:41","slug":"%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/","title":{"rendered":"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>\u7531\u4e8e\u4e0d\u592a\u7406\u89e3\u5f53Redis Cluster\u53d1\u751f\u6545\u969c\u8f6c\u79fb\u65f6\u5982\u4f55\u9009\u62e9\u4e0b\u4e00\u4e2a\u4e3b\u8282\u70b9\u526f\u672c\uff0c\u56e0\u6b64\u6211\u5728\u9605\u8bfb\u300a\u5b9e\u8df5Redis\u5165\u95e8\u300b\u65f6\uff0c\u5c1d\u8bd5\u5728\u672c\u5730\u8fd0\u884c\u5e76\u786e\u8ba4\u5176\u884c\u4e3a\u3002<\/p>\n<p>\u7531\u4e8e\u6211\u81ea\u5df1\u5bf9\u8bb8\u591a\u4e8b\u60c5\u4ecd\u7136\u7406\u89e3\u6709\u9650\uff0c\u6240\u4ee5\u5982\u679c\u6709\u5730\u65b9\u89e3\u91ca\u9519\u8bef\uff0c\u8bf7\u60a8\u6279\u8bc4\u6307\u6b63\uff0c\u6211\u5c06\u4e0d\u80dc\u611f\u6fc0?\u200d\u2642\ufe0f<\/p>\n<h1>\u6784\u5efa Redis \u96c6\u7fa4<\/h1>\n<h3>\u542f\u52a8\u5bb9\u5668<\/h3>\n<p>\u53ef\u4ee5\u4f7f\u7528docker-compose\u3002<br \/>\n\u5728conf\u6587\u4ef6\u4e2d\uff0c\u53ea\u6307\u5b9a\u4e86\u8c03\u8bd5\u547d\u4ee4\u548c\u4f7f\u7528\u96c6\u7fa4\u6a21\u5f0f\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"na\">version<\/span><span class=\"pi\">:<\/span> <span class=\"s1\">'<\/span><span class=\"s\">3'<\/span>\r\n\r\n<span class=\"na\">services<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">node<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"na\">image<\/span><span class=\"pi\">:<\/span> <span class=\"s\">redis:latest<\/span>\r\n    <span class=\"na\">ports<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"pi\">-<\/span> <span class=\"m\">6379<\/span>\r\n    <span class=\"na\">volumes<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"pi\">-<\/span> <span class=\"s\">$PWD\/redis.conf:\/usr\/local\/etc\/redis\/redis.conf<\/span>\r\n    <span class=\"na\">command<\/span><span class=\"pi\">:<\/span> <span class=\"s\">redis-server \/usr\/local\/etc\/redis\/redis.conf<\/span>\r\n    <span class=\"na\">networks<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"pi\">-<\/span> <span class=\"s\">redis_network<\/span>\r\n\r\n<span class=\"na\">networks<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">redis_network<\/span><span class=\"pi\">:<\/span>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>enable-debug-command yes\r\ncluster-enabled yes\r\n<\/code><\/pre>\n<p>\u6211\u5c06\u542f\u52a8\u4e00\u4e2a\u5bb9\u5668\u3002<br \/>\n\u8fd9\u6b21\u6211\u4eec\u9009\u62e9\u4ee5master3\u3001replica3\u7684\u914d\u7f6e\u6765\u542f\u52a86\u4e2a\u5bb9\u5668\uff0c\u6240\u4ee5\u6211\u4f7f\u7528\u4e86&#8211;scale\u9009\u9879\u3002<br \/>\n\u6211\u60f3\u5b9e\u65f6\u76d1\u63a7\u65e5\u5fd7\uff0c\u6240\u4ee5\u6211\u9009\u62e9\u4ee5\u9644\u52a0\u6a21\u5f0f\u542f\u52a8\uff0c\u540e\u7eed\u7684\u5904\u7406\u5c06\u5728\u53e6\u4e00\u4e2a\u7ec8\u7aef\u4e2d\u8fdb\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker-compose up --scale node=6\r\n<\/code><\/pre>\n<details>\u30ed\u30b0<br \/>\nCreating network &#8220;test-redis-cluster_redis_network&#8221; with the default driver<br \/>\nCreating test-redis-cluster_node_1 &#8230; done<br \/>\nCreating test-redis-cluster_node_2 &#8230; done<br \/>\nCreating test-redis-cluster_node_3 &#8230; done<br \/>\nCreating test-redis-cluster_node_4 &#8230; done<br \/>\nCreating test-redis-cluster_node_5 &#8230; done<br \/>\nCreating test-redis-cluster_node_6 &#8230; done<br \/>\nAttaching to test-redis-cluster_node_6, test-redis-cluster_node_5, test-redis-cluster_node_3, test-redis-cluster_node_4, test-redis-cluster_node_1, test-redis-cluster_node_2<br \/>\nnode_1 | 1:C 06 Sep 2023 08:37:17.267 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo<br \/>\nnode_1 | 1:C 06 Sep 2023 08:37:17.267 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started<br \/>\nnode_1 | 1:C 06 Sep 2023 08:37:17.267 # Configuration loaded<br \/>\nnode_3 | 1:C 06 Sep 2023 08:37:17.235 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo<br \/>\nnode_3 | 1:C 06 Sep 2023 08:37:17.235 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started<br \/>\nnode_3 | 1:C 06 Sep 2023 08:37:17.235 # Configuration loaded<br \/>\nnode_3 | 1:M 06 Sep 2023 08:37:17.237 * monotonic clock: POSIX clock_gettime<br \/>\nnode_1 | 1:M 06 Sep 2023 08:37:17.269 * monotonic clock: POSIX clock_gettime<br \/>\nnode_1 | 1:M 06 Sep 2023 08:37:17.269 * No cluster configuration found, I&#8217;m b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602<br \/>\nnode_5 | 1:C 06 Sep 2023 08:37:17.243 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo<br \/>\nnode_5 | 1:C 06 Sep 2023 08:37:17.243 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started<br \/>\nnode_5 | 1:C 06 Sep 2023 08:37:17.243 # Configuration loaded<br \/>\nnode_5 | 1:M 06 Sep 2023 08:37:17.243 * monotonic clock: POSIX clock_gettime<br \/>\nnode_5 | 1:M 06 Sep 2023 08:37:17.243 * No cluster configuration found, I&#8217;m cc97431d2343a3ca7a57e6d6b4da6d37bb569198<br \/>\nnode_4 | 1:C 06 Sep 2023 08:37:17.275 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo<br \/>\nnode_1 | 1:M 06 Sep 2023 08:37:17.274 * Running mode=cluster, port=6379.<br \/>\nnode_1 | 1:M 06 Sep 2023 08:37:17.274 # Server initialized<br \/>\nnode_3 | 1:M 06 Sep 2023 08:37:17.239 * No cluster configuration found, I&#8217;m a6049751e651642f261095950d469a6b0cb8e611<br \/>\nnode_3 | 1:M 06 Sep 2023 08:37:17.244 * Running mode=cluster, port=6379.<br \/>\nnode_3 | 1:M 06 Sep 2023 08:37:17.244 # Server initialized<br \/>\nnode_3 | 1:M 06 Sep 2023 08:37:17.246 * Ready to accept connections<br \/>\nnode_6 | 1:C 06 Sep 2023 08:37:17.189 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo<br \/>\nnode_6 | 1:C 06 Sep 2023 08:37:17.189 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started<br \/>\nnode_6 | 1:C 06 Sep 2023 08:37:17.189 # Configuration loaded<br \/>\nnode_4 | 1:C 06 Sep 2023 08:37:17.275 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started<br \/>\nnode_4 | 1:C 06 Sep 2023 08:37:17.275 # Configuration loaded<br \/>\nnode_6 | 1:M 06 Sep 2023 08:37:17.190 * monotonic clock: POSIX clock_gettime<br \/>\nnode_6 | 1:M 06 Sep 2023 08:37:17.191 * No cluster configuration found, I&#8217;m 8fe04f39df4e6b453a395da23f25bdc060559847<br \/>\nnode_6 | 1:M 06 Sep 2023 08:37:17.195 * Running mode=cluster, port=6379.<br \/>\nnode_4 | 1:M 06 Sep 2023 08:37:17.276 * monotonic clock: POSIX clock_gettime<br \/>\nnode_4 | 1:M 06 Sep 2023 08:37:17.277 * No cluster configuration found, I&#8217;m 382223b947b401c45495a01c254e466630750c80<br \/>\nnode_5 | 1:M 06 Sep 2023 08:37:17.247 * Running mode=cluster, port=6379.<br \/>\nnode_5 | 1:M 06 Sep 2023 08:37:17.247 # Server initialized<br \/>\nnode_6 | 1:M 06 Sep 2023 08:37:17.195 # Server initialized<br \/>\nnode_6 | 1:M 06 Sep 2023 08:37:17.197 * Ready to accept connections<br \/>\nnode_1 | 1:M 06 Sep 2023 08:37:17.277 * Ready to accept connections<br \/>\nnode_5 | 1:M 06 Sep 2023 08:37:17.248 * Ready to accept connections<br \/>\nnode_4 | 1:M 06 Sep 2023 08:37:17.279 * Running mode=cluster, port=6379.<br \/>\nnode_4 | 1:M 06 Sep 2023 08:37:17.280 # Server initialized<br \/>\nnode_4 | 1:M 06 Sep 2023 08:37:17.282 * Ready to accept connections<br \/>\nnode_2 | 1:C 06 Sep 2023 08:37:17.283 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo<br \/>\nnode_2 | 1:C 06 Sep 2023 08:37:17.283 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started<br \/>\nnode_2 | 1:C 06 Sep 2023 08:37:17.283 # Configuration loaded<br \/>\nnode_2 | 1:M 06 Sep 2023 08:37:17.284 * monotonic clock: POSIX clock_gettime<br \/>\nnode_2 | 1:M 06 Sep 2023 08:37:17.285 * No cluster configuration found, I&#8217;m bf59ab9a08f7c39bceaaec562acfc2ca90f84621<br \/>\nnode_2 | 1:M 06 Sep 2023 08:37:17.288 * Running mode=cluster, port=6379.<br \/>\nnode_2 | 1:M 06 Sep 2023 08:37:17.288 # Server initialized<br \/>\nnode_2 | 1:M 06 Sep 2023 08:37:17.292 * Ready to accept connections<\/details>\n<h3>\u521b\u5efaRedis\u96c6\u7fa4<\/h3>\n<p>\u5efa\u7acb Redis Cluster\u3002<br \/>\n\u4f5c\u4e3a\u524d\u5904\u7406\uff0c\u5c06\u6bcf\u4e2a\u8282\u70b9\u7684 IP \u5b58\u5165\u53d8\u91cf\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>$ NODES=`docker network inspect test-redis-cluster_redis_network | jq -r '.[0].Containers | .[].IPv4Address' | sed -e 's\/\\\/16\/:6379 \/g' | sed -e ':a' -e 'N' -e '$!ba' -e 's\/\\n\/\/g'`\r\n\r\n$ echo $NODES\r\n172.27.0.7:6379 172.27.0.4:6379 172.27.0.5:6379 172.27.0.6:6379 172.27.0.2:6379 172.27.0.3:6379 \r\n\r\n$ docker-compose exec node bash -c \"redis-cli --cluster create ${NODES} --cluster-replicas 1\"\r\n<\/code><\/pre>\n<details>\u30ed\u30b0<br \/>\n&gt;&gt;&gt; Performing hash slots allocation on 6 nodes&#8230;<br \/>\nMaster[0] -&gt; Slots 0 &#8211; 5460<br \/>\nMaster[1] -&gt; Slots 5461 &#8211; 10922<br \/>\nMaster[2] -&gt; Slots 10923 &#8211; 16383<br \/>\nAdding replica 172.27.0.2:6379 to 172.27.0.7:6379<br \/>\nAdding replica 172.27.0.3:6379 to 172.27.0.4:6379<br \/>\nAdding replica 172.27.0.6:6379 to 172.27.0.5:6379<br \/>\nM: b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602 172.27.0.7:6379<br \/>\nslots:[0-5460] (5461 slots) master<br \/>\nM: a6049751e651642f261095950d469a6b0cb8e611 172.27.0.4:6379<br \/>\nslots:[5461-10922] (5462 slots) master<br \/>\nM: 382223b947b401c45495a01c254e466630750c80 172.27.0.5:6379<br \/>\nslots:[10923-16383] (5461 slots) master<br \/>\nS: bf59ab9a08f7c39bceaaec562acfc2ca90f84621 172.27.0.6:6379<br \/>\nreplicates 382223b947b401c45495a01c254e466630750c80<br \/>\nS: 8fe04f39df4e6b453a395da23f25bdc060559847 172.27.0.2:6379<br \/>\nreplicates b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602<br \/>\nS: cc97431d2343a3ca7a57e6d6b4da6d37bb569198 172.27.0.3:6379<br \/>\nreplicates a6049751e651642f261095950d469a6b0cb8e611<br \/>\nCan I set the above configuration? (type &#8216;yes&#8217; to accept): yes<br \/>\n&gt;&gt;&gt; Nodes configuration updated<br \/>\n&gt;&gt;&gt; Assign a different config epoch to each node<br \/>\n&gt;&gt;&gt; Sending CLUSTER MEET messages to join the cluster<br \/>\nWaiting for the cluster to join&gt;&gt;&gt; Performing Cluster Check (using node 172.27.0.7:6379)<br \/>\nM: b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602 172.27.0.7:6379<br \/>\nslots:[0-5460] (5461 slots) master<br \/>\n1 additional replica(s)<br \/>\nS: 8fe04f39df4e6b453a395da23f25bdc060559847 172.27.0.2:6379<br \/>\nslots: (0 slots) slave<br \/>\nreplicates b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602<br \/>\nS: bf59ab9a08f7c39bceaaec562acfc2ca90f84621 172.27.0.6:6379<br \/>\nslots: (0 slots) slave<br \/>\nreplicates 382223b947b401c45495a01c254e466630750c80<br \/>\nS: cc97431d2343a3ca7a57e6d6b4da6d37bb569198 172.27.0.3:6379<br \/>\nslots: (0 slots) slave<br \/>\nreplicates a6049751e651642f261095950d469a6b0cb8e611<br \/>\nM: 382223b947b401c45495a01c254e466630750c80 172.27.0.5:6379<br \/>\nslots:[10923-16383] (5461 slots) master<br \/>\n1 additional replica(s)<br \/>\nM: a6049751e651642f261095950d469a6b0cb8e611 172.27.0.4:6379<br \/>\nslots:[5461-10922] (5462 slots) master<br \/>\n1 additional replica(s)<br \/>\n[OK] All nodes agree about slots configuration.<br \/>\n&gt;&gt;&gt; Check for open slots&#8230;<br \/>\n&gt;&gt;&gt; Check slots coverage&#8230;<br \/>\n[OK] All 16384 slots covered.<\/p>\n<\/details>\n<p>\u4ece\u8fd9\u6bb5\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0cnode_1\uff08172.27.0.7\uff09\u4f5c\u4e3a\u4e3b\u8282\u70b9\uff0cnode_6\uff08172.27.0.2\uff09\u6210\u4e3a\u4e86\u526f\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code>M: b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602 172.27.0.7:6379\r\n   slots:[0-5460] (5461 slots) master\r\n   1 additional replica(s)\r\nS: 8fe04f39df4e6b453a395da23f25bdc060559847 172.27.0.2:6379\r\n   slots: (0 slots) slave\r\n   replicates b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602\r\n<\/code><\/pre>\n<p>\u5728\u9644\u52a0\u72b6\u6001\u7684\u7ec8\u7aef\u4e2d\uff0c\u4f1a\u8f93\u51fa\u4ee5\u4e0b\u7c7b\u578b\u7684\u65e5\u5fd7\u8bb0\u5f55\u3002<\/p>\n<details>\u30ed\u30b0<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:06.156 # configEpoch set to 1 via CLUSTER SET-CONFIG-EPOCH<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:06.156 # configEpoch set to 2 via CLUSTER SET-CONFIG-EPOCH<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:06.157 # configEpoch set to 3 via CLUSTER SET-CONFIG-EPOCH<br \/>\nnode_2 | 1:M 06 Sep 2023 08:39:06.157 # configEpoch set to 4 via CLUSTER SET-CONFIG-EPOCH<br \/>\nnode_6 | 1:M 06 Sep 2023 08:39:06.158 # configEpoch set to 5 via CLUSTER SET-CONFIG-EPOCH<br \/>\nnode_5 | 1:M 06 Sep 2023 08:39:06.158 # configEpoch set to 6 via CLUSTER SET-CONFIG-EPOCH<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:06.195 # IP address for this node updated to 172.27.0.7<br \/>\nnode_6 | 1:M 06 Sep 2023 08:39:06.297 # IP address for this node updated to 172.27.0.2<br \/>\nnode_2 | 1:M 06 Sep 2023 08:39:06.298 # IP address for this node updated to 172.27.0.6<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:06.298 # IP address for this node updated to 172.27.0.4<br \/>\nnode_5 | 1:M 06 Sep 2023 08:39:06.298 # IP address for this node updated to 172.27.0.3<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:06.298 # IP address for this node updated to 172.27.0.5<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.162 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.162 * Connecting to MASTER 172.27.0.5:6379<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.162 * MASTER &lt;-&gt; REPLICA sync started<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.162 # Cluster state changed: ok<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.162 * Non blocking connect for SYNC fired the event.<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.163 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.163 * Master replied to PING, replication can continue&#8230;<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:07.163 * Trying a partial resynchronization (request 412d504d4a874b33efa641ca6da7b420db87c1dc:1).<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.163 * Connecting to MASTER 172.27.0.7:6379<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.163 * MASTER &lt;-&gt; REPLICA sync started<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.163 # Cluster state changed: ok<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.163 * Non blocking connect for SYNC fired the event.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.164 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.164 * Connecting to MASTER 172.27.0.4:6379<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.164 * MASTER &lt;-&gt; REPLICA sync started<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.164 # Cluster state changed: ok<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:07.164 * Replica 172.27.0.6:6379 asks for synchronization<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.166 * Master replied to PING, replication can continue&#8230;<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:07.164 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for &#8216;412d504d4a874b33efa641ca6da7b420db87c1dc&#8217;, my replication IDs are &#8216;a0a4beddfcaf11abea7b7b5a05c8f6e8ce426d48&#8217; and &#8216;0000000000000000000000000000000000000000&#8217;)<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:07.164 * Replication backlog created, my new replication IDs are &#8217;40c42a17e28ff6e039c38f565c54f3ad4bb76881&#8242; and &#8216;0000000000000000000000000000000000000000&#8217;<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:07.164 * Delay next BGSAVE for diskless SYNC<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.164 * Non blocking connect for SYNC fired the event.<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:07.166 * Replica 172.27.0.2:6379 asks for synchronization<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:07.166 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for &#8216;9df651b1729a067c6cb6ef216e93ac3cbd3b23a1&#8217;, my replication IDs are &#8216;f9f16c0a4046bff27d18a0b7a78e959715e44180&#8217; and &#8216;0000000000000000000000000000000000000000&#8217;)<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:07.166 * Replication backlog created, my new replication IDs are &#8216;1d3c4b9e83fe1771fed2b03e6ce385f12ec9b614&#8217; and &#8216;0000000000000000000000000000000000000000&#8217;<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:07.166 * Delay next BGSAVE for diskless SYNC<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.166 * Master replied to PING, replication can continue&#8230;<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:07.166 * Trying a partial resynchronization (request 9df651b1729a067c6cb6ef216e93ac3cbd3b23a1:1).<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:07.167 * Replica 172.27.0.3:6379 asks for synchronization<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:07.167 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for &#8216;a185e6b510870587a61eb2d9d3d262c2c68e6623&#8217;, my replication IDs are &#8216;b2728e79267eedddf20198120262edee523fcab7&#8217; and &#8216;0000000000000000000000000000000000000000&#8217;)<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:07.167 * Replication backlog created, my new replication IDs are &#8217;50f8e3341e3ca47f153233cbc402cdb5cb31bf81&#8242; and &#8216;0000000000000000000000000000000000000000&#8217;<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:07.167 * Delay next BGSAVE for diskless SYNC<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:07.166 * Trying a partial resynchronization (request a185e6b510870587a61eb2d9d3d262c2c68e6623:1).<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:11.133 # Cluster state changed: ok<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:11.133 # Cluster state changed: ok<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:11.134 # Cluster state changed: ok<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:12.042 * Starting BGSAVE for SYNC with target: replicas sockets<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:12.042 * Starting BGSAVE for SYNC with target: replicas sockets<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.042 * Full resync from master: 50f8e3341e3ca47f153233cbc402cdb5cb31bf81:14<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:12.042 * Starting BGSAVE for SYNC with target: replicas sockets<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.042 * Full resync from master: 40c42a17e28ff6e039c38f565c54f3ad4bb76881:14<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.043 * Full resync from master: 1d3c4b9e83fe1771fed2b03e6ce385f12ec9b614:14<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:12.045 * Background RDB transfer started by pid 21<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:12.045 * Background RDB transfer started by pid 27<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:12.045 * Background RDB transfer started by pid 21<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: receiving streamed RDB from master with EOF to disk<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.047 * Discarding previously cached master state.<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: Flushing old data<br \/>\nnode_3 | 21:C 06 Sep 2023 08:39:12.047 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: receiving streamed RDB from master with EOF to disk<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.047 * Discarding previously cached master state.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: receiving streamed RDB from master with EOF to disk<br \/>\nnode_1 | 27:C 06 Sep 2023 08:39:12.047 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB<br \/>\nnode_4 | 21:C 06 Sep 2023 08:39:12.047 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:12.047 # Diskless rdb transfer, done reading from pipe, 1 replicas still up.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.048 * Discarding previously cached master state.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.048 * MASTER &lt;-&gt; REPLICA sync: Flushing old data<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: Flushing old data<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:12.047 # Diskless rdb transfer, done reading from pipe, 1 replicas still up.<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: Loading DB in memory<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.047 * MASTER &lt;-&gt; REPLICA sync: Loading DB in memory<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:12.047 # Diskless rdb transfer, done reading from pipe, 1 replicas still up.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.048 * MASTER &lt;-&gt; REPLICA sync: Loading DB in memory<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.052 * Loading RDB produced by version 7.0.11<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.052 * RDB age 0 seconds<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.052 * RDB memory usage when created 1.82 Mb<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.052 * Done loading RDB, keys loaded: 0, keys expired: 0.<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:12.052 * Background RDB transfer terminated with success<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:12.052 * Streamed RDB transfer with replica 172.27.0.2:6379 succeeded (socket). Waiting for REPLCONF ACK from slave to enable streaming<br \/>\nnode_1 | 1:M 06 Sep 2023 08:39:12.052 * Synchronization with replica 172.27.0.2:6379 succeeded<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.051 * Loading RDB produced by version 7.0.11<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.051 * RDB age 0 seconds<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.051 * RDB memory usage when created 1.78 Mb<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.051 * Done loading RDB, keys loaded: 0, keys expired: 0.<br \/>\nnode_6 | 1:S 06 Sep 2023 08:39:12.051 * MASTER &lt;-&gt; REPLICA sync: Finished with success<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:12.053 * Background RDB transfer terminated with success<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:12.053 * Streamed RDB transfer with replica 172.27.0.3:6379 succeeded (socket). Waiting for REPLCONF ACK from slave to enable streaming<br \/>\nnode_3 | 1:M 06 Sep 2023 08:39:12.053 * Synchronization with replica 172.27.0.3:6379 succeeded<br \/>\nnode_2 | 1:S 06 Sep 2023 08:39:12.052 * MASTER &lt;-&gt; REPLICA sync: Finished with success<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.053 * Loading RDB produced by version 7.0.11<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.053 * RDB age 0 seconds<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.053 * RDB memory usage when created 1.82 Mb<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.053 * Done loading RDB, keys loaded: 0, keys expired: 0.<br \/>\nnode_5 | 1:S 06 Sep 2023 08:39:12.053 * MASTER &lt;-&gt; REPLICA sync: Finished with success<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:12.053 * Background RDB transfer terminated with success<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:12.053 * Streamed RDB transfer with replica 172.27.0.6:6379 succeeded (socket). Waiting for REPLCONF ACK from slave to enable streaming<br \/>\nnode_4 | 1:M 06 Sep 2023 08:39:12.053 * Synchronization with replica 172.27.0.6:6379 succeeded<\/details>\n<h3>\u5e08\u5085\u4e0e\u590d\u5236\u54c1\u7684\u540c\u6b65<\/h3>\n<p>\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u8ba9\u590d\u5236\u54c1\u4e0e\u4e3b\u63a7\u8fdb\u884c\u540c\u6b65\uff0c\u5206\u522b\u662f\u5b8c\u5168\u540c\u6b65\u548c\u90e8\u5206\u540c\u6b65\u3002<\/p>\n<p>\u5b8c\u5168\u540c\u6b65\u662f\u6307\u5c06\u4e3b\u6570\u636e\u5e93\u7684\u6240\u6709\u6570\u636e\u8fdb\u884c\u8f6c\u50a8\u5e76\u4f20\u8f93\uff0c\u56e0\u6b64\u53ef\u4ee5\u5728\u4efb\u4f55\u65f6\u5019\u6267\u884c\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u7f51\u7edc\u5e26\u5bbd\u538b\u529b\u7b49\u6027\u80fd\u65b9\u9762\u7684\u95ee\u9898\u3002<\/p>\n<p>\u7531\u4e8e\u90e8\u5206\u540c\u6b65\u662f\u5728\u590d\u5236\u88ab\u65ad\u5f00\u7684\u8fc7\u7a0b\u4e2d\u4ec5\u540c\u6b65\u589e\u91cf\u6570\u636e\uff0c\u56e0\u6b64\u4e0e\u5b8c\u5168\u540c\u6b65\u76f8\u6bd4\uff0c\u540c\u6b65\u6570\u636e\u91cf\u8f83\u5c11\uff0c\u4f46\u5982\u679c\u590d\u5236\u56de\u6eaf\u65e5\u5fd7(\u4e3b\u670d\u52a1\u5668\u7684\u7f13\u51b2\u533a)\u4e0d\u5305\u542b\u526f\u672c\u7684\u504f\u79fb\u91cf\uff0c\u90a3\u4e48\u65e0\u6cd5\u8fdb\u884c\u540c\u6b65(\u4f8b\u5982\uff0c\u5728\u65ad\u5f00\u590d\u5236\u671f\u95f4\u5199\u5165\u4e86\u8d85\u8fc7\u56de\u6eaf\u65e5\u5fd7\u5927\u5c0f\u7684\u6570\u636e\u7b49)\u3002<\/p>\n<p>\u67e5\u770b\u9644\u52a0\u72b6\u6001\u7684\u7ec8\u7aef\u65e5\u5fd7\uff0c\u53ef\u4ee5\u770b\u5230node_6\uff08\u526f\u672c\uff09\u9996\u5148\u5411node_1\uff08\u4e3b\u8282\u70b9\uff09\u53d1\u9001\u4e86\u90e8\u5206\u540c\u6b65\u8bf7\u6c42\u3002<\/p>\n<pre class=\"post-pre\"><code>node_6  | 1:S 06 Sep 2023 08:39:07.163 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.\r\nnode_6  | 1:S 06 Sep 2023 08:39:07.163 * Connecting to MASTER 172.27.0.7:6379\r\nnode_6  | 1:S 06 Sep 2023 08:39:07.163 * MASTER &lt;-&gt; REPLICA sync started\r\nnode_6  | 1:S 06 Sep 2023 08:39:07.163 # Cluster state changed: ok\r\nnode_6  | 1:S 06 Sep 2023 08:39:07.163 * Non blocking connect for SYNC fired the event.\r\nnode_6  | 1:S 06 Sep 2023 08:39:07.166 * Master replied to PING, replication can continue...\r\nnode_6  | 1:S 06 Sep 2023 08:39:07.166 * Trying a partial resynchronization (request 9df651b1729a067c6cb6ef216e93ac3cbd3b23a1:1).\r\n<\/code><\/pre>\n<p>\u7136\u800c\uff0cnode_1\uff08\u4e3b\u8282\u70b9\uff09\u7531\u4e8e\u662f\u5168\u65b0\u521b\u5efa\u7684\uff0c\u81ea\u7136\u5728\u65e5\u5fd7\u4e2d\u4e0d\u4f1a\u6709\u4efb\u4f55\u526f\u672c\u7684\u504f\u79fb\u7b49\u5185\u5bb9\uff0c\u56e0\u6b64\u90e8\u5206\u540c\u6b65\u5931\u8d25\uff0c\u5c06\u6267\u884c\u5b8c\u5168\u540c\u6b65\u3002<\/p>\n<p>\u901a\u8fc7\u6d41RDB\u4f20\u8f93\uff0c\u526f\u672c172.27.0.2:6379\u6210\u529f(\u5957\u63a5\u5b57)\u3002\u53ef\u786e\u5b9a\u5df2\u5b8c\u5168\u540c\u6b65\u6210\u529f(172.27.0.2\u662fnode_6\u7684IP)\u3002<\/p>\n<pre class=\"post-pre\"><code>node_1  | 1:M 06 Sep 2023 08:39:07.166 * Replica 172.27.0.2:6379 asks for synchronization\r\nnode_1  | 1:M 06 Sep 2023 08:39:07.166 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for '9df651b1729a067c6cb6ef216e93ac3cbd3b23a1', my replication IDs are 'f9f16c0a4046bff27d18a0b7a78e959715e44180' and '0000000000000000000000000000000000000000')\r\nnode_1  | 1:M 06 Sep 2023 08:39:07.166 * Replication backlog created, my new replication IDs are '1d3c4b9e83fe1771fed2b03e6ce385f12ec9b614' and '0000000000000000000000000000000000000000'\r\nnode_1  | 1:M 06 Sep 2023 08:39:07.166 * Delay next BGSAVE for diskless SYNC\r\nnode_1  | 1:M 06 Sep 2023 08:39:12.042 * Starting BGSAVE for SYNC with target: replicas sockets\r\nnode_1  | 1:M 06 Sep 2023 08:39:12.045 * Background RDB transfer started by pid 27\r\nnode_1  | 27:C 06 Sep 2023 08:39:12.047 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB\r\nnode_1  | 1:M 06 Sep 2023 08:39:12.047 # Diskless rdb transfer, done reading from pipe, 1 replicas still up.\r\nnode_1  | 1:M 06 Sep 2023 08:39:12.052 * Background RDB transfer terminated with success\r\nnode_1  | 1:M 06 Sep 2023 08:39:12.052 * Streamed RDB transfer with replica 172.27.0.2:6379 succeeded (socket). Waiting for REPLCONF ACK from slave to enable streaming\r\nnode_1  | 1:M 06 Sep 2023 08:39:12.052 * Synchronization with replica 172.27.0.2:6379 succeeded\r\n<\/code><\/pre>\n<h3>\u68c0\u67e5\u8282\u70b9\u7684\u72b6\u6001<\/h3>\n<p>\u786e\u8ba4\u5bb9\u5668\u7684ID\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker ps\r\nCONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS         PORTS                     NAMES\r\nc95717cf74af   redis:latest   \"docker-entrypoint.s\u2026\"   3 minutes ago   Up 3 minutes   0.0.0.0:60434-&gt;6379\/tcp   test-redis-cluster_node_2\r\nc1facc6773b9   redis:latest   \"docker-entrypoint.s\u2026\"   3 minutes ago   Up 3 minutes   0.0.0.0:60432-&gt;6379\/tcp   test-redis-cluster_node_4\r\n666bb02b9458   redis:latest   \"docker-entrypoint.s\u2026\"   3 minutes ago   Up 3 minutes   0.0.0.0:60431-&gt;6379\/tcp   test-redis-cluster_node_3\r\n02897e83f47f   redis:latest   \"docker-entrypoint.s\u2026\"   3 minutes ago   Up 3 minutes   0.0.0.0:60433-&gt;6379\/tcp   test-redis-cluster_node_1\r\ndfafdb0e2309   redis:latest   \"docker-entrypoint.s\u2026\"   3 minutes ago   Up 3 minutes   0.0.0.0:60430-&gt;6379\/tcp   test-redis-cluster_node_5\r\nda59e140c108   redis:latest   \"docker-entrypoint.s\u2026\"   3 minutes ago   Up 3 minutes   0.0.0.0:60429-&gt;6379\/tcp   test-redis-cluster_node_6\r\n<\/code><\/pre>\n<p>\u6bcf\u4e2a\u8282\u70b9\u7684\u72b6\u6001\u5728\u542f\u52a8\u65f6\u4f1a\u8bb0\u5f55\u5728\u4e00\u4e2a\u540d\u4e3anodes.conf\u7684\u6587\u4ef6\u4e2d\uff0c\u901a\u8fc7\u67e5\u770b\u8fd9\u4e2a\u6587\u4ef6\u53ef\u4ee5\u786e\u8ba4\u4e3b\u8282\u70b9\u548c\u4ece\u8282\u70b9\u7684\u5173\u7cfb\uff08\u4e5f\u53ef\u4ee5\u4f7f\u7528 redis-cli\u547d\u4ee4\u7684 CLUSTER NODES\u7b49\u65b9\u5f0f\u8fdb\u884c\u786e\u8ba4\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker exec 02897e83f47f bash -c \"cat nodes.conf\"\r\n8fe04f39df4e6b453a395da23f25bdc060559847 172.27.0.2:6379@16379 slave b969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602 0 1693989548918 1 connected\r\nbf59ab9a08f7c39bceaaec562acfc2ca90f84621 172.27.0.6:6379@16379 slave 382223b947b401c45495a01c254e466630750c80 0 1693989547000 3 connected\r\ncc97431d2343a3ca7a57e6d6b4da6d37bb569198 172.27.0.3:6379@16379 slave a6049751e651642f261095950d469a6b0cb8e611 0 1693989547000 2 connected\r\n382223b947b401c45495a01c254e466630750c80 172.27.0.5:6379@16379 master - 0 1693989547908 3 connected 10923-16383\r\na6049751e651642f261095950d469a6b0cb8e611 172.27.0.4:6379@16379 master - 0 1693989548000 2 connected 5461-10922\r\nb969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602 172.27.0.7:6379@16379 myself,master - 0 1693989546000 1 connected 0-5460\r\nvars currentEpoch 6 lastVoteEpoch 0\r\n<\/code><\/pre>\n<p>\u6bcf\u4e2a\u53c2\u6570\u6309\u7167\u4ee5\u4e0b\u987a\u5e8f\u6392\u5217\u3002<\/p>\n<div>\n<div class=\"post-table\">\u9805\u76ee\u6982\u8981id\u30ce\u30fc\u30c9IDip:port@cport\u30ce\u30fc\u30c9\u306e\u30a2\u30c9\u30ec\u30b9\u3068\u30dd\u30fc\u30c8\u3002cport\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u30d0\u30b9\u30dd\u30fc\u30c8\u3068\u8a00\u3044\u3001\u30ce\u30fc\u30c9\u9593\u3067\u3084\u308a\u3068\u308a\u3059\u308b\u305f\u3081\u306e\u30dd\u30fc\u30c8\u3067\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u901a\u5e38\u306e\u30dd\u30fc\u30c8\u306b1\u4e07\u3092\u8db3\u3057\u305f\u3082\u306eflags\u30ce\u30fc\u30c9\u306e\u72b6\u614bmaster\u30ec\u30d7\u30ea\u30ab\u306a\u3089master\u306e\u30ce\u30fc\u30c9ID\u3001master\u306a\u3089-ping-sent\u30a2\u30af\u30c6\u30a3\u30d6\u306aping\u304c\u9001\u4fe1\u3055\u308c\u305fUNIX\u6642\u9593pong-recv\u6700\u5f8c\u306bping\u306e\u5fdc\u7b54\u3092\u53d7\u3051\u53d6\u3063\u305fUNIX\u6642\u9593config-epochconfigEpoch\u306e\u5024(\u5f8c\u8ff0)link-state\u30ce\u30fc\u30c9\u9593\u30af\u30e9\u30b9\u30bf\u30fc\u30d0\u30b9\u3067\u306e\u63a5\u7d9a\u72b6\u614bslot\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30cf\u30c3\u30b7\u30e5\u30b9\u30ed\u30c3\u30c8\u306e\u7bc4\u56f2<\/div>\n<\/div>\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u8282\u70b96\uff08172.27.0.2\uff09\u5c06\u8282\u70b91\uff08172.27.0.7\uff09\u4f5c\u4e3a\u4e3b\u8282\u70b9\u8fdb\u884c\u5f15\u7528\u3002<br \/>\n\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u786e\u8ba4\u6bcf\u4e2a\u4e3b\u8282\u70b9\u88ab\u5747\u5300\u5206\u914d\u4e860\u81f316383\u8303\u56f4\u5185\u7684\u63d2\u69fd\u3002<\/p>\n<h1>\u6545\u969c\u8f6c\u79fb<\/h1>\n<h3>\u65f6\u4ee3<\/h3>\n<p>\u5728Redis Cluster\u4e2d\uff0c\u4f7f\u7528\u79f0\u4e3aepoch\u7684\u503c\u6765\u5bf9\u8282\u70b9\u72b6\u6001\u8fdb\u884c\u7248\u672c\u63a7\u5236\uff0c\u5e76\u5728\u5171\u4eab\u6700\u65b0\u4fe1\u606f\u7684\u540c\u65f6\u6267\u884c\u6545\u969c\u5207\u6362\u3002<br \/>\n\uff08\u8fd9\u7c7b\u4f3c\u4e8e\u5206\u5e03\u5f0f\u4e00\u81f4\u6027\u7b97\u6cd5Raft\u4e2d\u7684term\u7684\u6982\u5ff5\uff09<br \/>\nepoch\u6709\u4ee5\u4e0b3\u79cd\u7c7b\u578b\u3002<\/p>\n<p>currentEpoch<\/p>\n<p>\u30af\u30e9\u30b9\u30bf\u30fc\u5168\u4f53\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u7ba1\u7406\u3059\u308b<br \/>\ncurrentEpoch\u304c\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3055\u308c\u308b\u3068\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u72b6\u614b\u304c\u5909\u5316\u3057\u305f\u3053\u3068\u3092\u8868\u3059<br \/>\n\u5168\u3066\u306e\u30ce\u30fc\u30c9\u304ccurrentEpoch\u306b\u540c\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u3053\u308c\u306b\u3088\u308a\u4e00\u8cab\u6027\u3092\u4fdd\u3064<\/p>\n<p>configEpoch<\/p>\n<p>\u30b7\u30e3\u30fc\u30c9\u3054\u3068\u306b\u4e00\u610f\u306e\u6570\u5024\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u308b<br \/>\n\u65b0\u3057\u3044\u8a2d\u5b9a\u304c\u9069\u7528\u3055\u308c\u308b\u3068\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3055\u308c\u308b<br \/>\n\u7570\u306a\u308b\u30ce\u30fc\u30c9\u304c\u7570\u306a\u308b\u69cb\u6210\u3092\u4e3b\u5f35\u3057\u305f\u969b\u3001\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\u3092\u89e3\u6d88\u3059\u308b\u305f\u3081\u306b\u5f79\u7acb\u3064<\/p>\n<p>lastVoteEpoch<\/p>\n<p>\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u8a8d\u8a3c\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u6765\u305f\u969b\u306b\u7528\u3044\u308b<br \/>\n\u30de\u30b9\u30bf\u30fc\u306f\u81ea\u8eab\u306elastVoteEpoch\u3088\u308a\u53e4\u3044currentEpoch\u3092\u6301\u3064\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u306e\u8a8d\u8a3c\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u62d2\u5426\u3059\u308b<br \/>\n\u30ec\u30d7\u30ea\u30ab\u306b\u6295\u7968\u3057\u305f\u5f8c\u306b\u66f4\u65b0\u3055\u308c\u308b<\/p>\n<h3>\u5c06\u526f\u672c\u5347\u7ea7\u4e3a\u4e3b\u7248\u672c\u7684\u6b65\u9aa4<\/h3>\n<p>\u5f53\u4e3b\u5904\u4e8e\u79bb\u7ebf\u72b6\u6001\u65f6\uff0c\u6211\u4eec\u5c06\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u9009\u4e3e\u51fa\u65b0\u7684\u4e3b\u8282\u70b9\u3002<\/p>\n<ol>\u526f\u672c\u5728\u589e\u52a0currentEpoch\u540e\uff0c\u5411\u5176\u4ed6\u4e3b\u8282\u70b9\u53d1\u9001FALOVER_AUTH_REQUEST\uff08\u8ba4\u8bc1\u8bf7\u6c42\uff09\uff0c\u7136\u540e\u7b49\u5f85cluster-node-timeout * 2\u79d2\u7684\u65f6\u95f4\u8fdb\u884c\u6295\u7968\u3002\u4e3b\u8282\u70b9\u6536\u5230FALOVER_AUTH_REQUEST\u540e\u4f1a\u68c0\u67e5\u53d1\u9001\u6e90\u526f\u672c\u7684currentEpoch\u3002\u5982\u679ccurrentEpoch\u5c0f\u4e8e\u4e3b\u8282\u70b9\u7684currentEpoch\u548clastVoteEpoch\uff0c\u5219\u4e0d\u63a5\u53d7\u6295\u7968\u3002\u5982\u679c\u6210\u529f\u63a5\u53d7\u6295\u7968\uff0c\u5219\u8fd4\u56deFAILOVER_AUTH_ACK\uff08\u6295\u7968\uff09\uff0c\u5e76\u66f4\u65b0lastVoteEpoch\u4e3a\u526f\u672c\u7684currentEpoch\u3002\u5f53\u526f\u672c\u63a5\u53d7\u591a\u6570\u4e3b\u8282\u70b9\u7684\u6295\u7968\u540e\uff0c\u5c06\u664b\u5347\u4e3a\u4e3b\u8282\u70b9\uff0c\u5e76\u5c06configEpoch\u66f4\u65b0\u4e3a\u6700\u65b0\u7684currentEpoch\u3002<\/ol>\n<p>\u5728\u6295\u7968\u5b8c\u6210\u540e\uff0c\u4e3b\u8282\u70b9\u5c06\u5728 cluster-node-timeout * 2 \u79d2\u7684\u65f6\u95f4\u5185\u4e0d\u56de\u5e94\u6765\u81ea\u5176\u4ed6\u526f\u672c\u7684\u8ba4\u8bc1\u8bf7\u6c42\uff0c\u5e76\u4e14\u6bcf\u4e2a\u65f6\u671f\u53ea\u80fd\u6295\u7968\u4e00\u6b21\u3002\u56e0\u6b64\uff0c\u5f53\u4e0e\u6545\u969c\u4e3b\u8282\u70b9\u76f8\u5173\u8054\u7684\u591a\u4e2a\u526f\u672c\u5b58\u5728\u65f6\uff0c\u5148\u53d1\u9001\u8ba4\u8bc1\u8bf7\u6c42\u7684\u526f\u672c\u5c06\u5360\u6709\u4f18\u52bf\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5f53\u590d\u5236\u54c1\u786e\u8ba4\u4e3b\u670d\u52a1\u5668\u8fdb\u5165\u201cFAIL\u201d\u72b6\u6001\u540e\uff0c\u4e0d\u5e94\u7acb\u5373\u53d1\u9001\u8ba4\u8bc1\u8bf7\u6c42\uff0c\u800c\u662f\u9700\u8981\u7b49\u5f85\u4ee5\u4e0b\u65f6\u95f4\uff1a<br \/>\n500\u6beb\u79d2 + 0~500\u6beb\u79d2\uff08\u968f\u673a\uff09+ \u590d\u5236\u54c1\u7b49\u7ea7 * 1000\u6beb\u79d2<br \/>\n\u5404\u4e2a\u53c2\u6570\u7684\u8be6\u7ec6\u8bf4\u660e\u5982\u4e0b\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">500ms<\/ul>\n<\/li>\n<\/ul>\n<p>\u30de\u30b9\u30bf\u30fc\u304cFAIL\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u60c5\u5831\u304c\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306b\u4f1d\u64ad\u3055\u308c\u308b\u306e\u3092\u5f85\u3064\u305f\u3081\u306e\u6642\u9593<\/p>\n<p>0~500ms<\/p>\n<p>1\u30ec\u30d7\u30ea\u30ab\u304c\u540c\u6642\u306b\u30de\u30b9\u30bf\u30fc\u3068\u3057\u3066\u9078\u51fa\u3055\u308c\u308b\u306e\u3092\u907f\u3051\u308b\u6642\u9593<\/p>\n<p>REPLICA_RANK * 1000<\/p>\n<p>REPLICA_RANK\u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30aa\u30d5\u30bb\u30c3\u30c8\u304c\u9032\u3093\u3067\u3044\u308b\u30ec\u30d7\u30ea\u30ab\u9806\u306b0\u304b\u3089\u9023\u756a\u3067\u632f\u3089\u308c\u308b<\/p>\n<p>\u7b80\u800c\u8a00\u4e4b\uff0c\u62e5\u6709\u6700\u9760\u8fd1\u4e3b\u8282\u70b9\u6700\u65b0\u4fe1\u606f\u7684\u504f\u79fb\u91cf\uff08\u526f\u672c\uff09\u80fd\u591f\u66f4\u5feb\u5730\u53d1\u9001\u8ba4\u8bc1\u8bf7\u6c42\u5e76\u4e14\u5bb9\u6613\u664b\u5347\u3002<\/p>\n<h3>\u505c\u6b62\u4e3b\u670d\u52a1\u5668\u5e76\u6267\u884c\u6545\u969c\u8f6c\u79fb\u3002<\/h3>\n<p>\u90a3\u4e48\uff0c\u8ba9\u6211\u4eec\u5c06\u8282\u70b91\uff08\u4e3b\u8282\u70b9\uff09\u5173\u95ed\uff0c\u89c2\u5bdf\u6545\u969c\u8f6c\u79fb\u7684\u884c\u4e3a\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker ps\r\nCONTAINER ID   IMAGE                                 COMMAND                  CREATED         STATUS         PORTS                                                                                                                        NAMES\r\nb7f1da8d42ff   redis:latest                          \"docker-entrypoint.s\u2026\"   7 minutes ago   Up 7 minutes   0.0.0.0:55686-&gt;6379\/tcp                                                                                                      test-redis-cluster_node_1\r\n18ada60b2206   redis:latest                          \"docker-entrypoint.s\u2026\"   7 minutes ago   Up 7 minutes   0.0.0.0:55687-&gt;6379\/tcp                                                                                                      test-redis-cluster_node_2\r\n...\r\n\r\n$ docker exec -it b7f1da8d42ff bash\r\n# redis-cli\r\n&gt; DEBUG SEGFAULT\r\n<\/code><\/pre>\n<p>\u6211\u5df2\u7ecf\u4f7f\u8282\u70b91\uff08\u4e3b\u8282\u70b9\uff09\u4e0b\u7ebf\u3002\u67e5\u770bnodes.conf\u6587\u4ef6\uff0c\u53ef\u4ee5\u786e\u8ba4\u8282\u70b91\uff08172.27.0.7\uff09\u5df2\u7ecf\u53d8\u4e3a\u5931\u8d25\u72b6\u6001\uff0c\u5e76\u4e14\u8282\u70b93\uff08172.27.0.2\uff09\u5df2\u7ecf\u664b\u5347\u4e3a\u4e3b\u8282\u70b9\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker exec da59e140c108 bash -c \"cat nodes.conf\"\r\nb969fd526f09d3ca5d1c9d6dbc7fd2d08ed21602 172.27.0.7:6379@16379 master,fail - 1693993459028 1693993454000 1 connected\r\n8fe04f39df4e6b453a395da23f25bdc060559847 172.27.0.2:6379@16379 myself,master - 0 1693993471000 7 connected 0-5460\r\nbf59ab9a08f7c39bceaaec562acfc2ca90f84621 172.27.0.6:6379@16379 slave 382223b947b401c45495a01c254e466630750c80 0 1693993471116 3 connected\r\ncc97431d2343a3ca7a57e6d6b4da6d37bb569198 172.27.0.3:6379@16379 slave a6049751e651642f261095950d469a6b0cb8e611 0 1693993470000 2 connected\r\n382223b947b401c45495a01c254e466630750c80 172.27.0.5:6379@16379 master - 0 1693993471000 3 connected 10923-16383\r\na6049751e651642f261095950d469a6b0cb8e611 172.27.0.4:6379@16379 master - 0 1693993472125 2 connected 5461-10922\r\nvars currentEpoch 7 lastVoteEpoch 0\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1bc037434c4406c0f13d\/52-0.png\" alt=\"undefined\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1bc037434c4406c0f13d\/53-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u6211\u4eec\u505c\u6b62\u4e86node_1\u3002<br \/>\nnode_6\u4f1a\u5728\u7b49\u5f85500\u6beb\u79d2 + 0~500\u6beb\u79d2\uff08\u968f\u673a\u503c\uff09 + REPLICA_RANK * 1000\u6beb\u79d2\u540e\uff0c\u589e\u52a0\u81ea\u5df1\u7684currentEpoch\uff0c\u5e76\u5c06FAILOVER_AUTH_REQUEST\u53d1\u9001\u7ed9node_3\u548cnode_4\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1bc037434c4406c0f13d\/55-0.png\" alt=\"undefined\" \/><\/div>\n<p>node_3\u548cnode_4\u786e\u8ba4\u6e90\u590d\u5236\u7684currentEpoch\u5927\u4e8e\u81ea\u5df1\u7684currentEpoch\u548clastVoteEpoch\u4e4b\u540e\uff0c\u4f1a\u5c06\u5b83\u4eec\u7684currentEpoch\u66f4\u65b0\u4e3a\u4e0e\u6e90\u76f8\u540c\u7684\u503c\uff0c\u7136\u540e\u5411node_6\u53d1\u9001FAILOVER_AUTH_ACK\u6d88\u606f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1bc037434c4406c0f13d\/57-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u7531\u4e8eNode_6\u83b7\u5f97\u4e86\u534a\u6570\u4ee5\u4e0a\u7684\u6295\u7968\uff0c\u56e0\u6b64\u5b83\u6210\u529f\u5730\u5c06configEpoch\u66f4\u65b0\u4e3a\u4e0ecurrentEpoch\u76f8\u540c\u7684\u503c\uff0c\u5e76\u6210\u529f\u664b\u5347\u4e3a\u4e3b\u8282\u70b9\uff01<\/p>\n<h1>\u6700\u540e<\/h1>\n<p>\u4f7f\u7528docker-compose\u5728\u672c\u5730\u642d\u5efaRedis Cluster\uff0c\u5e76\u901a\u8fc7\u56fe\u89e3\u4e86\u89e3\u4e86\u6545\u969c\u8f6c\u79fb\u65f6\u526f\u672c\u7684\u9009\u4e3e\u8fc7\u7a0b\u3002<br \/>\n\u867d\u7136\u610f\u8bc6\u5230\u4e86epoch\u5e76\u4e14\u5bf9Redis Cluster\u8fdb\u884c\u64cd\u4f5c\u7684\u673a\u4f1a\u53ef\u80fd\u5f88\u5c11\uff0c\u4f46\u5982\u679c\u60a8\u80fd\u611f\u53d7\u5230\u50cf\u8fd9\u6837\u901a\u8fc7\u8fd9\u79cd\u8fc7\u7a0b\u664b\u5347\u4e3a\u4e3b\u8282\u70b9\u7684\u611f\u89c9\uff0c\u90a3\u5c06\u662f\u975e\u5e38\u5e78\u8fd0\u7684\u3002<\/p>\n<p>\u518d\u89c1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u7531\u4e8e\u4e0d\u592a\u7406\u89e3\u5f53Redis Cluster\u53d1\u751f\u6545\u969c\u8f6c\u79fb\u65f6\u5982\u4f55\u9009\u62e9\u4e0b\u4e00\u4e2a\u4e3b\u8282\u70b9\u526f\u672c\uff0c\u56e0\u6b64\u6211\u5728\u9605\u8bfb\u300a\u5b9e\u8df5Red [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34174","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5efa\u7acbredis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u7531\u4e8e\u4e0d\u592a\u7406\u89e3\u5f53Redis Cluster\u53d1\u751f\u6545\u969c\u8f6c\u79fb\u65f6\u5982\u4f55\u9009\u62e9\u4e0b\u4e00\u4e2a\u4e3b\u8282\u70b9\u526f\u672c\uff0c\u56e0\u6b64\u6211\u5728\u9605\u8bfb\u300a\u5b9e\u8df5Red [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5efa\u7acbredis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-21T07:49:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T00:13:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1bc037434c4406c0f13d\/52-0.png\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/\",\"name\":\"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-11-21T07:49:26+00:00\",\"dateModified\":\"2024-04-30T00:13:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5efa\u7acbredis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a","og_description":"\u9996\u5148 \u7531\u4e8e\u4e0d\u592a\u7406\u89e3\u5f53Redis Cluster\u53d1\u751f\u6545\u969c\u8f6c\u79fb\u65f6\u5982\u4f55\u9009\u62e9\u4e0b\u4e00\u4e2a\u4e3b\u8282\u70b9\u526f\u672c\uff0c\u56e0\u6b64\u6211\u5728\u9605\u8bfb\u300a\u5b9e\u8df5Red [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5efa\u7acbredis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-11-21T07:49:26+00:00","article_modified_time":"2024-04-30T00:13:41+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1bc037434c4406c0f13d\/52-0.png"}],"author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"15 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/","name":"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-11-21T07:49:26+00:00","dateModified":"2024-04-30T00:13:41+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5efa\u7acbRedis\u96c6\u7fa4\uff0c\u4ee5\u9a8c\u8bc1\u5728\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u526f\u672c\u9009\u53d6\u884c\u4e3a"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bb%ba%e7%ab%8bredis%e9%9b%86%e7%be%a4%ef%bc%8c%e4%bb%a5%e9%aa%8c%e8%af%81%e5%9c%a8%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%e6%97%b6%e7%9a%84%e5%89%af%e6%9c%ac%e9%80%89%e5%8f%96%e8%a1%8c%e4%b8%ba\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34174"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34174\/revisions"}],"predecessor-version":[{"id":90743,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34174\/revisions\/90743"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}