{"id":5125,"date":"2024-09-28T07:01:01","date_gmt":"2024-09-27T23:01:01","guid":{"rendered":""},"modified":"2024-09-28T07:01:01","modified_gmt":"2024-09-27T23:01:01","slug":"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406","status":"publish","type":"post","link":"https:\/\/mushiming.com\/5125.html","title":{"rendered":"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406"},"content":{"rendered":"

\u4e3b\u5907 \u4e3b\u4ece \u4e3b\u4e3b\u6a21\u5f0f<\/h3>\n

\u76ee\u5f55<\/strong><\/p>\n

\u4e3b\u5907 \u4e3b\u4ece \u4e3b\u4e3b\u6a21\u5f0f<\/p>\n

\u4e3b\u5907<\/p>\n

\u4e3b\u4ece<\/p>\n

\u4e3b\u4e3b<\/p>\n

\u7ed3\u8bed<\/p>\n


\n

\u5355\u70b9\u6545\u969c\u7684\u60c5\u51b5\u4e0d\u53ef\u907f\u514d\uff0c\u800c\u4e14\u5355\u526f\u672c\u7684\u5b58\u50a8\u65b9\u6848\u65e9\u5df2\u65e0\u6cd5\u6ee1\u8db3\u4e1a\u52a1\u7684\u53ef\u9760\u6027\u8981\u6c42\uff0c\u5355\u673a\u53ef\u9760\u6027\u5c31\u5c31\u4e24\u4e2a9\uff0c\u4e5f\u5c31\u662f\u4e00\u5e74\u5927\u6982\u67093.65\u5929\u4e0d\u53ef\u7528\u3002\u56e0\u6b64\u4e00\u822c\u60c5\u51b5\u4e0b\u6211\u4eec\u81f3\u5c11\u4e5f\u4f1a\u4e0a\u4e2a\u53cc\u673a\u5b58\u50a8\u67b6\u6784\u3002\u51e1\u4e8b\u6700\u597d\u6709\u4e2aplan B\u3002<\/p>\n

\u4e3b\u5907<\/h3>\n

\u4e3b\uff1a\u4e3b\u673a\uff0c\u5907\uff1a\u5907\u673a\u3002
\u4e3b\u673a\u7684\u610f\u601d\u5f53\u7136\u662f\u4ee5\u5b83\u4e3a\u4e3b\u4e86\uff0c\u8bfb\u5199\u90fd\u662f\u4e3b\u673a\u4e0a\uff0c\u800c\u5907\u673a\u5462\u5c31\u662f\u5907\u7528\uff0c\u9ed8\u9ed8\u7684\u5728\u80cc\u540e\u5438\u6536\u4e3b\u673a\u7684\u6570\u636e\uff0c\u65f6\u523b\u5f85\u547d\u7740\u7b49\u5f85\u4e3b\u673a\u6302\u4e86\u4e4b\u540e\u53d6\u800c\u4ee3\u4e4b(\u6ca1\u8fd9\u4e48\u574f\u54c8\u54c8)\u3002\u56e0\u6b64\u5728\u4e3b\u673a\u8fd8\u6d3b\u7740\u7684\u60c5\u51b5\u4e0b\uff0c\u5907\u673a\u7684\u552f\u4e00\u4f7f\u547d\u5c31\u662f\u540c\u6b65\u4e3b\u673a\u7684\u6570\u636e\uff0c\u4e0d\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1<\/strong>\u3002<\/p>\n

\"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406<\/p>\n

image<\/p>\n

\u4f18\u70b9\uff1a\u7b80\u5355\uff0c\u4e3b\u5907\u4e4b\u95f4\u53ea\u6709\u6570\u636e\u540c\u6b65\uff0c\u4e0d\u9700\u8981\u8003\u8651\u522b\u7684\u60c5\u51b5\u3002\u5c31\u5f88\u7b80\u5355\u7684\u914d\u7f6e\u4e00\u4e0b\uff0c\u518d\u641e\u4e00\u53f0\u670d\u52a1\u5668\u5c31\u80fd\u7ec4\u6210\u4e3b\u5907\u67b6\u6784\u4e86\u3002<\/p>\n

\u7f3a\u70b9\uff1a\u5907\u673a\u7b49\u4e8e\u5c31\u62ff\u6765\u5907\u4efd\uff0c\u6d6a\u8d39\u4e86\u5907\u673a\u8fd9\u53f0\u670d\u52a1\u5668\u7684\u8d44\u6e90\u3002\u4e0a\u9762\u8bf4\u7684\u4e0d\u8003\u8651\u522b\u7684\u60c5\u51b5\u6307\u7684\u662f\u4e3b\u673a\u548c\u5907\u673a\u5b83\u4eec\u4e24\u4e4b\u95f4\u5c31\u53ea\u8981\u590d\u5236\u6570\u636e\uff0c\u4f46\u662f\u6709\u4e9b\u60c5\u51b5\u6211\u4eec\u4eba\u8fd8\u662f\u5f97\u8003\u8651\u7684\uff1a\u4e3b\u673a\u6302\u4e86\u5982\u4f55\u8ba9\u5907\u673a\u4e0a\u3002<\/strong><\/p>\n

\u6709\u4e09\u79cd\u9009\u62e9<\/p>\n

1.\u4eba\u5de5\u5207\u6362\u3002\u4eba\u5de5\u5207\u6362\u65f6\u6548\u6027\u4e0d\u9ad8\uff0c\u51fa\u4e86\u4e8b\u60c5\u9996\u5148\u4f60\u5f97\u5f00\u673a\uff0c\u767b\u5f55\u8fdc\u7a0b\u4e00\u9635\u556a\u556a\u5f97\u597d\u51e0\u5206\u949f\u6216\u8005\u4e07\u4e00\u4f60\u5728LOL\uff0c\u9ed1\u94c1\u664b\u7ea7\u9752\u94dc\u6700\u540e\u4e00\u628a\u52aa\u529b\u4e86\u51e0\u4e2a\u6708\u5373\u5c06\u664b\u5347\u5014\u5f3a\u9752\u94dc\u7684\u4e00\u523b\uff01\u662f\u5427\u3002\u8fd8\u8981\u4e07\u4e00\u5728\u6df1\u591c\u6216\u8005\u8bf4....\u662f\u5427\u3002<\/p>\n

2.\u5f15\u5165\u4e2d\u95f4\u4ef6\u3002\u4f8b\u5982ZooKeeper\u3001keepalived\u3002\u5c31\u8ddf\u597d\u591a\u623f\u4e1c\u628a\u623f\u5b50\u59d4\u6258\u7ed9\u4e2d\u4ecb\u4e00\u6837\uff0c\u8fd9\u4e2d\u95f4\u4ef6\u5c31\u662f\u4e2a\u4e2d\u4ecb\u3002\u5168\u6743\u7531\u4e2d\u4ecb\u6765\u6253\u7406\u4e3b\u673a\u548c\u5907\u673a\uff0c\u5b83\u4f1a\u6839\u636e\u673a\u5b50\u72b6\u6001\u6765\u5224\u522b\u8fd9\u65f6\u5019\u662f\u4e0d\u662f\u8be5\u5907\u673a\u4e0a\u4e86\u3002(\u5efa\u8bae)<\/p>\n

3.\u4e3b\u673a\u5907\u673a\u4e4b\u95f4\u72b6\u6001\u4f20\u8f93(\u54b1\u4e0d\u627e\u4e2d\u4ecb\u4e86\uff0c\u81ea\u5df1\u6765\u6253\u7406)\uff0c\u5565\u610f\u601d\u5462\uff1f\u5c31\u662f\u9664\u6570\u636e\u540c\u6b65\uff0c\u4e3b\u5907\u4e4b\u95f4\u8fd8\u8981\u6709\u4e2a\u72b6\u6001\u4f20\u8f93\u8fc7\u7a0b\uff0c\u6765\u8ba9\u5907\u673a\u53ea\u8981\u73b0\u5728\u4e3b\u673a\u8fc7\u5f97\u597d\u4e0d\u597d\uff0c\u53ef\u4ee5\u662f\u4e3b\u673a\u4e3b\u52a8\u63a8\u9001\u5b83\u7684\u72b6\u6001\u7ed9\u5907\u673a\uff0c\u6216\u8005\u662f\u5907\u673a\u53bb\u7d22\u8981\u72b6\u6001\u3002\u5f53\u72b6\u6001\u62ff\u4e0d\u5230\u6216\u8005\u4e0d\u5bf9\u7684\u65f6\u5019\u5c31\u5f00\u59cb\u4e3b\u5907\u5207\u6362\u3002\u4f46\u662f\u53ef\u80fd\u4f20\u8f93\u51fa\u73b0\u4e86\u6ce2\u52a8\u5565\u7684\uff0c\u5bfc\u81f4\u5907\u673a\u8bef\u5224\u4e86\uff0c\u7136\u540e\u5907\u673a\u5347\u7ea7\u4e3a\u4e3b\u673a\uff0c\u8fd9\u6837\u5c31\u4e24\u4e3b\u673a\u4e86(\u4e0b\u9762\u4f1a\u8bf4\u4e3b\u4e3b\u7684\u95ee\u9898)\u3002<\/p>\n

\u5c31\u76ee\u524d\u6765\u8bb2\uff0cgp\u6570\u636e\u5e93\u5c31\u662f\u8fd9\u79cd\u67b6\u6784\u3002<\/em><\/strong><\/u><\/p>\n

\u5728master\u548cstandby\u89d2\u8272\u4e92\u6362\u65f6\uff0c\u9700\u8981\u786e\u4fddmaster\u548cstandby\u7684\u72b6\u6001\u662f\u540c\u6b65\u7684\u3002\u5982\u4e0b\u56fe standby host passive\u5c31\u4ee3\u8868\u662f\u540c\u6b65\u7684\uff0c\u90a3redis \u7684\u4e3b\u4ece\u5462\uff1f \u5982\u4f55\u8bc6\u522b\u72b6\u6001\u662f\u540c\u6b65\u7684\u5462\uff1f<\/em><\/strong><\/u><\/p>\n

\"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406<\/p>\n

\u4e3b\u4ece<\/h3>\n

\u4e3b\uff1a\u4e3b\u673a\uff0c\u4ece\uff1a\u4ece\u673a<\/p>\n

\u4ece\u673a\u548c\u5907\u673a\u7684\u533a\u522b\u5728\u4e8e\u5b83\u5f97\u9664\u4e86\u540c\u6b65\u6570\u636e\u4e4b\u5916\u8fd8\u5f97\u5e72\u6d3b\uff0c\u5bf9\u5916\u63d0\u4f9b\u8bfb\u7684\u64cd\u4f5c\uff0c\u4f60\u53ef\u4ee5\u7406\u89e3\u4e3a\u5b83\u662f\u4ec6\u4ece\u3002\u4f46\u662f\u4ec6\u4ece\u548c\u5907\u673a\u4e00\u6837\u4e5f\u6709\u7ffb\u8eab\u505a\u4e3b\u4eba\u7684\u4e00\u5929\uff0c\u6240\u4ee5\u5b83\u4e5f\u5728\u9ed8\u9ed8\u7684\u7b49\u5f85\u7740\u4e3b\u673a\u6302\u4e86\uff0c\u53d6\u800c\u4ee3\u4e4b\u3002<\/p>\n

\"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406<\/p>\n

image<\/p>\n

\u4f18\u70b9\uff1a\u5145\u5206\u5229\u7528\u4e86\u8d44\u6e90\uff0c\u563f\u563f\u4e0d\u60f3\u5907\u673a\u8fd9\u4e48\u723d\u4e86\uff0c\u8fd8\u5f97\u51fa\u6765\u5e72\u6d3b\uff0c\u5bf9\u5916\u63d0\u4f9b\u8bfb\u64cd\u4f5c\u3002\u800c\u4e14\u5728\u4e3b\u673a\u6302\u4e86\u7684\u65f6\u5019\uff0c\u5982\u679c\u6ca1\u4efb\u547d\u65b0\u673a\u4e3b\u4e4b\u524d\uff0c\u8bfb\u64cd\u4f5c\u8fd8\u662f\u80fd\u7528\u7684\u3002<\/p>\n

\u7f3a\u70b9\uff1a<\/p>\n

1.\u5ba2\u6237\u7aef\u9700\u8981\u591a\u4e2a\u5224\u65ad\uff0c\u4e5f\u5c31\u662f\u4e0d\u540c\u64cd\u4f5c\u9700\u8981\u53d1\u653e\u7ed9\u4e0d\u540c\u670d\u52a1\u5668\uff0c\u6211\u4e0a\u56fe\u4e3b\u673a\u63d0\u4f9b\u8bfb\u5199\uff0c\u6709\u65f6\u5019\u8bfb\u5199\u5206\u79bb\u4e86\uff0c\u4e3b\u673a\u5c31\u63d0\u4f9b\u5199\u3002<\/p>\n

2.\u4e3b\u4ece\u5ef6\u8fdf\uff0c\u8bfb\u64cd\u4f5c\u5206\u914d\u7ed9\u4ece\u5e93\uff0c\u5c31\u4f1a\u5b58\u5728\u6570\u636e\u540c\u6b65\u7684\u5ef6\u8fdf\u95ee\u9898\uff0c\u6bd4\u5982\u67d0\u4e2a\u4eba\u6ce8\u518c\u4e86\u8d26\u53f7\u4e4b\u540e\uff0c\u767b\u5f55\u8d70\u7684\u662f\u4ece\u673a\uff0c\u8fd9\u65f6\u5019\u6570\u636e\u8fd8\u672a\u4ece\u4e3b\u673a\u540c\u6b65\u8fc7\u6765\uff0c\u90a3\u53ef\u4e0d\u8ba9\u4eba\u5f88\u96be\u53d7\u4e86\u3002\u6709\u5173\u4e3b\u4ece\u5ef6\u8fdf\u95ee\u9898\u7684\u4e00\u4e9b\u89e3\u51b3\u529e\u6cd5<\/p>\n

3.\u548c\u4e3b\u5907\u4e00\u6837\u7684\u5207\u6362\u95ee\u9898\u3002(\u53c2\u8003\u4e3b\u5907)<\/p>\n

\u76ee\u524dcoids \u96c6\u7fa4\uff0cmaster \u548cslave\u5c31\u662f\u4e3b\u4ece\u7684\u5173\u7cfb\uff0cslave\u8d1f\u8d23\u8bfb\uff0cmaster\u8d1f\u8d23\u5199\u3002<\/u><\/em><\/strong><\/p>\n

\u4e3b\u4e3b<\/h3>\n

\u4e3b\u4e3b\u5c31\u662f\u4e24\u53f0\u90fd\u662f\u4e3b\u673a\u3002\u540c\u65f6\u5bf9\u5916\u63d0\u4f9b\u8bfb\u5199\u64cd\u4f5c\u3002\u5ba2\u6237\u7aef\u4efb\u610f\u8bbf\u95ee\u63d0\u4f9b\u7684\u4e00\u53f0\u3002<\/strong><\/p>\n

\"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406<\/p>\n

image<\/p>\n

\u4f18\u70b9\uff1a\u4e3b\u4e3b\u7684\u597d\u5904\u5c31\u662f\u53ef\u4ee5\u628a\u5199\u64cd\u4f5c\u4e5f\u5206\u62c5\u4e00\u4e0b\uff0c\u4f46\u662f\u95ee\u9898\u6070\u6070\u5c31\u51fa\u5728\u5199\u64cd\u4f5c\u4e0a\uff0c\u5bfc\u81f4\u4e3b\u4e3b\u7684\u67b6\u6784\u6709\u5f88\u5927\u7684\u5c40\u9650\u6027\u3002<\/p>\n

\u7f3a\u70b9\uff1a\u4f8b\u5982\u4e3b\u673aA\u6709\u4e2a\u6ce8\u518c\u7684\u63d2\u5165\u64cd\u4f5c\uff0c\u751f\u6210\u7684id\u662f50\uff0c\u540c\u4e00\u65f6\u523b\u4e3b\u673aB\u4e5f\u6709\u4e2a\u63d2\u5165\u64cd\u4f5c\u751f\u6210\u7684id\u4e5f\u662f50\u3002\u7136\u540e\u5b83\u4eec\u4e4b\u95f4\u7684\u6570\u636e\u540c\u6b65\u4e86\uff0c\u4f60\u8bf4\u662f\u8c01\u8986\u76d6\u8c01\u5462\uff1f\u8c01\u8986\u76d6\u8c01\u90fd\u4e0d\u5bf9\uff01<\/p>\n

\u56e0\u6b64\u4e3b\u4e3b\u53ea\u9002\u7528\u4e8e\u53ef\u4ee5\u53cc\u5411\u590d\u5236\uff0c\u8986\u76d6\u7684\u6570\u636e(\u4f8b\u5982\u7528\u6237\u767b\u5f55\u751f\u6210\u7684token)\u3002\u4f46\u662f\u6211\u4eec\u5e73\u65e5\u91cc\u7edd\u5927\u90e8\u5206\u7684\u6570\u636e\u90fd\u4e0d\u5141\u8bb8\u3002<\/p>\n

mysql\u5e94\u8be5\u76ee\u524d\u662f\u53cc\u4e3b\u67b6\u6784\uff0c\u5f85\u8003\u8bc1(https:\/\/www.cnblogs.com\/ygqygq2\/p\/6045279.html)<\/p>\n

\u7ed3\u8bed<\/h3>\n

\u8fd9\u79cd\u53cc\u673a\u5b58\u50a8\u67b6\u6784\u4e00\u822c\u800c\u8a00\u5e94\u7528\u4e8e\u4e00\u4e9b\u4e1a\u52a1\u91cf\u4e0d\u5927\u7684\u573a\u666f\u3002\u4e3b\u8981\u8fd8\u662f\u4e3a\u4e86\u5b58\u50a8\u7684\u53ef\u7528\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e3b\u5907\u6a21\u5f0f\u548c\u4e3b\u4ece\u6a21\u5f0f_\u670d\u52a1\u5668\u4e3b\u5907\u5207\u6362\u539f\u7406\u4e3b\u5907\u4e3b\u4ece\u4e3b\u4e3b\u6a21\u5f0f\u76ee\u5f55\u4e3b\u5907\u4e3b\u4ece\u4e3b\u4e3b\u6a21\u5f0f\u4e3b\u5907\u4e3b\u4ece\u4e3b\u4e3b\u7ed3\u8bed\u5355\u70b9\u6545\u969c\u7684\u60c5\u51b5\u4e0d\u53ef\u907f\u514d\uff0c\u800c\u4e14...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5125"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=5125"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5125\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=5125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=5125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=5125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}