{"id":36111,"date":"2025-05-07T15:52:26","date_gmt":"2025-05-07T07:52:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/36111.html"},"modified":"2025-05-07T15:52:26","modified_gmt":"2025-05-07T07:52:26","slug":"%e7%bc%93%e5%ad%98%e5%8f%8a%e5%85%b6%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/36111.html","title":{"rendered":"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3"},"content":{"rendered":"<\/p>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u7f13\u5b58\u7684\u4f7f\u7528<\/li>\n<li>\u7f13\u5b58\u76843\u5927\u95ee\u9898<\/li>\n<li>\u7f13\u5b58\u7a7f\u900f&#xff08;cache penetration&#xff09;<\/li>\n<li>\n<ul>\n<li>\u4ec0\u4e48\u662f\u7f13\u5b58\u7a7f\u900f<\/li>\n<li>\n<ul>\n<li>Why does cache penetration occur?&#xff08;\u5982\u4f55\u4ea7\u751f\u7684&#xff1f;&#xff09;<\/li>\n<li>The hazard of cache penetration(\u7f13\u5b58\u7a7f\u900f\u7684\u5371\u5bb3)<\/li>\n<\/ul>\n<\/li>\n<li>\u5982\u4f55\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f\u95ee\u9898<\/li>\n<li>\n<ul>\n<li>\u89e3\u51b31:\u7f13\u5b58\u7a7a\u5bf9\u8c61(Cache empty data)&#xff08;\u7f3a\u70b9&#xff09;<\/li>\n<li>\u89e3\u51b32:BloomFilter<\/li>\n<li>\n<ul>\n<li>BloomFilter\u7684\u7f3a\u70b9<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u7f13\u5b58\u51fb\u7a7f&#xff08;Hotspot Invalid&#xff09;<\/li>\n<li>\n<ul>\n<li>\u4ec0\u4e48\u662f\u7f13\u5b58\u51fb\u7a7f\/\u70ed\u70b9\u5931\u6548\u95ee\u9898<\/li>\n<li>\u89e3\u51b3\u7f13\u5b58\u51fb\u7a7f\u7684\u4e00\u4e9b\u65b9\u6cd5<\/li>\n<li>\u4f7f\u7528\u4e92\u65a5\u9501\u89e3\u51b3\u7f13\u5b58\u51fb\u7a7f<\/li>\n<\/ul>\n<\/li>\n<li>\u7f13\u5b58\u96ea\u5d29&#xff08;cache avalanche&#xff09;<\/li>\n<li>\n<ul>\n<li>\u7f13\u5b58\u96ea\u5d29\u7684\u6982\u5ff5<\/li>\n<li>\u5982\u4f55\u89e3\u51b3\u7f13\u5b58\u96ea\u5d29<\/li>\n<li>\n<ul>\n<li>\u89e3\u51b3&#xff1a;\u7f13\u5b58\u540c\u4e00\u65f6\u95f4\u8fc7\u671f&#xff1f;<\/li>\n<li>\u89e3\u51b3&#xff1a;Redis\u6302\u6389&#xff1f;<\/li>\n<li>\n<ul>\n<li>Redis\u96c6\u7fa4&#xff1a;Using a Cache Cluster to Ensure High Availability of Caches<\/li>\n<li>\u672c\u5730\u7f13\u5b58&#043;\u9650\u6d41&#xff1a;Using Hystrix<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8b\u540e\u6062\u590d\u7f13\u5b58<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u65e0\u5e95\u6d1e\u95ee\u9898&#xff1a;Facebook&#039;s Memcached Multiget Hole: More Machines !&#061; More Capacity<\/li>\n<li>\n<ul>\n<li>\u65e0\u5e95\u6d1e\u4ea7\u751f\u539f\u56e0<\/li>\n<li>\u5371\u5bb3&#xff08;\u66f4\u591a\u7684\u673a\u5668\u4e0d\u4ee3\u8868\u66f4\u591a\u7684\u6027\u80fd&#xff09;<\/li>\n<li>\u9488\u5bf9\u6027\u7684\u4f18\u5316<\/li>\n<li>\n<ul>\n<li>hash\u7684\u4e24\u79cd\u65b9\u5f0f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u5982\u4f55\u4fdd\u8bc1\u7f13\u5b58\u4e0e\u6570\u636e\u5e93\u53cc\u5199\u65f6\u4e00\u81f4\u7684\u95ee\u9898<\/li>\n<li>\n<ul>\n<li>Cache Aside Pattern<\/li>\n<li>\u7f13\u5b58\/\u6570\u636e\u5e93\u66f4\u65b0\u7b56\u7565<\/li>\n<li>\n<ul>\n<li>\u5148\u66f4\u65b0\u6570\u636e\u5e93&#xff0c;\u518d\u66f4\u65b0\u7f13\u5b58<\/li>\n<li>\u5148\u5220\u9664\u7f13\u5b58&#xff0c;\u518d\u66f4\u65b0\u6570\u636e\u5e93&#xff08;\u6307\u671b\u4e0b\u4e00\u6b21\u8bfb\u64cd\u4f5c\u4f1a\u66f4\u65b0\u7f13\u5b58)(\u5220\u9664\u7f13\u5b58\u65b9\u68481)<\/li>\n<li>\u5148\u66f4\u65b0\u6570\u636e\u5e93&#xff0c;\u518d\u5220\u9664\u7f13\u5b58(\u6307\u671b\u4e0b\u4e00\u6b21\u8bfb\u64cd\u4f5c\u4f1a\u66f4\u65b0\u7f13\u5b58)(\u5220\u9664\u7f13\u5b58\u65b9\u68482)\u3010\u4f7f\u7528\u573a\u666f\u591a\u3011<\/li>\n<\/ul>\n<\/li>\n<li>\u65b9\u68481: \u91c7\u7528\u5ef6\u65f6\u53cc\u5220\u7b56\u7565&#xff1f;<\/li>\n<li>\u65b9\u68482: \u5f02\u6b65\u66f4\u65b0\u7f13\u5b58(\u57fa\u4e8e\u8ba2\u9605binlog\u7684\u540c\u6b65\u673a\u5236)<\/li>\n<li>\u65b9\u68483: \u4e32\u884c\u5316<\/li>\n<\/ul>\n<\/li>\n<li>\u7ebf\u4e0a\u5b9e\u9645\u7f13\u5b58\u4e8b\u6545&#xff1f;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u7f13\u5b58\u7684\u4f7f\u7528<\/h3>\n<p>In most Internet applications:<\/p>\n<li>When the business system initiates a certain query request, it first determines whether the data exists in the cache;<\/li>\n<li>If there is a cache, return the data directly;<\/li>\n<li>If the cache does not exist, query the database again and return the data.<\/li>\n<p>\u4e1a\u52a1\u67e5\u8be2 <span class=\"token operator\">&#061;<\/span>\u300b \u5224\u65ad\u7f13\u5b58\u547d\u4e2d <span class=\"token operator\">&#061;<\/span>\u300b \u76f4\u63a5\u8fd4\u56de\u6570\u636e\u7ed3\u679c<br \/>\n            \u5426\u5219&#xff1a; \u67e5\u8be2\u6570\u636e\u5e93&#xff0c;\u6570\u636e\u5e93\u6709\u5219\u66f4\u65b0\u7f13\u5b58&#xff0c;\u7136\u540e\u8fd4\u56de\u6570\u636e\u7ed3\u679c<\/p>\n<ul>\n<li>\u7f13\u5b58\u5206\u62c5\u90e8\u5206\u5bf9\u6570\u636e\u5e93\u7684\u8bf7\u6c42\u538b\u529b<\/li>\n<li>\u4f46\u7f13\u5b58\u4e0d\u53ef\u80fd\u628a\u6570\u636e\u5e93\u4e2d\u6240\u6709\u7684\u6570\u636e\u90fd\u7f13\u5b58\u8d77\u6765(\u6240\u4ee5<font color=\"red\">\u9700\u8981\u6709\u8fc7\u671f\u65f6\u95f4\u548c\u5220\u9664\u7b56\u7565<\/font>&#xff09;<\/li>\n<\/ul>\n<h3>\u7f13\u5b58\u76843\u5927\u95ee\u9898<\/h3>\n<li>\u7f13\u5b58\u7a7f\u900f&#xff08;cache penetration&#xff09;&#xff1a; \u6076\u610f\u8bbf\u95ee<\/li>\n<li>\u7f13\u5b58\u51fb\u7a7f&#xff08;Hotspot Invalid&#xff09;&#xff1a; \u6b63\u5e38\u8bbf\u95ee<\/li>\n<li>\u7f13\u5b58\u96ea\u5d29&#xff08;cache avalanche&#xff09;&#xff1a;\u975e\u6b63\u5e38\u73b0\u8c61<\/li>\n<p>\u82f1\u6587\u6bd4\u8f83\u597d\u8bb0\u5fc6&#xff1b;\u4e2d\u6587\u5bb9\u6613\u6df7\u6dc6\u7684\u5c31\u662f\u51fb\u7a7f\u548c\u7a7f\u900f\u7684\u6982\u5ff5&#xff0c;\u5982\u4f55\u8bb0\u5fc6&#xff1a;\u91cd\u70b9\u4e00\u4e2a&#034;\u900f&#034;\u5b57&#xff0c;\u8054\u60f3&#034;\u65e9\u5c31\u770b\u900f\u4f60\u4e86&#034;, \u77e5\u9053\u4f60\u662f\u4e2a\u574f\u4eba\u4e00\u6837&#xff0c;\u5373\u662f\u6076\u610f\u7684&#xff08;\u6bd4\u5982\u7528\u7a7a\u6570\u636e\u6216\u8005\u975e\u6cd5\u6570\u636e\u5927\u91cf\u8bbf\u95ee&#xff0c;\u662f\u4e00\u79cd\u6076\u610f\u884c\u4e3a&#xff09;<\/p>\n<table>\n<tr>\u5355\u8bcd\u89e3\u91ca<\/tr>\n<tbody>\n<tr>\n<td>penetration<\/td>\n<td>\u7f8e[\u02ccpen\u0259\u02c8tre\u026a\u0283n] n. \u7a7f\u900f; \u6e17\u900f; \u8fdb\u5165; \u63d2\u5165<\/td>\n<\/tr>\n<tr>\n<td>avalanche<\/td>\n<td>\u7f8e[\u02c8\u00e6v\u0259l\u00e6nt\u0283] n. \u96ea\u5d29; \u5c71\u5d29;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u7f13\u5b58\u7a7f\u900f&#xff08;cache penetration&#xff09;<\/h3>\n<h4>\u4ec0\u4e48\u662f\u7f13\u5b58\u7a7f\u900f<\/h4>\n<p>\u7f13\u5b58\u6ca1\u6709&#xff0c;\u6570\u636e\u5e93\u4e5f\u662f\u6ca1\u6709\u7684&#xff1b;\u82e5\u9ed1\u5ba2\u5229\u7528\u6b64\u6f0f\u6d1e\u6784\u9020\u6076\u610f\u6570\u636e\u8fdb\u884c\u653b\u51fb\u53ef\u80fd\u538b\u57ae\u6570\u636e\u5e93&#xff0c;\u5373\u6076\u610f\u6784\u9020\u4e00\u4e2a\u903b\u8f91\u4e0a\u4e0d\u5b58\u5728\u7684\u6570\u636e&#xff0c;\u7136\u540e\u5927\u91cf\u53d1\u9001\u8fd9\u4e2a\u8bf7\u6c42&#xff0c;\u8fd9\u6837\u6bcf\u6b21\u90fd\u4f1a\u88ab\u53d1\u9001\u5230\u6570\u636e\u5e93\u53bb\u5904\u7406&#xff0c;\u6700\u7ec8\u5bfc\u81f4\u6570\u636e\u5e93\u6302\u6389\u3002<\/p>\n<h5>Why does cache penetration occur?&#xff08;\u5982\u4f55\u4ea7\u751f\u7684&#xff1f;&#xff09;<\/h5>\n<p>There are many reasons for cache penetration, which are generally as follows:<\/p>\n<li>\n<p>Malicious attacks deliberately create a large amount of non-existent data to request our services. Since these data do not exist in the cache, massive requests fall into the database, which may cause the database to crash.<\/p>\n<\/li>\n<li>\n<p>Code logic error. This is the programmer\u2019s pot, nothing to say, must be avoided in development!<\/p>\n<\/li>\n<table>\n<tr>\u5355\u8bcd\u77ed\u8bed\u89e3\u91ca<\/tr>\n<tbody>\n<tr>\n<td>malicious<\/td>\n<td>adj.\u6076\u610f\u7684&#xff0c;\u6709\u654c\u610f\u7684&#xff1b; \u84c4\u610f\u7684&#xff1b; \u9884\u8c0b\u7684&#xff1b; \u5b58\u5fc3\u4e0d\u826f\u7684<\/td>\n<\/tr>\n<tr>\n<td>attack<\/td>\n<td>vt.&amp; vi.\u653b\u51fb&#xff0c;\u8fdb\u653b&#xff0c;\u62a8\u51fb&#xff1b;n.\u653b\u51fb&#xff1b; \u62a8\u51fb&#xff1b;&#xff08;\u961f\u5458\u7b49\u7684&#xff09;\u8fdb\u653b&#xff1b;&#xff08;\u75be\u75c5&#xff09;\u4fb5\u88ad&#xff1b;vt.\u62a8\u51fb&#xff1b; \u975e\u96be&#xff1b; \u4fb5\u88ad&#xff1b; \u635f\u5bb3<\/td>\n<\/tr>\n<tr>\n<td>deliberate<\/td>\n<td>adj.\u6545\u610f\u7684&#xff1b; \u84c4\u610f\u7684&#xff1b; \u6df1\u601d\u719f\u8651\u7684&#xff1b; \u614e\u91cd\u7684&#xff1b;vt.\u6743\u8861&#xff1b;vi.\u719f\u8651&#xff1b; \u5546\u8ba8&#xff1b;<\/td>\n<\/tr>\n<tr>\n<td>pot<\/td>\n<td>n.\u7f50&#xff1b; \u4e00\u7f50&#xff1b; &#xff08;\u67d0\u79cd\u7528\u9014\u7684&#xff09;\u5bb9\u5668&#xff1b; \u9676\u76c6 \u9505&#xff1b;vt.\u628a\u2026\u683d\u5165\u76c6\u4e2d&#xff1b; \u79cd\u76c6\u683d&#xff1b; \u53f0\u7403\u3001\u666e\u5c14\u548c\u65af\u8bfa\u514b\u51fb&#xff08;\u7403&#xff09;\u5165\u888b&#xff1b; \u5c04\u6740; vi.\u968f\u624b\u5c04\u51fb&#xff1b;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>The hazard of cache penetration(\u7f13\u5b58\u7a7f\u900f\u7684\u5371\u5bb3)<\/h5>\n<p>If there are massive data that does not exist in the query request, then these massive requests will fall into the database, and the database pressure will increase dramatically, which may lead to system crash. (You have to know that the most vulnerable in the current business system is IO, a little bit It will collapse under pressure, so we have to think of ways to protect it).<\/p>\n<table>\n<tr>\u5355\u8bcd\u77ed\u8bed\u89e3\u91ca<\/tr>\n<tbody>\n<tr>\n<td>hazard<\/td>\n<td>vt.\u5192\u9669&#xff1b; \u4f7f\u906d\u53d7\u5371\u9669&#xff1b;n.\u5371\u9669&#xff1b; \u5192\u9669\u7684\u4e8b&#xff1b; \u673a\u4f1a&#xff1b; \u53cc\u9ab0\u5b50\u6e38\u620f<\/td>\n<\/tr>\n<tr>\n<td>massive<\/td>\n<td>adj.\u5927\u7684&#xff0c;\u91cd\u7684&#xff1b; \u5927\u5757\u7684&#xff0c;\u5927\u91cf\u7684&#xff1b; \u9b41\u4f1f\u7684&#xff0c;\u7ed3\u5b9e\u7684&#xff1b; \u5927\u89c4\u6a21\u7684<\/td>\n<\/tr>\n<tr>\n<td>fall into<\/td>\n<td>\u5206\u6210&#xff1b; \u6389\u8fdb&#xff0c;\u9677\u5165&#xff1b; \u5815\u5165&#xff1b; \u9677\u4e8e<\/td>\n<\/tr>\n<tr>\n<td>dramatically<\/td>\n<td>adv.\u620f\u5267\u6027\u5730&#xff0c;\u5f15\u4eba\u6ce8\u76ee\u5730&#xff1b; \u663e\u8457\u5730&#xff0c;\u5267\u70c8\u5730&#xff1b;<\/td>\n<\/tr>\n<tr>\n<td>vulnerable<\/td>\n<td>adj.&#xff08;\u5730\u65b9&#xff09;\u6613\u53d7\u653b\u51fb\u7684&#xff1b; \u6613\u53d7\u4f24\u7684&#xff1b; \u6613\u53d7\u6279\u8bc4\u7684&#xff1b; [\u6865\u724c]\u5df2\u6210\u5c40\u7684<\/td>\n<\/tr>\n<tr>\n<td>collapse<\/td>\n<td>vi.\u6298\u53e0&#xff1b; \u5012\u584c&#xff1b; \u5d29\u6e83&#xff1b; &#xff08;\u5c24\u6307\u5de5\u4f5c\u52b3\u7d2f\u540e&#xff09;\u5750\u4e0b; vt.\u4f7f\u5012\u584c&#xff1b; \u4f7f\u574d\u584c&#xff1b; \u4f7f\u74e6\u89e3&#xff1b;n.\u57ae\u53f0&#xff1b; &#xff08;\u8eab\u4f53\u7684&#xff09;\u8870\u5f31&#xff1b;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5982\u4f55\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f\u95ee\u9898<\/h4>\n<p>\u200c1. \u7f13\u5b58\u7a7a\u503c\u200c&#xff1a;\u5f53\u67e5\u8be2\u7ed3\u679c\u4e3a\u7a7a\u65f6&#xff0c;\u5c06\u7a7a\u7ed3\u679c\u4e5f\u8fdb\u884c\u7f13\u5b58&#xff0c;\u4f46\u8bbe\u7f6e\u4e00\u4e2a\u8f83\u77ed\u7684\u8fc7\u671f\u65f6\u95f4\u3002\u8fd9\u6837\u5728\u63a5\u4e0b\u6765\u7684\u4e00\u6bb5\u65f6\u95f4\u5185&#xff0c;\u5982\u679c\u518d\u6b21\u8bf7\u6c42\u76f8\u540c\u7684\u6570\u636e&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u4ece\u7f13\u5b58\u4e2d\u83b7\u53d6&#xff0c;\u800c\u4e0d\u662f\u518d\u6b21\u8bbf\u95ee\u6570\u636e\u5e93\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6709\u6548&#xff0c;\u4f46\u53ef\u80fd\u4f1a\u56e0\u4e3a\u5927\u91cf\u6076\u610f\u8bf7\u6c42\u5bfc\u81f4\u7f13\u5b58\u7cfb\u7edf\u5185\u5b58\u5360\u7528\u8fc7\u9ad8&#xff0c;\u9700\u8981\u914d\u5408\u98ce\u63a7\u7cfb\u7edf\u4f7f\u7528\u200c<\/p>\n<p>\u200c2. \u4f7f\u7528\u5e03\u9686\u8fc7\u6ee4\u5668\u200c&#xff1a;\u5e03\u9686\u8fc7\u6ee4\u5668\u662f\u4e00\u79cd\u6570\u636e\u7ed3\u6784&#xff0c;\u7528\u4e8e\u5feb\u901f\u5224\u65ad\u4e00\u4e2a\u5143\u7d20\u662f\u5426\u5b58\u5728\u4e8e\u4e00\u4e2a\u96c6\u5408\u4e2d\u3002\u5b83\u5305\u542b\u4e00\u4e2a\u4f4d\u6570\u7ec4\u548c\u4e00\u7ec4\u54c8\u5e0c\u51fd\u6570\u3002\u5728\u67e5\u8be2\u4e00\u4e2a\u5143\u7d20\u662f\u5426\u5b58\u5728\u65f6&#xff0c;\u4f1a\u5c06\u8be5\u5143\u7d20\u7ecf\u8fc7\u591a\u4e2a\u54c8\u5e0c\u51fd\u6570\u6620\u5c04\u5230\u4f4d\u6570\u7ec4\u4e0a\u7684\u591a\u4e2a\u4f4d\u7f6e&#xff0c;\u5982\u679c\u6240\u6709\u4f4d\u7f6e\u7684\u503c\u90fd\u4e3a1&#xff0c;\u5219\u8ba4\u4e3a\u5143\u7d20\u5b58\u5728&#xff1b;\u5982\u679c\u5b58\u5728\u4efb\u4e00\u4f4d\u7f6e\u7684\u503c\u4e0d\u4e3a1&#xff0c;\u5219\u8ba4\u4e3a\u5143\u7d20\u4e0d\u5b58\u5728\u3002\u5e03\u9686\u8fc7\u6ee4\u5668\u53ef\u4ee5\u6709\u6548\u5730\u51cf\u5c11\u5bf9\u6570\u636e\u5e93\u7684\u67e5\u8be2\u538b\u529b&#xff0c;\u4f46\u5b58\u5728\u4e00\u5b9a\u7684\u8bef\u5224\u7387\u200c<\/p>\n<p>\u200c3. \u4e1a\u52a1\u5c42\u6821\u9a8c\u200c&#xff1a;\u5728\u63a5\u53e3\u5c42\u589e\u52a0\u6821\u9a8c&#xff0c;\u5bf9\u4e8e\u660e\u663e\u9519\u8bef\u7684\u53c2\u6570\u76f4\u63a5\u62e6\u622a\u8fd4\u56de\u3002\u4f8b\u5982&#xff0c;\u8bf7\u6c42\u53c2\u6570\u4e3a\u4e3b\u952e\u81ea\u589eid\u4e14\u5c0f\u4e8e0\u7684\u60c5\u51b5\u53ef\u4ee5\u76f4\u63a5\u8fd4\u56de\u9519\u8bef\u8bf7\u6c42\u3002\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u65e0\u6548\u7684\u6570\u636e\u5e93\u67e5\u8be2&#xff0c;\u964d\u4f4e\u6570\u636e\u5e93\u538b\u529b\u200c<\/p>\n<p>\u200c4. \u4f7f\u7528\u9501\u673a\u5236\u200c&#xff1a;\u5f53\u8bf7\u6c42\u53d1\u73b0\u7f13\u5b58\u4e0d\u5b58\u5728\u65f6&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u9501\u673a\u5236\u6765\u907f\u514d\u591a\u4e2a\u76f8\u540c\u7684\u8bf7\u6c42\u540c\u65f6\u8bbf\u95ee\u6570\u636e\u5e93&#xff0c;\u53ea\u8ba9\u4e00\u4e2a\u8bf7\u6c42\u53bb\u52a0\u8f7d\u6570\u636e&#xff0c;\u5176\u5b83\u8bf7\u6c42\u7b49\u5f85\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u89e3\u51b3\u6570\u636e\u5e93\u538b\u529b\u8fc7\u5927\u95ee\u9898&#xff0c;\u4f46\u53ef\u80fd\u4f1a\u56e0\u4e3a\u201c\u8bef\u6740\u201d\u73b0\u8c61\u5bfc\u81f4\u7528\u6237\u7b49\u5f85\u65f6\u95f4\u8fc7\u957f\u200c<\/p>\n<h5>\u89e3\u51b31:\u7f13\u5b58\u7a7a\u5bf9\u8c61(Cache empty data)&#xff08;\u7f3a\u70b9&#xff09;<\/h5>\n<ul>\n<li>\u6307\u6807\u4e0d\u6cbb\u672c(\u7a7a\u6570\u636e\u5bf9\u8c61\u672c\u8eab\u7f13\u5b58\u4e5f\u662f\u6709\u8fc7\u671f\u65f6\u95f4\u7684)<\/li>\n<li>\u5927\u91cf\u7a7a\u503c\u4f1a\u5360\u7528\u7f13\u5b58\u5185\u5b58&#xff1a;\u4e00\u822c\u5c31\u7f13\u5b58\u4e00\u4e2a\u7a7a\u5bf9\u8c61&#xff0c;\u4f46\u662f\u663e\u7136\u6709\u5f88\u591a\u7a7a\u5bf9\u8c61&#xff0c;\u6d88\u8017\u5927\u91cf\u7a7a\u5bf9\u8c61\u7f13\u5b58\u8d44\u6e90<\/li>\n<\/ul>\n<h5>\u89e3\u51b32:BloomFilter<\/h5>\n<p>It needs to add a barrier&#xff08;n.\u969c\u788d&#xff1b; \u5c4f\u969c&#xff1b; \u6805\u680f&#xff1b; \u5206\u754c\u7ebfvt.\u628a\u2026\u5173\u5165\u6805\u680f&#xff1b; \u7528\u6805\u680f\u56f4\u4f4f&#xff1b;&#xff09; before the cache, which &#xff1b;stores all the keys that exist in the current database.<\/p>\n<p>\u5c06\u6570\u636e\u5e93\u4e2d\u6240\u6709\u7684\u67e5\u8be2\u6761\u4ef6&#xff0c;\u653e\u5165\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d&#xff1b;\u5f53\u4e00\u4e2a\u67e5\u8be2\u8bf7\u6c42\u8fc7\u6765\u65f6&#xff0c;\u5148\u7ecf\u8fc7\u5e03\u9686\u8fc7\u6ee4\u5668\u8fdb\u884c\u67e5&#xff0c;\u5982\u679c\u5224\u65ad\u8bf7\u6c42\u67e5\u8be2\u503c\u5b58\u5728&#xff0c;\u5219\u7ee7\u7eed\u67e5&#xff1b;\u5982\u679c\u5224\u65ad\u8bf7\u6c42\u67e5\u8be2\u4e0d\u5b58\u5728&#xff0c;\u5219\u76f4\u63a5\u4e22\u5f03\u3002<\/p>\n<p>springboot demo\u9879\u76ee<\/p>\n<ul>\n<li>\u4f4e\u5e76\u53d1&#xff0c;\u5b9a\u65f6\u4efb\u52a1\u53bb\u6bcf\u5929\u66f4\u65b0bloomFilter&#xff0c;\u7ef4\u62a4\u6bcf\u5929\u7684\u4e00\u4e2abloomFilter<\/li>\n<li>\u521d\u59cb\u9884\u70ed&#xff0c;\u52a8\u6001\u65b0\u589e<\/li>\n<\/ul>\n<h6>BloomFilter\u7684\u7f3a\u70b9<\/h6>\n<ul>\n<li>\n<p>\u5b58\u5728\u8bef\u5224(\u5f53\u4e00\u4e2a\u5e03\u9686\u8fc7\u6ee4\u5668\u5224\u65ad\u4e00\u4e2a\u6570\u636e\u5728\u96c6\u5408\u4e2d\u5b58\u5728\u65f6&#xff0c;\u6709\u4e00\u5b9a\u7684\u53ef\u80fd\u6027\u8bef\u5224;\u4e0d\u5b58\u5728\u7684\u5219100%\u6b63\u786e)\u3002\u5982\u679cbloom filter\u4e2d\u5b58\u50a8\u7684\u662f\u9ed1\u540d\u5355&#xff0c;\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7\u5efa\u7acb\u4e00\u4e2a\u767d\u540d\u5355\u6765\u5b58\u50a8\u53ef\u80fd\u4f1a\u8bef\u5224\u7684\u5143\u7d20<\/p>\n<\/li>\n<li>\n<p>\u5220\u9664\u56f0\u96be\u3002\u4e00\u4e2a\u653e\u5165\u5bb9\u5668\u7684\u5143\u7d20\u6620\u5c04\u5230bit\u6570\u7ec4\u7684k\u4e2a\u4f4d\u7f6e\u4e0a\u662f1&#xff0c;\u5220\u9664\u7684\u65f6\u5019\u4e0d\u80fd\u7b80\u5355\u7684\u76f4\u63a5\u7f6e\u4e3a0&#xff0c;\u53ef\u80fd\u4f1a\u5f71\u54cd\u5176\u4ed6\u5143\u7d20\u7684\u5224\u65ad\u3002\u53ef\u4ee5\u91c7\u7528Counting Bloom Filter<\/p>\n<\/li>\n<\/ul>\n<p>Counting Bloom Filter:\u5c06\u6807\u51c6Bloom Filter\u4f4d\u6570\u7ec4\u7684\u6bcf\u4e00\u4f4d\u6269\u5c55\u4e3a\u4e00\u4e2a\u5c0f\u7684\u8ba1\u6570\u5668&#xff08;Counter&#xff09;&#xff0c;\u5728\u63d2\u5165\u5143\u7d20\u65f6\u7ed9\u5bf9\u5e94\u7684k&#xff08;k\u4e3a\u54c8\u5e0c\u51fd\u6570\u4e2a\u6570&#xff09;\u4e2aCounter\u7684\u503c\u5206\u522b\u52a01&#xff0c;\u5220\u9664\u5143\u7d20\u65f6\u7ed9\u5bf9\u5e94\u7684k\u4e2aCounter\u7684\u503c\u5206\u522b\u51cf1\u3002Counting Bloom Filter\u901a\u8fc7\u591a\u5360\u7528\u51e0\u500d\u7684\u5b58\u50a8\u7a7a\u95f4\u7684\u4ee3\u4ef7&#xff0c;\u7ed9Bloom Filter\u589e\u52a0\u4e86\u5220\u9664\u64cd\u4f5c<\/p>\n<h3>\u7f13\u5b58\u51fb\u7a7f&#xff08;Hotspot Invalid&#xff09;<\/h3>\n<h4>\u4ec0\u4e48\u662f\u7f13\u5b58\u51fb\u7a7f\/\u70ed\u70b9\u5931\u6548\u95ee\u9898<\/h4>\n<p>\u7f13\u5b58\u4e2d\u6ca1\u6709&#xff0c;\u6570\u636e\u5e93\u4e2d\u6709&#xff1b;\u5728\u5e76\u53d1\u8bbf\u95ee\u7684\u60c5\u51b5\u4e0b&#xff0c;\u53ef\u80fd\u5927\u90e8\u5206\u8bf7\u6c42\u90fd\u662f\u8d70\u6570\u636e\u5e93\u7684&#xff0c;\u8fd9\u5c06\u5f15\u8d77\u6570\u636e\u5e93\u538b\u529b\u7684\u77ac\u95f4\u589e\u5927&#xff0c;\u9020\u6210\u8fc7\u5927\u538b\u529b\u3002<\/p>\n<p>\u51fb\u7a7f\u662f\u6307\u4e00\u4e2a\u70ed\u70b9key&#xff08;\u975e\u5e38\u9891\u7e41\u88ab\u8bbf\u95ee\u7684key&#xff09;\u5728\u7f13\u5b58\u4e2d\u7a81\u7136\u5931\u6548&#xff0c;\u800c\u6b64\u65f6\u5927\u91cf\u7684\u5e76\u53d1\u8bf7\u6c42\u540c\u65f6\u8bbf\u95ee\u8fd9\u4e2akey&#xff0c;\u8fd9\u4e9b\u8bf7\u6c42\u4f1a\u76f4\u63a5\u7a7f\u900f\u5230\u6570\u636e\u5e93&#xff0c;\u9020\u6210\u6570\u636e\u5e93\u77ac\u95f4\u538b\u529b\u8fc7\u5927\u3002\u4f8b\u5982&#xff0c;\u5728\u4e00\u4e2a\u70ed\u95e8\u5546\u54c1\u79d2\u6740\u6d3b\u52a8\u4e2d&#xff0c;\u8be5\u5546\u54c1\u7684\u7f13\u5b58\u7a81\u7136\u8fc7\u671f&#xff0c;\u5927\u91cf\u7528\u6237\u540c\u65f6\u8bf7\u6c42\u8fd9\u4e2a\u5546\u54c1\u7684\u4fe1\u606f&#xff0c;\u5c31\u4f1a\u5bfc\u81f4\u51fb\u7a7f\u73b0\u8c61\u3002<\/p>\n<h4>\u89e3\u51b3\u7f13\u5b58\u51fb\u7a7f\u7684\u4e00\u4e9b\u65b9\u6cd5<\/h4>\n<p>\u200c1. \u4f7f\u7528\u4e92\u65a5\u9501\u200c&#xff1a;\u5728\u83b7\u53d6\u6570\u636e\u65f6&#xff0c;\u4f7f\u7528\u5206\u5e03\u5f0f\u9501&#xff08;\u5982Redis\u7684\u5206\u5e03\u5f0f\u9501&#xff09;\u6765\u63a7\u5236\u540c\u65f6\u53ea\u6709\u4e00\u4e2a\u8bf7\u6c42\u53ef\u4ee5\u53bb\u540e\u7aef\u83b7\u53d6\u6570\u636e&#xff0c;\u5176\u4ed6\u8bf7\u6c42\u9700\u8981\u7b49\u5f85\u9501\u91ca\u653e\u3002\u8fd9\u6837\u53ef\u4ee5\u9632\u6b62\u591a\u4e2a\u8bf7\u6c42\u540c\u65f6\u7a7f\u900f\u5230\u540e\u7aef\u5b58\u50a8\u7cfb\u7edf\u200c<\/p>\n<p>\u200c2. \u8bbe\u7f6e\u70ed\u70b9\u6570\u636e\u6c38\u4e0d\u8fc7\u671f\u200c&#xff1a;\u5bf9\u4e8e\u4e00\u4e9b\u70ed\u70b9\u6570\u636e&#xff0c;\u53ef\u4ee5\u5c06\u5176\u8bbe\u7f6e\u4e3a\u6c38\u4e0d\u8fc7\u671f&#xff0c;\u786e\u4fdd\u5373\u4f7f\u6570\u636e\u8fc7\u671f\u540e&#xff0c;\u4ecd\u7136\u53ef\u4ee5\u4ece\u7f13\u5b58\u4e2d\u83b7\u53d6\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u51cf\u5c11\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u538b\u529b&#xff0c;\u4f46\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e0d\u4e00\u81f4\u7684\u95ee\u9898\u200c<\/p>\n<p>\u200c3. \u70ed\u70b9\u6570\u636e\u9884\u52a0\u8f7d\u200c&#xff1a;\u5728\u7cfb\u7edf\u542f\u52a8\u6216\u9ad8\u5cf0\u671f\u5230\u6765\u4e4b\u524d&#xff0c;\u5c06\u70ed\u70b9\u6570\u636e\u9884\u5148\u52a0\u8f7d\u5230\u7f13\u5b58\u4e2d&#xff0c;\u4ee5\u51cf\u5c11\u5bf9\u540e\u7aef\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u538b\u529b\u200c<\/p>\n<p>\u200c4. \u903b\u8f91\u8fc7\u671f\u200c&#xff1a;\u5728\u83b7\u53d6\u6570\u636e\u65f6&#xff0c;\u83b7\u53d6\u4e92\u65a5\u9501\u7684\u7ebf\u7a0b\u8fd4\u56de\u4e00\u4e2a\u8fc7\u671f\u6570\u636e&#xff0c;\u540c\u65f6\u5f00\u542f\u4e00\u4e2a\u65b0\u7ebf\u7a0b\u53bb\u67e5\u8be2\u6570\u636e\u5e93\u5e76\u66f4\u65b0\u7f13\u5b58\u3002\u5176\u4ed6\u7ebf\u7a0b\u7b49\u5f85\u7f13\u5b58\u66f4\u65b0\u540e\u518d\u83b7\u53d6\u6570\u636e&#xff0c;\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u6027\u80fd\u635f\u8017\u200c<\/p>\n<h4>\u4f7f\u7528\u4e92\u65a5\u9501\u89e3\u51b3\u7f13\u5b58\u51fb\u7a7f<\/h4>\n<p>\u4f7f\u7528\u4e92\u65a5\u9501&#xff0c;\u66f4\u65b0\u7f13\u5b58\u7684\u65f6\u5019&#xff0c;\u53ea\u6709\u4e00\u4e2a\u7ebf\u7a0b\u66f4\u65b0\u7f13\u5b58&#xff0c;\u5176\u5b83\u7ebf\u7a0b\u80fd\u4e0d\u67e5\u8be2\u6570\u636e\u5e93&#xff0c;\u53bb\u67e5\u66f4\u65b0\u7684\u90a3\u4e2a\u7f13\u5b58<\/p>\n<p>eg1&#xff0c;\u4e00\u822c\u7684\u5199\u6cd5\u5982\u4e0b<\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">synchronized<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token function\">getCacheData<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token class-name\">String<\/span> cacheData <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token comment\">\/\/Read redis<\/span><br \/>\n  cacheData <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromRedis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>cacheData<span class=\"token punctuation\">.<\/span><span class=\"token function\">isEmpty<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u8fd9\u91cc\u53ef\u80fd\u5e76\u53d1\u7ebf\u7a0b\u90fd\u8fdb\u6765&#xff0c;\u56e0\u4e3a\u90fd\u5224\u65ad\u7f13\u5b58\u91cc\u9762\u6ca1\u6709&#xff0c;\u8fd9\u6837\u90fd\u8981\u67e5\u6570\u636e\u5e93<\/span><br \/>\n    <span class=\"token comment\">\/\/Read database<\/span><br \/>\n    cacheData <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromDB<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/Write redis<\/span><br \/>\n    <span class=\"token function\">setDataToCache<\/span><span class=\"token punctuation\">(<\/span>cacheData<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> cacheData<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>eg2, \u52a0\u4e0a\u7c97\u7c92\u5ea6\u7684\u9501<\/p>\n<p><span class=\"token keyword\">static<\/span> <span class=\"token class-name\">Object<\/span> lock <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">Object<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token function\">getCacheData<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token class-name\">String<\/span> cacheData <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token comment\">\/\/Read redis<\/span><br \/>\n  cacheData <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromRedis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>cacheData<span class=\"token punctuation\">.<\/span><span class=\"token function\">isEmpty<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u67e5\u6570\u636e\u5e93\u548c\u66f4\u65b0\u7f13\u5b58\u7684\u64cd\u4f5c\u9501\u4e0a&#xff0c;\u8fd9\u6837\u5c31\u80fd\u786e\u4fdd&#xff0c;\u5176\u5b83\u7ebf\u7a0b\u540e\u7eed\u8bbf\u95ee\u7684\u65f6\u5019\u80fd\u4ece\u7f13\u5b58\u83b7\u53d6\u5230&#xff0c;\u800c\u4e0d\u662f\u67e5\u8be2\u6570\u636e\u5e93<\/span><br \/>\n    <span class=\"token keyword\">synchronized<\/span> <span class=\"token punctuation\">(<\/span>lock<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token comment\">\/\/Read database<\/span><br \/>\n      cacheData <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromDB<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token comment\">\/\/Write redis<\/span><br \/>\n      <span class=\"token function\">setDataToCache<\/span><span class=\"token punctuation\">(<\/span>cacheData<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> cacheData<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>eg3, \u4f7f\u7528\u4e92\u65a5\u9501&#xff1a;\u5f97\u5230\u9501\u7684\u7ebf\u7a0b\u5c31\u8bfb\u6570\u636e\u5199\u7f13\u5b58&#xff0c;\u6ca1\u5f97\u5230\u9501\u7684\u7ebf\u7a0b\u53ef\u4ee5\u4e0d\u7528\u963b\u585e&#xff0c;\u7ee7\u7eed\u4ece\u7f13\u5b58\u4e2d\u8bfb\u6570\u636e&#xff0c;\u5982\u679c\u6ca1\u6709\u8bfb\u5230\u6570\u636e\u5c31\u4f11\u606f\u4f1a\u518d\u6765\u8bd5\u8bd5<\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token function\">getCacheData<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token class-name\">String<\/span> result <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token comment\">\/\/Read redis<\/span><br \/>\n  result <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromRedis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>result<span class=\"token punctuation\">.<\/span><span class=\"token function\">isEmpty<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>reenLock<span class=\"token punctuation\">.<\/span><span class=\"token function\">tryLock<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/Read database<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromDB<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/Write redis<\/span><br \/>\n        <span class=\"token function\">setDataToCache<\/span><span class=\"token punctuation\">(<\/span>result<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><span class=\"token keyword\">catch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">Exception<\/span> e<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/&#8230;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><span class=\"token keyword\">finally<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        reenLock<span class=\"token punctuation\">.<\/span>unlock <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ release lock<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token comment\">\/\/ \u62a2\u9501\u5931\u8d25&#xff0c;\u5219\u518d\u6b21\u4ece\u7f13\u5b58\u83b7\u53d6&#xff0c;\u5982\u679c\u83b7\u53d6\u4e0d\u5230&#xff0c;\u5c1d\u8bd5sleep\u4e00\u6bb5\u65f6\u95f4&#xff0c;\u518d\u6b21\u9012\u5f52\u56de\u8c03\u8be5\u65b9\u6cd5<\/span><br \/>\n      <span class=\"token comment\">\/\/ Note: this can be combined with the <\/span><br \/>\n      <span class=\"token comment\">\/\/ following double caching mechanism:<\/span><\/p>\n<p>      <span class=\"token comment\">\/\/ If you can&#039;t grab the lock, <\/span><br \/>\n      <span class=\"token comment\">\/\/ query the secondary cache<\/span><\/p>\n<p>      <span class=\"token comment\">\/\/ Read redis<\/span><br \/>\n      result <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">getDataFromRedis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>result<span class=\"token punctuation\">.<\/span><span class=\"token function\">isEmpty<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n          <span class=\"token class-name\">Thread<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">sleep<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">100<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">catch<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\">InterruptedException<\/span> e<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n          <span class=\"token comment\">\/\/&#8230;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token function\">getCacheData<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> result<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>\u7f13\u5b58\u96ea\u5d29&#xff08;cache avalanche&#xff09;<\/h3>\n<h4>\u7f13\u5b58\u96ea\u5d29\u7684\u6982\u5ff5<\/h4>\n<p>If the cache goes down for some reason, the massive query request that was originally blocked by the cache will flock to the database like a mad dog. At this point, if the database can\u2019t withstand this huge pressure, it will collapse. This is the cache avalanche.<\/p>\n<p>\u7f13\u5b58\u96ea\u5d29\u6307\u7684\u662f\u7531\u4e8e\u7f13\u5b58\u670d\u52a1\u5668\u5728\u540c\u4e00\u65f6\u95f4\u5927\u9762\u79ef\u5931\u6548\u6216\u5b95\u673a&#xff0c;\u5bfc\u81f4\u5927\u91cf\u8bf7\u6c42\u76f4\u63a5\u6253\u5230\u6570\u636e\u5e93&#xff0c;\u77ac\u95f4\u5f15\u53d1\u6570\u636e\u5e93\u538b\u529b\u6fc0\u589e&#xff0c;\u751a\u81f3\u5bfc\u81f4\u6570\u636e\u5e93\u5d29\u6e83\u3002<\/p>\n<table>\n<tr>\u5355\u8bcd\u77ed\u8bed\u89e3\u91ca<\/tr>\n<tbody>\n<tr>\n<td>go down<\/td>\n<td>\u505c\u6b62&#xff1b; \u88ab\u63a5\u53d7&#xff1b; \u6c89\u4e0b&#xff1b; \u88ab\u6253\u8d25<\/td>\n<\/tr>\n<tr>\n<td>flock to<\/td>\n<td>\u6210\u7fa4\u7ed3\u961f\u5730\u8d70\u5411\u2026&#xff1b;<\/td>\n<\/tr>\n<tr>\n<td>mad<\/td>\n<td>adj.\u75af\u72c2\u7684&#xff1b; \u731b\u70c8\u7684&#xff1b; \u7740\u8ff7\u7684&#xff1b; \u3014\u53e3\u8bed\u3015\u6124\u6012\u7684&#xff0c;\u751f\u6c14\u7684&#xff1b;vt.\u4f7f\u75af\u72c2&#xff1b;<\/td>\n<\/tr>\n<tr>\n<td>withstand<\/td>\n<td>vt.\u7ecf\u53d7&#xff0c;\u627f\u53d7&#xff0c;\u7981\u5f97\u8d77&#xff1b; \u53cd\u6297&#xff1b;vi.\u53cd\u6297&#xff1b; \u8010\u5f97\u4f4f&#xff0c;\u7981\u5f97\u8d77&#xff1b;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<li>Redis\u96c6\u7fa4\u6302\u6389\u4e86&#xff0c;\u8bf7\u6c42\u5168\u90e8\u90fd\u8d70\u6570\u636e\u5e93\u4e86<\/li>\n<li>\u5bf9\u7f13\u5b58\u6570\u636e\u8bbe\u7f6e\u76f8\u540c\u7684\u8fc7\u671f\u65f6\u95f4&#xff0c;\u5bfc\u81f4\u67d0\u6bb5\u65f6\u95f4\u5185\u7f13\u5b58\u5168\u90e8\u90fd\u5931\u6548&#xff0c;\u8bf7\u6c42\u5168\u90e8\u8d70\u6570\u636e\u5e93\u4e86<\/li>\n<p>\u4e0d\u7ba1\u662f\u539f\u56e01\u8fd8\u662f\u539f\u56e02&#xff0c;\u5fc5\u7136\u4f1a\u5bfc\u81f4\u5927\u91cf\u8bf7\u6c42\u8d70\u6570\u636e\u5e93\u4e86&#xff1b;\u7f13\u5b58\u96ea\u5d29\u5982\u679c\u53d1\u751f\u4e86&#xff0c;\u5f88\u53ef\u80fd\u5c31\u628a\u6211\u4eec\u7684\u6570\u636e\u5e93\u641e\u57ae&#xff0c;\u5bfc\u81f4\u6574\u4e2a\u670d\u52a1\u762b\u75ea&#xff01;<\/p>\n<h4>\u5982\u4f55\u89e3\u51b3\u7f13\u5b58\u96ea\u5d29<\/h4>\n<h5>\u89e3\u51b3&#xff1a;\u7f13\u5b58\u540c\u4e00\u65f6\u95f4\u8fc7\u671f&#xff1f;<\/h5>\n<p>\u5bf9\u4e8e&#034;\u7f13\u5b58\u6570\u636e&#034;\u8bbe\u7f6e\u4e86\u76f8\u540c\u7684\u8fc7\u671f\u65f6\u95f4&#xff0c;\u5bfc\u81f4\u67d0\u6bb5\u65f6\u95f4\u5185\u7f13\u5b58\u96c6\u4f53\u5931\u6548&#xff0c;\u8bf7\u6c42\u5168\u90e8\u8d70\u6570\u636e\u5e93&#034;\u8fd9\u79cd\u60c5\u51b5&#xff0c;\u975e\u5e38\u597d\u89e3\u51b3&#xff1a;<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5&#xff1a;\u5728\u7f13\u5b58\u7684\u65f6\u5019\u7ed9\u8fc7\u671f\u65f6\u95f4\u52a0\u4e0a\u4e00\u4e2a\u968f\u673a\u503c&#xff0c;\u8fd9\u6837\u5c31\u4f1a\u5927\u5e45\u5ea6\u7684\u51cf\u5c11\u7f13\u5b58\u5728\u540c\u4e00\u65f6\u95f4\u8fc7\u671f\u3002<\/p>\n<h5>\u89e3\u51b3&#xff1a;Redis\u6302\u6389&#xff1f;<\/h5>\n<h6>Redis\u96c6\u7fa4&#xff1a;Using a Cache Cluster to Ensure High Availability of Caches<\/h6>\n<ul>\n<li>\u4e8b\u53d1\u524d&#xff1a;\u5b9e\u73b0Redis\u7684\u9ad8\u53ef\u7528(\u4e3b\u4ece\u67b6\u6784&#043;Sentinel\u6a21\u5f0f\u6216\u8005Redis Cluster)&#xff0c;\u5c3d\u91cf\u907f\u514dRedis\u6302\u6389\u8fd9\u79cd\u60c5\u51b5\u53d1\u751f\u3002<\/li>\n<\/ul>\n<h6>\u672c\u5730\u7f13\u5b58&#043;\u9650\u6d41&#xff1a;Using Hystrix<\/h6>\n<p>Hystrix is \u200b\u200ban open source \u201canti-avalanche tool\u201d that reduces losses after avalanches by blowing, degrading, and limiting currents.<\/p>\n<table>\n<tr>\u5355\u8bcd\u77ed\u8bed\u89e3\u91ca<\/tr>\n<tbody>\n<tr>\n<td>anti<\/td>\n<td>n.&amp; adj.\u53cd\u5bf9\u8005&#xff0c;\u53cd\u5bf9\u8bba\u8005\u53cd\u5bf9\u7684&#xff1b;\u62b5\u6297<\/td>\n<\/tr>\n<tr>\n<td>losses<\/td>\n<td>n.\u635f\u5931( loss\u7684\u540d\u8bcd\u590d\u6570 )&#xff1b; \u635f\u8017&#xff1b; \u5931\u8d25&#xff1b; \u964d\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>degrade<\/td>\n<td>vt.\u964d\u4f4e&#xff0c;\u8d2c\u4f4e&#xff1b; \u4f7f\u964d\u7ea7&#xff1b; \u964d\u4f4e\u2026\u8eab\u4efd&#xff1b; \u4f7f\u4e22\u8138&#xff1b;vt.&amp; vi.&#xff08;\u4f7f&#xff09;\u9000\u5316&#xff0c;\u964d\u89e3&#xff0c;\u5206\u89e3&#xff1b; \u964d\u89e3&#xff1b; \u64a4\u804c&#xff0c;\u514d\u804c&#xff1b; \u964d\u4f4e\u54c1\u683c[\u8eab\u4ef7&#xff0c;\u4ef7\u503c&#xff08;\u7b49&#xff09;]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u4e8b\u53d1\u4e2d&#xff1a;\u4e07\u4e00Redis\u771f\u7684\u6302\u4e86&#xff0c;\u6211\u4eec\u53ef\u4ee5\u8bbe\u7f6e\u672c\u5730\u7f13\u5b58(ehcache)&#043;\u9650\u6d41(hystrix)&#xff0c;\u5c3d\u91cf\u907f\u514d\u6211\u4eec\u7684\u6570\u636e\u5e93\u88ab\u5e72\u6389(\u8d77\u7801\u80fd\u4fdd\u8bc1\u6211\u4eec\u7684\u670d\u52a1\u8fd8\u662f\u80fd\u6b63\u5e38\u5de5\u4f5c\u7684)<\/li>\n<\/ul>\n<h5>\u4e8b\u540e\u6062\u590d\u7f13\u5b58<\/h5>\n<ul>\n<li>\u4e8b\u53d1\u540e&#xff1a;redis\u6301\u4e45\u5316&#xff0c;\u91cd\u542f\u540e\u81ea\u52a8\u4ece\u78c1\u76d8\u4e0a\u52a0\u8f7d\u6570\u636e&#xff0c;\u5feb\u901f\u6062\u590d\u7f13\u5b58\u6570\u636e\u3002<\/li>\n<\/ul>\n<h3>\u65e0\u5e95\u6d1e\u95ee\u9898&#xff1a;Facebook\u2019s Memcached Multiget Hole: More Machines !&#061; More Capacity<\/h3>\n<p>Facebook\u2019s Memcached Multiget Hole: More machines !&#061; More Capacity<\/p>\n<p>\u7528\u4e00\u53e5\u901a\u4fd7\u7684\u8bdd\u603b\u7ed3&#xff1a;\u66f4\u591a\u7684\u673a\u5668\u4e0d\u4ee3\u8868\u66f4\u591a\u7684\u6027\u80fd&#xff0c;\u6240\u8c13\u201c\u65e0\u5e95\u6d1e\u201d\u5c31\u662f\u8bf4\u6295\u5165\u8d8a\u591a\u4e0d\u4e00\u5b9a\u4ea7\u51fa\u8d8a\u591a\u3002<\/p>\n<h4>\u65e0\u5e95\u6d1e\u4ea7\u751f\u539f\u56e0<\/h4>\n<p>\u952e\u503c\u6570\u636e\u5e93\u6216\u8005\u7f13\u5b58\u7cfb\u7edf&#xff0c;\u7531\u4e8e\u901a\u5e38\u91c7\u7528hash\u51fd\u6570\u5c06key\u6620\u5c04\u5230\u5bf9\u5e94\u7684\u5b9e\u4f8b&#xff0c;\u9020\u6210key\u7684\u5206\u5e03\u4e0e\u4e1a\u52a1\u65e0\u5173&#xff0c;\u4f46\u662f\u7531\u4e8e\u6570\u636e\u91cf\u3001\u8bbf\u95ee\u91cf\u7684\u9700\u6c42&#xff0c;\u9700\u8981\u4f7f\u7528\u5206\u5e03\u5f0f\u540e&#xff08;\u65e0\u8bba\u662f\u5ba2\u6237\u7aef\u4e00\u81f4\u6027\u54c8\u6027\u3001redis-cluster\u3001codis&#xff09;&#xff0c;\u6279\u91cf\u64cd\u4f5c\u6bd4\u5982\u6279\u91cf\u83b7\u53d6\u591a\u4e2akey(\u4f8b\u5982redis\u7684mget\u64cd\u4f5c)&#xff0c;\u901a\u5e38\u9700\u8981\u4ece\u4e0d\u540c\u5b9e\u4f8b\u83b7\u53d6key\u503c&#xff0c;\u76f8\u6bd4\u4e8e\u5355\u673a\u6279\u91cf\u64cd\u4f5c\u53ea\u6d89\u53ca\u5230\u4e00\u6b21\u7f51\u7edc\u64cd\u4f5c&#xff0c;\u5206\u5e03\u5f0f\u6279\u91cf\u64cd\u4f5c\u4f1a\u6d89\u53ca\u5230\u591a\u6b21\u7f51\u7edcio\u3002<\/p>\n<p>eg:\u4e00\u6b21mget\u64cd\u4f5c&#xff0c;\u9700\u8981\u4ece\u591a\u4e2a\u7f13\u5b58\u5b9e\u4f8b\u53bb\u83b7\u53d6\u6570\u636e&#xff0c;\u8fd9\u5305\u542b\u4e86\u591a\u6b21\u7f51\u7edc&#xff1b;\u5982\u679cmget\u7684key\u90fd\u5728\u4e00\u4e2a\u5b9e\u4f8b\u4e2d&#xff0c;\u90a3\u4e48\u5c31\u53ea\u8981\u4e00\u6b21\u7f51\u7edc\u64cd\u4f5c<\/p>\n<h4>\u5371\u5bb3&#xff08;\u66f4\u591a\u7684\u673a\u5668\u4e0d\u4ee3\u8868\u66f4\u591a\u7684\u6027\u80fd&#xff09;<\/h4>\n<li>\n<p>\u5ba2\u6237\u7aef\u4e00\u6b21\u6279\u91cf\u64cd\u4f5c\u4f1a\u6d89\u53ca\u591a\u6b21\u7f51\u7edc\u64cd\u4f5c&#xff0c;\u4e5f\u5c31\u610f\u5473\u7740\u6279\u91cf\u64cd\u4f5c\u4f1a\u968f\u7740\u5b9e\u4f8b\u7684\u589e\u591a&#xff0c;\u8017\u65f6\u4f1a\u4e0d\u65ad\u589e\u5927\u3002<\/p>\n<\/li>\n<li>\n<p>\u670d\u52a1\u7aef\u7f51\u7edc\u8fde\u63a5\u6b21\u6570\u53d8\u591a&#xff0c;\u5bf9\u5b9e\u4f8b\u7684\u6027\u80fd\u4e5f\u6709\u4e00\u5b9a\u5f71\u54cd\u3002<\/p>\n<\/li>\n<h4>\u9488\u5bf9\u6027\u7684\u4f18\u5316<\/h4>\n<li>\n<p>\u547d\u4ee4\u672c\u8eab\u7684\u6548\u7387&#xff1a;\u4f8b\u5982sql\u4f18\u5316&#xff0c;\u547d\u4ee4\u4f18\u5316<\/p>\n<\/li>\n<li>\n<p>\u7f51\u7edc\u6b21\u6570&#xff1a;\u51cf\u5c11\u901a\u4fe1\u6b21\u6570<\/p>\n<\/li>\n<li>\n<p>\u964d\u4f4e\u63a5\u5165\u6210\u672c:\u957f\u8fde\/\u8fde\u63a5\u6c60,NIO\u7b49\u3002<\/p>\n<\/li>\n<li>\n<p>IO\u8bbf\u95ee\u5408\u5e76:O(n)\u5230O(1)\u8fc7\u7a0b:\u6279\u91cf\u63a5\u53e3(mget)<\/p>\n<\/li>\n<p>\u6279\u91cf\u64cd\u4f5c\u7684\u4e00\u4e9b\u65b9\u6848<\/p>\n<table>\n<tr>\u65b9\u6848\u4f18\u70b9\u7f3a\u70b9\u7f51\u7edcIO<\/tr>\n<tbody>\n<tr>\n<td>\u4e32\u884cmget<\/td>\n<td>1.\u7f16\u7a0b\u7b80\u53552.\u5c11\u91cfkeys&#xff0c;\u6027\u80fd\u6ee1\u8db3\u8981\u6c42<\/td>\n<td>\u5927\u91cfkeys\u8bf7\u6c42\u5ef6\u8fdf\u4e25\u91cd<\/td>\n<td>O(keys)<\/td>\n<\/tr>\n<tr>\n<td>\u4e32\u884cIO<\/td>\n<td>1.\u7f16\u7a0b\u7b80\u53552.\u5c11\u91cf\u8282\u70b9&#xff0c;\u6027\u80fd\u6ee1\u8db3\u8981\u6c42<\/td>\n<td>\u5927\u91cfnode\u5ef6\u8fdf\u4e25\u91cd<\/td>\n<td>O(nodes)<\/td>\n<\/tr>\n<tr>\n<td>\u5e76\u884cIO<\/td>\n<td>1.\u5229\u7528\u5e76\u884c\u7279\u60272.\u5ef6\u8fdf\u53d6\u51b3\u4e8e\u6700\u6162\u7684\u8282\u70b9<\/td>\n<td>1.\u7f16\u7a0b\u590d\u67422.\u8d85\u65f6\u5b9a\u4f4d\u8f83\u96be<\/td>\n<td>O(max_slow(node))<\/td>\n<\/tr>\n<tr>\n<td>hash tags<\/td>\n<td>\u6027\u80fd\u6700\u9ad8<\/td>\n<td>1.tag-key\u4e1a\u52a1\u7ef4\u62a4\u6210\u672c\u8f83\u9ad82.tag\u5206\u5e03\u5bb9\u6613\u51fa\u73b0\u6570\u636e\u503e\u659c<\/td>\n<td>O(1)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>hash\u7684\u4e24\u79cd\u65b9\u5f0f<\/h5>\n<table>\n<tr>\u5206\u5e03\u65b9\u5f0f\u7279\u70b9\u5178\u578b\u4ea7\u54c1<\/tr>\n<tbody>\n<tr>\n<td>\u54c8\u5e0c\u5206\u5e03<\/td>\n<td>1.\u6570\u636e\u5206\u6563\u5ea6\u9ad8,2.\u952e\u503c\u5206\u5e03\u4e0e\u4e1a\u52a1\u65e0\u5173,3.\u65e0\u6cd5\u987a\u5e8f\u8bbf\u95ee,4.\u652f\u6301\u6279\u91cf\u64cd\u4f5c<\/td>\n<td>\u4e00\u81f4\u6027\u54c8\u5e0cmemcacheredisCluster\u5176\u4ed6\u7f13\u5b58\u4ea7\u54c1<\/td>\n<\/tr>\n<tr>\n<td>\u987a\u5e8f\u5206\u5e03<\/td>\n<td>1.\u6570\u636e\u5206\u6563\u5ea6\u6613\u503e\u659c,2.\u952e\u503c\u5206\u5e03\u4e0e\u4e1a\u52a1\u76f8\u5173,3.\u53ef\u4ee5\u987a\u5e8f\u8bbf\u95ee,4.\u652f\u6301\u6279\u91cf\u64cd\u4f5c<\/td>\n<td>BigTableHbase<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5982\u4f55\u4fdd\u8bc1\u7f13\u5b58\u4e0e\u6570\u636e\u5e93\u53cc\u5199\u65f6\u4e00\u81f4\u7684\u95ee\u9898<\/h3>\n<h4>Cache Aside Pattern<\/h4>\n<p>cache-aside<\/p>\n<p>Load data on demand into a cache from a data store. This can improve performance and also helps to maintain consistency between data held in the cache and data in the underlying data store.<\/p>\n<p>Applications should implement a strategy that helps to ensure that the data in the cache is as up-to-date as possible, but can also detect and handle situations that arise when the data in the cache has become stale.<\/p>\n<p>stale \u82f1<span class=\"token punctuation\">[<\/span>ste\u026al<span class=\"token punctuation\">]<\/span> \u7f8e<span class=\"token punctuation\">[<\/span>ste\u026al<span class=\"token punctuation\">]<\/span><br \/>\nadj<span class=\"token punctuation\">.<\/span> \u4e0d\u65b0\u9c9c\u7684<span class=\"token punctuation\">;<\/span> <span class=\"token punctuation\">(<\/span>\u7a7a\u6c14<span class=\"token punctuation\">)<\/span> \u6c61\u6d4a\u7684<span class=\"token punctuation\">;<\/span> <span class=\"token punctuation\">(<\/span>\u70df\u5473<span class=\"token punctuation\">)<\/span> \u96be\u95fb\u7684<span class=\"token punctuation\">;<\/span> \u9648\u8150\u7684<span class=\"token punctuation\">;<\/span> \u6ca1\u6709\u65b0\u610f\u7684<span class=\"token punctuation\">;<\/span> \u8001\u6389\u7259\u7684<span class=\"token punctuation\">;<\/span><br \/>\nn<span class=\"token punctuation\">.<\/span> &#xff08;\u725b\u9a6c\u3001\u9a86\u9a7c\u7684&#xff09; \u5c3f<span class=\"token punctuation\">;<\/span><\/p>\n<h4>\u7f13\u5b58\/\u6570\u636e\u5e93\u66f4\u65b0\u7b56\u7565<\/h4>\n<h5>\u5148\u66f4\u65b0\u6570\u636e\u5e93&#xff0c;\u518d\u66f4\u65b0\u7f13\u5b58<\/h5>\n<p><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">-&gt;<\/span>\u65f6\u95f4\u7ebf<\/p>\n<p>\u7ebf\u7a0b<span class=\"token class-name\">A<\/span>\u66f4\u65b0\u4e86\u6570\u636e\u5e93             \u7ebf\u7a0b<span class=\"token class-name\">A<\/span>\u66f4\u65b0\u4e86\u7f13\u5b58<br \/>\n    \u7ebf\u7a0b<span class=\"token class-name\">B<\/span>\u66f4\u65b0\u4e86\u6570\u636e\u5e93  \u7ebf\u7a0b<span class=\"token class-name\">B<\/span>\u66f4\u65b0\u4e86\u7f13\u5b58<\/p>\n<p>\u8bf7\u6c42A\u66f4\u65b0\u7f13\u5b58\u7406\u8bba\u4e0a\u8981\u6bd4\u8bf7\u6c42B\u66f4\u65b0\u7f13\u5b58\u65e9\u624d\u5bf9&#xff0c;\u4f46\u662f\u56e0\u4e3a\u7f51\u7edc\u7b49\u539f\u56e0&#xff0c;B\u5374\u6bd4A\u66f4\u65e9\u66f4\u65b0\u4e86\u7f13\u5b58\u4e86&#xff0c;\u5bfc\u81f4\u810f\u6570\u636e<\/p>\n<h5>\u5148\u5220\u9664\u7f13\u5b58&#xff0c;\u518d\u66f4\u65b0\u6570\u636e\u5e93&#xff08;\u6307\u671b\u4e0b\u4e00\u6b21\u8bfb\u64cd\u4f5c\u4f1a\u66f4\u65b0\u7f13\u5b58)(\u5220\u9664\u7f13\u5b58\u65b9\u68481)<\/h5>\n<p>\u5982\u4e0b\u5e76\u53d1\u573a\u666f&#xff1a;<\/p>\n<li>\u7ebf\u7a0bA\u5220\u9664\u7f13\u5b58&#xff08;\u5148\u5220\u7f13\u5b58&#xff09;<\/li>\n<li>\u7ebf\u7a0bB\u67e5\u8be2\u6570\u636e&#xff0c;\u53d1\u73b0\u7f13\u5b58\u6570\u636e\u4e0d\u5b58\u5728&#xff1b;\u5219\u7ebf\u7a0bB\u67e5\u8be2\u6570\u636e\u5e93&#xff0c;\u5f97\u5230\u65e7\u503c&#xff0c;B\u8981\u66f4\u65b0\u7f13\u5b58&#xff0c;\u4f1a\u5c06\u6b64\u65e7\u503c\u5199\u5165\u7f13\u5b58<\/li>\n<li>\u7ebf\u7a0bA\u5c06\u65b0\u503c\u66f4\u65b0\u5230\u6570\u636e\u5e93&#xff08;\u518d\u66f4\u65b0\u6570\u636e\u5e93&#xff09;<\/li>\n<p>\u53ef\u4ee5\u770b\u5230\u5e76\u53d1\u60c5\u51b5\u4e0b&#xff0c;\u4f1a\u51fa\u73b0&#xff1a;<font color=\"red\">\u7f13\u5b58\u4e2d\u7684\u6570\u636e\u4ecd\u7136\u662f\u65e7\u503c<\/font> \u7684\u95ee\u9898<\/p>\n<h5>\u5148\u66f4\u65b0\u6570\u636e\u5e93&#xff0c;\u518d\u5220\u9664\u7f13\u5b58(\u6307\u671b\u4e0b\u4e00\u6b21\u8bfb\u64cd\u4f5c\u4f1a\u66f4\u65b0\u7f13\u5b58)(\u5220\u9664\u7f13\u5b58\u65b9\u68482)\u3010\u4f7f\u7528\u573a\u666f\u591a\u3011<\/h5>\n<p>\u5982\u4e0b\u5e76\u53d1\u573a\u666f&#xff1a;<\/p>\n<li>\u8bfb\u7f13\u5b58\u5931\u6548\u4e86<\/li>\n<li>\u7ebf\u7a0bB\u4ece\u6570\u636e\u5e93\u8bfb\u53d6\u65e7\u503c<\/li>\n<li>\u7ebf\u7a0bA\u4ece\u6570\u636e\u5e93\u8bfb\u53d6\u65e7\u503c<\/li>\n<li>\u7ebf\u7a0bB\u5c06\u65b0\u503c\u66f4\u65b0\u5230\u6570\u636e\u5e93&#xff08;\u5148\u66f4\u65b0\u6570\u636e\u5e93&#xff09;<\/li>\n<li>\u7ebf\u7a0bB\u5220\u9664\u7f13\u5b58&#xff08;\u518d\u5220\u7f13\u5b58&#xff09;<\/li>\n<li>\u7ebf\u7a0bA\u5c06\u65e7\u503c\u5199\u5165\u7f13\u5b58&#xff08;\u7ebf\u7a0bA\u56e0\u4e3a\u7f13\u5b58\u5931\u6548&#xff0c;\u8bfb\u53d6\u4e86\u6570\u636e\u5e93\u65e7\u503c&#xff0c;\u5e76\u66f4\u65b0\u5230\u4e86\u7f13\u5b58\u4e2d&#xff09;<\/li>\n<p>\u8fd9\u79cd\u60c5\u51b5\u6982\u7387\u5f88\u4f4e&#xff0c;\u5b9e\u9645\u4e0a\u6570\u636e\u5e93\u7684\u5199\u64cd\u4f5c\u4f1a\u6bd4\u8bfb\u64cd\u4f5c\u6162\u5f97\u591a&#xff0c;\u8bfb\u64cd\u4f5c\u5fc5\u9700\u5728\u5199\u64cd\u4f5c\u524d\u8fdb\u5165\u6570\u636e\u5e93\u64cd\u4f5c&#xff0c;\u800c\u53c8\u8981\u665a\u4e8e\u5199\u64cd\u4f5c\u66f4\u65b0\u7f13\u5b58&#xff0c;\u8fd9\u79cd\u60c5\u51b5\u4e0b\u53ea\u9700\u8981\u7ebf\u7a0bB\u5ef6\u65f6\u5220\u9664\u7f13\u5b58\u5c31\u597d\u3002\u53e6\u5916\u5728\u6570\u636e\u5e93\u4e3b\u4ece\u540c\u6b65\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5ef6\u65f6\u5220\u9664\u8fd8\u80fd\u9632\u6b62\u6570\u636e\u66f4\u65b0\u8fd8\u672a\u4ece\u4e3b\u6570\u636e\u5e93\u540c\u6b65\u5230\u4ece\u6570\u636e\u5e93\u7684\u60c5\u51b5\u3002<\/p>\n<p>\u7ed3\u8bba&#xff1a;\u4ea7\u751f\u810f\u6570\u636e\u7684\u6982\u7387\u8f83\u5c0f&#xff0c;\u4f46\u662f\u4f1a\u51fa\u73b0\u4e00\u81f4\u6027\u7684\u95ee\u9898&#xff1b;\u82e5\u66f4\u65b0\u64cd\u4f5c\u7684\u65f6\u5019&#xff0c;\u540c\u65f6\u8fdb\u884c\u67e5\u8be2\u64cd\u4f5c&#xff0c;\u82e5\u547d\u4e2d&#xff0c;\u5219\u67e5\u8be2\u5f97\u5230\u7684\u6570\u636e\u662f\u65e7\u7684\u6570\u636e\u3002\u4f46\u662f\u4e0d\u4f1a\u5f71\u54cd\u540e\u9762\u7684\u67e5\u8be2\u3002&#xff08;\u4ee3\u4ef7\u8f83\u5c0f&#xff09;<\/p>\n<h4>\u65b9\u68481: \u91c7\u7528\u5ef6\u65f6\u53cc\u5220\u7b56\u7565&#xff1f;<\/h4>\n<p>\u5148\u5220\u9664\u7f13\u5b58\u3001\u518d\u5199\u6570\u636e\u5e93\u3001\u4f11\u7720500\u6beb\u79d2\u3001\u518d\u6b21\u5220\u9664\u7f13\u5b58<\/p>\n<ul>\n<li>\u7ed9\u7f13\u5b58\u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4&#xff0c;\u662f\u4fdd\u8bc1\u6700\u7ec8\u4e00\u81f4\u6027\u7684\u89e3\u51b3\u65b9\u6848; \u7406\u89e3\u5982\u4e0b<\/li>\n<\/ul>\n<p>\u5bf9\u5b58\u5165\u7f13\u5b58\u7684\u6570\u636e\u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4&#xff0c;\u6240\u6709\u7684\u5199\u64cd\u4f5c\u4ee5\u6570\u636e\u5e93\u4e3a\u51c6&#xff0c;\u5bf9\u7f13\u5b58\u64cd\u4f5c\u53ea\u662f\u5c3d\u6700\u5927\u52aa\u529b\u5373\u53ef\u3002\u4e5f\u5c31\u662f\u8bf4\u5982\u679c\u6570\u636e\u5e93\u5199\u6210\u529f&#xff0c;\u7f13\u5b58\u66f4\u65b0\u5931\u8d25&#xff0c;\u90a3\u4e48\u53ea\u8981\u5230\u8fbe\u8fc7\u671f\u65f6\u95f4&#xff0c;\u5219\u540e\u9762\u7684\u8bfb\u8bf7\u6c42\u81ea\u7136\u4f1a\u4ece\u6570\u636e\u5e93\u4e2d\u8bfb\u53d6\u65b0\u503c\u7136\u540e\u56de\u586b\u7f13\u5b58<\/p>\n<h4>\u65b9\u68482: \u5f02\u6b65\u66f4\u65b0\u7f13\u5b58(\u57fa\u4e8e\u8ba2\u9605binlog\u7684\u540c\u6b65\u673a\u5236)<\/h4>\n<p>\u8981\u5220\u9664\u7684\u7f13\u5b58\u5199\u5165\u6d88\u606f\u961f\u5217&#xff0c;\u7136\u540e\u4ece\u6d88\u606f\u961f\u5217\u53d6\u51fa\u6765\u518d\u5220\u9664&#xff0c;\u5982\u679c\u5220\u9664\u5931\u8d25\u5219\u53ef\u4ee5\u52a0\u4e0a\u91cd\u8bd5\u7b56\u7565<\/p>\n<p>\u5373\u901a\u8fc7\u5f02\u6b65\u66f4\u65b0\u7f13\u5b58\u5c06\u7f13\u5b58\u4e0e\u6570\u636e\u5e93\u7684\u4e00\u81f4\u6027\u540c\u6b65\u4ece\u4e1a\u52a1\u4e2d\u72ec\u7acb\u51fa\u6765\u7edf\u4e00\u5904\u7406&#xff0c;\u4fdd\u8bc1\u6570\u636e\u4e00\u81f4\u6027&#xff1b;\u6574\u4f53\u6280\u672f\u601d\u8def&#xff1a;<\/p>\n<li>\u8bfbRedis&#xff1a;\u70ed\u6570\u636e\u57fa\u672c\u90fd\u5728Redis<\/li>\n<li>\u5199MySQL&#xff1a;\u589e\u5220\u6539\u90fd\u662f\u64cd\u4f5cMySQL<\/li>\n<li>\u66f4\u65b0Redis\u6570\u636e&#xff1a;\u8ba2\u9605MySQ\u7684\u6570\u636e\u64cd\u4f5c\u8bb0\u5f55binlog&#xff0c;\u6765\u66f4\u65b0\u5230Redis<\/li>\n<p>\u6570\u636e\u64cd\u4f5c\u5206\u4e3a\u4e24\u5927\u90e8\u5206&#xff1a;<\/p>\n<li>\u5168\u91cf\u66f4\u65b0&#xff08;\u5c06\u5168\u90e8\u6570\u636e\u4e00\u6b21\u6027\u5199\u5165redis&#xff09;<\/li>\n<li>\u589e\u91cf\u66f4\u65b0&#xff08;\u5b9e\u65f6\u66f4\u65b0&#xff09;<\/li>\n<h4>\u65b9\u68483: \u4e32\u884c\u5316<\/h4>\n<h3>\u7ebf\u4e0a\u5b9e\u9645\u7f13\u5b58\u4e8b\u6545&#xff1f;<\/h3>\n<p>\u65e0\u7d22\u5f15&#xff0c;\u6162\u67e5\u8be2&#xff0c;\u6162\u67e5\u8be2\u5806\u79ef&#xff0c;\u8fde\u63a5\u6c60\u6ee1&#xff1f;<\/p>\n<p>\u7f13\u5b58&#xff0c;\u7f13\u5b58\u66f4\u65b0\u903b\u8f91\u95ee\u9898&#xff0c;\u62c9\u53d6\u5168\u91cf\u6570\u636e\u5e93&#xff0c;\u7f13\u5b58\u51fb\u7a7f&#xff0c;\u6570\u636e\u5e93\u6302&#xff0c;\u670d\u52a1\u6302<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.4k\u6b21\uff0c\u70b9\u8d5e25\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u7f13\u5b58\u6ca1\u6709\uff0c\u6570\u636e\u5e93\u4e5f\u662f\u6ca1\u6709\u7684\uff1b\u82e5\u9ed1\u5ba2\u5229\u7528\u6b64\u6f0f\u6d1e\u6784\u9020\u6076\u610f\u6570\u636e\u8fdb\u884c\u653b\u51fb\u53ef\u80fd\u538b\u57ae\u6570\u636e\u5e93\uff0c\u5373\u6076\u610f\u6784\u9020\u4e00\u4e2a\u903b\u8f91\u4e0a\u4e0d\u5b58\u5728\u7684\u6570\u636e\uff0c\u7136\u540e\u5927\u91cf\u53d1\u9001\u8fd9\u4e2a\u8bf7\u6c42\uff0c\u8fd9\u6837\u6bcf\u6b21\u90fd\u4f1a\u88ab\u53d1\u9001\u5230\u6570\u636e\u5e93\u53bb\u5904\u7406\uff0c\u6700\u7ec8\u5bfc\u81f4\u6570\u636e\u5e93\u6302\u6389\u3002\u7f13\u5b58\u4e2d\u6ca1\u6709\uff0c\u6570\u636e\u5e93\u4e2d\u6709\uff1b\u5728\u5e76\u53d1\u8bbf\u95ee\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u5927\u90e8\u5206\u8bf7\u6c42\u90fd\u662f\u8d70\u6570\u636e\u5e93\u7684\uff0c\u8fd9\u5c06\u5f15\u8d77\u6570\u636e\u5e93\u538b\u529b\u7684\u77ac\u95f4\u589e\u5927\uff0c\u9020\u6210\u8fc7\u5927\u538b\u529b\u3002\u51fb\u7a7f\u662f\u6307\u4e00\u4e2a\u70ed\u70b9key\uff08\u975e\u5e38\u9891\u7e41\u88ab\u8bbf\u95ee\u7684key\uff09\u5728\u7f13\u5b58\u4e2d\u7a81\u7136\u5931\u6548\uff0c\u800c\u6b64\u65f6\u5927\u91cf\u7684\u5e76\u53d1\u8bf7\u6c42\u540c\u65f6\u8bbf\u95ee\u8fd9\u4e2akey\uff0c\u8fd9\u4e9b\u8bf7\u6c42\u4f1a\u76f4\u63a5\u7a7f\u900f\u5230\u6570\u636e\u5e93\uff0c\u9020\u6210\u6570\u636e\u5e93\u77ac\u95f4\u538b\u529b\u8fc7\u5927\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[100,398],"topic":[],"class_list":["post-36111","post","type-post","status-publish","format-standard","hentry","category-server","tag-100","tag-398"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/36111.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.4k\u6b21\uff0c\u70b9\u8d5e25\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u7f13\u5b58\u6ca1\u6709\uff0c\u6570\u636e\u5e93\u4e5f\u662f\u6ca1\u6709\u7684\uff1b\u82e5\u9ed1\u5ba2\u5229\u7528\u6b64\u6f0f\u6d1e\u6784\u9020\u6076\u610f\u6570\u636e\u8fdb\u884c\u653b\u51fb\u53ef\u80fd\u538b\u57ae\u6570\u636e\u5e93\uff0c\u5373\u6076\u610f\u6784\u9020\u4e00\u4e2a\u903b\u8f91\u4e0a\u4e0d\u5b58\u5728\u7684\u6570\u636e\uff0c\u7136\u540e\u5927\u91cf\u53d1\u9001\u8fd9\u4e2a\u8bf7\u6c42\uff0c\u8fd9\u6837\u6bcf\u6b21\u90fd\u4f1a\u88ab\u53d1\u9001\u5230\u6570\u636e\u5e93\u53bb\u5904\u7406\uff0c\u6700\u7ec8\u5bfc\u81f4\u6570\u636e\u5e93\u6302\u6389\u3002\u7f13\u5b58\u4e2d\u6ca1\u6709\uff0c\u6570\u636e\u5e93\u4e2d\u6709\uff1b\u5728\u5e76\u53d1\u8bbf\u95ee\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u5927\u90e8\u5206\u8bf7\u6c42\u90fd\u662f\u8d70\u6570\u636e\u5e93\u7684\uff0c\u8fd9\u5c06\u5f15\u8d77\u6570\u636e\u5e93\u538b\u529b\u7684\u77ac\u95f4\u589e\u5927\uff0c\u9020\u6210\u8fc7\u5927\u538b\u529b\u3002\u51fb\u7a7f\u662f\u6307\u4e00\u4e2a\u70ed\u70b9key\uff08\u975e\u5e38\u9891\u7e41\u88ab\u8bbf\u95ee\u7684key\uff09\u5728\u7f13\u5b58\u4e2d\u7a81\u7136\u5931\u6548\uff0c\u800c\u6b64\u65f6\u5927\u91cf\u7684\u5e76\u53d1\u8bf7\u6c42\u540c\u65f6\u8bbf\u95ee\u8fd9\u4e2akey\uff0c\u8fd9\u4e9b\u8bf7\u6c42\u4f1a\u76f4\u63a5\u7a7f\u900f\u5230\u6570\u636e\u5e93\uff0c\u9020\u6210\u6570\u636e\u5e93\u77ac\u95f4\u538b\u529b\u8fc7\u5927\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/36111.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-07T07:52:26+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/36111.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/36111.html\",\"name\":\"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-07T07:52:26+00:00\",\"dateModified\":\"2025-05-07T07:52:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/36111.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/36111.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/36111.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/36111.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.4k\u6b21\uff0c\u70b9\u8d5e25\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u7f13\u5b58\u6ca1\u6709\uff0c\u6570\u636e\u5e93\u4e5f\u662f\u6ca1\u6709\u7684\uff1b\u82e5\u9ed1\u5ba2\u5229\u7528\u6b64\u6f0f\u6d1e\u6784\u9020\u6076\u610f\u6570\u636e\u8fdb\u884c\u653b\u51fb\u53ef\u80fd\u538b\u57ae\u6570\u636e\u5e93\uff0c\u5373\u6076\u610f\u6784\u9020\u4e00\u4e2a\u903b\u8f91\u4e0a\u4e0d\u5b58\u5728\u7684\u6570\u636e\uff0c\u7136\u540e\u5927\u91cf\u53d1\u9001\u8fd9\u4e2a\u8bf7\u6c42\uff0c\u8fd9\u6837\u6bcf\u6b21\u90fd\u4f1a\u88ab\u53d1\u9001\u5230\u6570\u636e\u5e93\u53bb\u5904\u7406\uff0c\u6700\u7ec8\u5bfc\u81f4\u6570\u636e\u5e93\u6302\u6389\u3002\u7f13\u5b58\u4e2d\u6ca1\u6709\uff0c\u6570\u636e\u5e93\u4e2d\u6709\uff1b\u5728\u5e76\u53d1\u8bbf\u95ee\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u5927\u90e8\u5206\u8bf7\u6c42\u90fd\u662f\u8d70\u6570\u636e\u5e93\u7684\uff0c\u8fd9\u5c06\u5f15\u8d77\u6570\u636e\u5e93\u538b\u529b\u7684\u77ac\u95f4\u589e\u5927\uff0c\u9020\u6210\u8fc7\u5927\u538b\u529b\u3002\u51fb\u7a7f\u662f\u6307\u4e00\u4e2a\u70ed\u70b9key\uff08\u975e\u5e38\u9891\u7e41\u88ab\u8bbf\u95ee\u7684key\uff09\u5728\u7f13\u5b58\u4e2d\u7a81\u7136\u5931\u6548\uff0c\u800c\u6b64\u65f6\u5927\u91cf\u7684\u5e76\u53d1\u8bf7\u6c42\u540c\u65f6\u8bbf\u95ee\u8fd9\u4e2akey\uff0c\u8fd9\u4e9b\u8bf7\u6c42\u4f1a\u76f4\u63a5\u7a7f\u900f\u5230\u6570\u636e\u5e93\uff0c\u9020\u6210\u6570\u636e\u5e93\u77ac\u95f4\u538b\u529b\u8fc7\u5927\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/36111.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-07T07:52:26+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/36111.html","url":"https:\/\/www.wsisp.com\/helps\/36111.html","name":"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-07T07:52:26+00:00","dateModified":"2025-05-07T07:52:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/36111.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/36111.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/36111.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7f13\u5b58\u53ca\u5176\u95ee\u9898\u89e3\u51b3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/36111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=36111"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/36111\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=36111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=36111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=36111"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=36111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}