{"id":10006787,"date":"2022-11-03T21:48:39","date_gmt":"2022-11-03T13:48:39","guid":{"rendered":"https:\/\/ityet.com\/?p=10006787"},"modified":"2022-11-03T21:48:39","modified_gmt":"2022-11-03T13:48:39","slug":"sofaregistry-%e5%a4%a7%e8%a7%84%e6%a8%a1%e9%9b%86%e7%be%a4%e4%bc%98%e5%8c%96%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006787","title":{"rendered":"SOFARegistry | \u5927\u89c4\u6a21\u96c6\u7fa4\u4f18\u5316\u5b9e\u8df5"},"content":{"rendered":"<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042736141\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\">  <\/p>\n<p>\u6587\uff5c\u674e\u65ed\u4e1c<\/p>\n<p>\u4e13\u6ce8\u4e8e SOFARegistry \u53ca\u5176\u5468\u8fb9\u57fa\u7840\u8bbe\u65bd\u7684\u5f00\u53d1\u4e0e\u4f18\u5316<\/p>\n<p>\u672c\u6587 <strong>7016<\/strong> \u5b57 \u9605\u8bfb\u00a0<strong>15<\/strong> \u5206\u949f<\/p>\n<h2>1 \u524d\u8a00<\/h2>\n<p>SOFARegistry \u5728\u8682\u8681\u5185\u90e8\u8fed\u4ee3\u5347\u7ea7\u8fc7\u7a0b\u4e2d\uff0c\u6bcf\u5e74\u5927\u4fc3\u90fd\u4f1a\u5f15\u6765\u4e00\u4e9b\u65b0\u7684\u6311\u6218\uff0c\u901a\u8fc7\u4e0d\u65ad\u7684\u4f18\u5316\u8fd9\u4e9b\u5728\u5927\u89c4\u6a21\u96c6\u7fa4\u9047\u5230\u7684\u6027\u80fd\u74f6\u9888\uff0c\u6211\u4eec\u603b\u7ed3\u51fa\u4e00\u4e9b\u4f18\u5316\u65b9\u6848\uff0c\u6765\u89e3\u51b3\u5927\u89c4\u6a21\u96c6\u7fa4\u9047\u5230\u7684\u6027\u80fd\u95ee\u9898\u3002  <br \/>\u901a\u8fc7\u9605\u8bfb\u8fd9\u7bc7\u6587\u7ae0\uff0c\u8bfb\u8005\u53ef\u4ee5\u5b66\u4e60\u5230\u4e00\u4e9b Java \u548c Go \u8bed\u8a00\u7cfb\u7edf\u7684\u4f18\u5316\u6280\u5de7\uff0c\u5728\u7cfb\u7edf\u9047\u5230\u74f6\u9888\u7684\u65f6\u5019\uff0c\u80fd\u591f\u77e5\u9053\u6709\u54ea\u4e9b\u4f18\u5316\u624b\u6bb5\u9488\u5bf9\u6027\u7684\u8fdb\u884c\u4f18\u5316\u3002<\/p>\n<h2>2 \u5927\u89c4\u6a21\u96c6\u7fa4\u7684\u6311\u6218<\/h2>\n<p>\u968f\u7740\u4e1a\u52a1\u7684\u53d1\u5c55\uff0c\u4e1a\u52a1\u7684\u5b9e\u4f8b\u6570\u5728\u4e0d\u65ad\u589e\u957f\uff0c\u6ce8\u518c\u4e2d\u5fc3\u6240\u9700\u8981\u627f\u8f7d\u7684\u6570\u636e\u91cf\u4e5f\u5728\u5feb\u901f\u7684\u589e\u957f \uff0c\u4ee5\u5176\u4e2d 1 \u4e2a\u96c6\u7fa4\u4e3a\u4f8b\uff0c2019 \u5e74\u7684\u6570\u636e\u4e3a\u57fa\u51c6\u6570\u636e\uff0c\u5728 2020 \u5e74 pub \u63a5\u8fd1\u5343\u4e07\u7ea7\u3002\u4e0b\u56fe\u662f\u8be5\u96c6\u7fa4\u5386\u5e74\u53cc 11 \u65f6\u7684\u6570\u636e\u5bf9\u6bd4\u3002  <br \/>\u76f8\u6bd4 2019 \u5e74\u53cc 11\uff0c2021 \u5e74\u53cc 11 \u63a5\u53e3\u7ea7\u7684 pub \u589e\u957f 200%\uff0csub \u589e\u957f 80%\u3002\u5b9e\u4f8b\u6570\u548c\u6570\u636e\u91cf\u7684\u589e\u957f\u5e26\u6765\u63a8\u9001\u91cf\u7684\u4e8c\u6b21\u65b9\u5f62\u5f0f\u7684\u589e\u957f\uff0cSOFARegistry \u6bcf\u4e00\u5e74\u5927\u4fc3\u90fd\u4f1a\u7ecf\u5386\u65b0\u7684\u6311\u6218\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042736142\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<p>\u6bd4\u5982\uff0c\u5728\u67d0\u4e00\u5e74\u7684\u65b0\u673a\u623f\u538b\u6d4b\u8fc7\u7a0b\u4e2d\uff0c\u7531\u4e8e\u65b0\u673a\u623f\u89c4\u6a21\u7279\u522b\u5927\uff08\u666e\u901a\u673a\u623f\u7684 4 \u500d\uff09\uff0c\u5bfc\u81f4\u6ce8\u518c\u4e2d\u5fc3\u7684\u63a8\u9001\u538b\u529b\u53d8\u5927\u4e86\u5341\u500d\u591a\uff0c\u51fa\u73b0\u4e86 \uff1a  <br \/><strong>&#8211;<\/strong>\u00a0DataServer \u7684\u7f51\u7edc\u88ab\u6253\u7206\uff0c\u5bfc\u81f4\u5927\u91cf\u6570\u636e\u53d8\u66f4\u6ca1\u6709\u53ca\u65f6\u901a\u77e5\u5230 Session \uff0c\u63a8\u9001\u5ef6\u8fdf\u98d9\u5347\uff1b  <br \/><strong>&#8211;<\/strong>\u00a0\u56e0\u4e3a\u6570\u636e\u5305\u8fc7\u5927\uff0c SessionServer \u4e0e\u5ba2\u6237\u7aef\u4e4b\u95f4\u51fa\u73b0\u4e86\u5927\u91cf\u7684 channel overflow \u63a8\u9001\u5931\u8d25\uff0c\u63a8\u9001\u5ef6\u8fdf\u98d9\u5347\uff1b  <br \/><strong>&#8211;<\/strong>\u00a0\u7531\u4e8e\u5b9e\u4f8b\u6570\u91cf\u8fc7\u591a\uff0c\u6ce8\u518c\u4e2d\u5fc3\u7684\u63a8\u9001\u5305\u4ee5\u53ca\u5185\u90e8\u4f20\u8f93\u7684\u6570\u636e\u5305\u8fc7\u5927\uff0c\u5f88\u5bb9\u6613\u6253\u6ee1\u5355\u673a\u7684\u7f51\u7edc\u5904\u7406\u4e0a\u9650\uff0c\u5e8f\u5217\u5316\u6570\u636e\u4e5f\u4f1a\u5360\u7528\u5927\u91cf\u7684 CPU \uff1b  <br \/><strong>&#8211;<\/strong>\u00a0\u7531\u4e8e\u5730\u5740\u5217\u8868\u6269\u5927\u4e86\u51e0\u500d\uff0c\u5bfc\u81f4\u5bf9\u5e94\u63a8\u9001\u63a5\u6536\u7aef MOSN \u4e5f\u51fa\u73b0\u4e86\u95ee\u9898\uff0c\u5927\u91cf\u673a\u5668\u51fa\u73b0 OOM \uff0c \u51fa\u73b0\u5927\u91cf CPU \u6bdb\u523a\u5f71\u54cd\u8bf7\u6c42\u5ef6\u8fdf\uff1b  <br \/><strong>&#8211;<\/strong>\u00a0\u6ce8\u518c\u4e2d\u5fc3\u5e38\u89c1\u77ac\u95f4\u5927\u91cf\u5e76\u53d1\u7684\u8bf7\u6c42\uff0c\u6bd4\u5982\u4e1a\u52a1\u5927\u89c4\u6a21\u91cd\u542f\uff0c\u5f88\u5bb9\u6613\u5bfc\u81f4\u77ac\u65f6\u6ce8\u518c\u4e2d\u5fc3\u81ea\u8eab\u5904\u7406\u80fd\u4e0d\u8db3\uff0c\u5982\u4f55\u8fdb\u884c\u9650\u6d41\uff0c\u4ee5\u53ca\u5982\u4f55\u5feb\u901f\u8fbe\u5230\u6570\u636e\u6700\u7ec8\u4e00\u81f4\u3002<\/p>\n<h2>3 \u4f18\u5316\u65b9\u6848<\/h2>\n<p>\u9488\u5bf9\u4e0a\u8ff0\u5927\u89c4\u6a21\u96c6\u7fa4\u9047\u5230\u7684\u6311\u6218\uff0c\u6211\u4eec\u505a\u4e86\u4ee5\u4e0b\u7684\u4f18\u5316\u65b9\u6848\uff1a<\/p>\n<h3>3.1 \u6a2a\u5411\u6269\u5c55\u652f\u6491\u5927\u89c4\u6a21\u96c6\u7fa4<\/h3>\n<p>\u5728\u5927\u89c4\u6a21\u96c6\u7fa4\u573a\u666f\u4e0b\uff0c\u5355\u7eaf\u91c7\u7528\u6269\u5927\u673a\u5668\u89c4\u683c\u7684\u7eb5\u5411\u6269\u5c55\u65b9\u5f0f\u5f80\u5f80\u4f1a\u9047\u5230\u74f6\u9888\uff0c\u5355\u673a\u7684\u914d\u7f6e\u662f\u6709\u4e0a\u9650\u7684\uff0c\u8d85\u5927\u7684 heap gc \u65f6\u4e5f\u53ef\u80fd\u4ea7\u751f\u8f83\u9ad8\u7684\u6682\u505c\u65f6\u95f4\uff0c\u800c\u4e14\u6062\u590d\u4e0e\u5907\u4efd\u4f1a\u82b1\u8d39\u5f88\u957f\u65f6\u95f4\u3002<\/p>\n<h4>3.1.1 \u53cc\u5c42\u6570\u636e\u67b6\u6784\u8fdb\u884c\u6570\u636e\u5206\u7247<\/h4>\n<p>\u53cc\u5c42\u6570\u636e\u67b6\u6784:\u00a0 Session (\u4f1a\u8bdd\u5c42\uff1a\u5206\u6563\u94fe\u63a5)\u3001Data \uff08\u6570\u636e\u5c42\uff1a\u5206\u6563\u6570\u636e\uff09\u6765\u5b9e\u73b0\u6a2a\u7ebf\u6269\u5c55\u7684\u80fd\u529b\uff0c\u901a\u8fc7\u5bf9\u94fe\u63a5\u548c\u6570\u636e\u8fdb\u884c\u5206\u7247\uff0cSOFARegistry \u53ef\u4ee5\u901a\u8fc7\u6a2a\u5411\u6269\u5bb9\u5f88\u5bb9\u6613\u7684\u652f\u6491\u66f4\u5927\u7684\u96c6\u7fa4\u3002\u5355\u673a\u91c7\u7528\u5c0f\u89c4\u683c\u7684\u673a\u5668\uff0c\u5728\u5bb9\u707e\u4ee5\u53ca\u6062\u590d\u65b9\u9762\u4e5f\u53ef\u4ee5\u53d6\u5f97\u5f88\u597d\u7684\u6548\u679c\u3002  <br \/>SOFARegistry \u7684\u67b6\u6784\u53ef\u4ee5\u53c2\u89c1\uff1a\u00a0<em><a href=\"https:\/\/link.segmentfault.com\/?enc=lLYbv9pZtmsrDXLFpUnF2g%3D%3D.HJvI9bZZ9ysNoPTEhGAsmtuH%2Bz1XiNrqSt6YcUx%2BUmn8gt9vk%2FJL6Q8dECEN62zAv9yhTDyDEgEbR32eBVks9QRUZFdKgMH7ik03zIvIl70%3D\" rel=\"nofollow\">https:\/\/www.sofastack.tech\/blog\/explore-sofaregistry-1-infrastructure\/<\/a><\/em><\/p>\n<h3>3.2 \u5e94\u5bf9\u77ac\u65f6\u5927\u91cf\u8bf7\u6c42<\/h3>\n<p>\u6ce8\u518c\u4e2d\u5fc3\u5b58\u5728\u77ac\u65f6\u5904\u7406\u5927\u91cf\u8bf7\u6c42\u7684\u573a\u666f\uff0c\u6bd4\u5982\u5f53\u5728\u5927\u91cf\u5e94\u7528\u540c\u65f6\u53d1\u751f\u8fd0\u7ef4\u6216\u8005\u6ce8\u518c\u4e2d\u5fc3\u81ea\u8eab\u53d1\u751f\u8fd0\u7ef4\u7684\u65f6\u5019\uff0c\u4f1a\u6709\u5927\u91cf\u7684\u6ce8\u518c\u8bf7\u6c42\u53d1\u9001\u5230 Session \u3002  <br \/>\u540c\u65f6\u6709\u4e00\u4e9b\u4f9d\u8d56\u6ce8\u518c\u4e2d\u5fc3\u7684\u57fa\u7840\u8bbe\u65bd\u4f1a\u901a\u8fc7\u53d8\u66f4\u53d1\u5e03\u6570\u636e\u5230\u6ce8\u518c\u4e2d\u5fc3\u6765\u901a\u77e5\u5230\u6bcf\u4e00\u4e2a\u8ba2\u9605\u7aef\u3002\u4e3a\u4e86\u5e94\u5bf9\u8fd9\u79cd\u4e0d\u53ef\u9884\u89c1\u7684\u77ac\u65f6\u5927\u91cf\u8bf7\u6c42\u53d8\u66f4\uff0c\u6ce8\u518c\u4e2d\u5fc3\u9700\u8981\u6709\u4e00\u5b9a\u7684\u7b56\u7565\u8fdb\u884c\u524a\u5cf0\u3002<\/p>\n<h4>3.2.1 \u961f\u5217\u6512\u6279\u5904\u7406<\/h4>\n<p>\u8d34\u5408\u8682\u8681\u7684\u4e1a\u52a1\uff0c\u4e3a\u5927\u89c4\u6a21\u96c6\u7fa4\u800c\u751f\uff0c\u5728\u5927\u6570\u636e\u91cf\uff0c\u9ad8\u5e76\u53d1\u5199\u5165\u4e0b\u63d0\u4f9b\u7a33\u5b9a\u7684\u63a8\u9001\u5ef6\u8fdf\uff0c\u901a\u8fc7\u6dfb\u52a0\u961f\u5217\u5e76\u8fdb\u884c\u6512\u6279\u5904\u7406\uff0c\u63d0\u9ad8\u541e\u5410\u91cf\uff0c\u5bf9\u77ac\u95f4\u9ad8\u5e76\u53d1\u8bf7\u6c42\u8fdb\u884c\u524a\u5cf0\u3002  <\/p>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<p><strong>&#8211;<\/strong> <strong>Session \u63a5\u6536\u5230\u5927\u91cf Publisher \uff0c\u6512\u6279\u53d1\u8bf7\u6c42\u5230 Data<\/strong> <strong>[1]<\/strong><\/p>\n<p>a.\u5229\u7528 BlockingQueue \u5b58\u50a8\u9700\u8981\u53d1\u9001 \u7684\u8bf7\u6c42\uff0c\u540c\u65f6\u4f1a\u914d\u7f6e\u6700\u5927\u5bb9\u91cf\u9632\u6b62 OOM<\/p>\n<p>b.\u72ec\u7acb\u7684 Worker \u7ebf\u7a0b\u4ece BlockingQueue \u4e2d\u53d6\u51fa\u591a\u4e2a\u8bf7\u6c42\uff0c\u521b\u5efa\u591a\u4e2a BlockingQueue \u548c Worker \u63d0\u9ad8\u5e76\u53d1\u5ea6<\/p>\n<p>c.\u6309\u7167\u5206\u7247\u89c4\u5219\u8fdb\u884c\u5206\u7ec4\uff0c\u6253\u5305\u6210\u4e00\u4e2a\u8bf7\u6c42\u53d1\u5f80\u4e0d\u540c\u7684 DataServer<\/p>\n<p><strong>&#8211;<\/strong> <strong>Session \u63a5\u6536\u5230\u5927\u91cf Subscriber \uff0c\u805a\u5408\u53bb\u91cd\u540e\u521b\u5efa\u63a8\u9001\u4efb\u52a1<\/strong> <strong><em><em>[2]<\/em><\/strong><\/em><\/p>\n<p>a.Subscriber \u5b58\u50a8\u5230 Map&lt;datainfoid, map&gt; \u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u4ee5\u8fdb\u884c\u53bb\u91cd\u7684\u907f\u514d\u77ed\u65f6\u95f4\u4e00\u4e2a\u5b9e\u4f8b\u91cd\u590d\u6ce8\u518c\u521b\u5efa\u5927\u91cf\u63a8\u9001\u4efb\u52a1<\/p>\n<p>b.\u5b9a\u65f6\u4ece Map \u4e2d\u53d6\u51fa Subscribers \uff0c\u8fdb\u884c\u5206\u7ec4\u521b\u5efa\u63a8\u9001\u4efb\u52a1<\/p>\n<p>c.\u6700\u5927\u6570\u636e\u91cf\u662f Session \u5355\u673a\u7684\u6240\u6709 Subscriber \uff0c\u5bb9\u91cf\u53ef\u63a7<\/p>\n<p><strong>&#8211;<\/strong> <strong>\u7528 Map \u5b58\u50a8 DataServer \u4e0a\u53d1\u751f\u53d8\u5316\u6570\u636e\u7684 DataInfoId \uff0c\u805a\u5408\u901a\u77e5 Session \u8fdb\u884c\u63a8\u9001[3]<\/strong><\/p>\n<p>a.\u77ed\u65f6\u95f4 DataServer \u7684\u6570\u636e\u53ef\u80fd\u53d8\u5316\u591a\u6b21\uff0c\u6bd4\u5982\u5927\u91cf Publisher \uff0c\u6570\u636e\u4fee\u590d\u5b9a\u65f6\u4efb\u52a1\u7b49\u7b49<\/p>\n<p>b.\u5bf9\u8fd9\u4e9b\u6570\u636e\u53d8\u5316\u8bb0\u5f55 DataInfoId \uff0c \u77ed\u65f6\u95f4\u53ea\u4f1a\u5bf9 Session \u901a\u77e5\u4e00\u6b21\u53d8\u66f4\u521b\u5efa\u63a8\u9001\u4efb\u52a1<\/p>\n<p>c.\u6700\u5927\u6570\u636e\u91cf\u662f Data \u5355\u673a\u5168\u90e8\u7684 DataInfoId<\/p>\n<p><strong>&#8211;<\/strong> <strong>\u7528 Map \u5b58\u50a8 PushTask \u8fdb\u884c\u53bb\u91cd\uff0c\u907f\u514d\u6570\u636e\u8fde\u7eed\u53d8\u5316\u89e6\u53d1\u5927\u91cf\u63a8\u9001\u4efb\u52a1[4]<\/strong><\/p>\n<p>a.\u6dfb\u52a0\u4e86 Map size \u7684\u68c0\u67e5\uff0c\u8fc7\u591a\u7684\u63a8\u9001\u4efb\u52a1\u4f1a\u76f4\u63a5\u4e22\u5f03\uff0c\u9632\u6b62 OOM<\/p>\n<p>b.\u540c\u6837\u7684\u63a8\u9001\u4efb\u52a1\u9ad8\u7248\u672c\u4f1a\u66ff\u6362\u6389\u4f4e\u7248\u672c<\/p>\n<h3>3.3 \u51cf\u5c11\u7f51\u7edc\u901a\u8baf\u5f00\u9500<\/h3>\n<h4>3.3.1 LocalCache<\/h4>\n<p>Session \u548c Data \u4e4b\u95f4\u4f1a\u6709\u5927\u91cf\u7684\u6570\u636e\u901a\u8baf\uff0c\u901a\u8fc7\u6dfb\u52a0 LocalCache \u53ef\u4ee5\u5728\u4e0d\u589e\u52a0\u4ee3\u7801\u67b6\u6784\u590d\u6742\u5ea6\u7684\u524d\u63d0\u4e0b\u5927\u5e45\u5ea6\u63d0\u5347\u7cfb\u7edf\u7684\u6027\u80fd\u3002  <br \/>\u5bf9\u4e8e\u6ce8\u518c\u4e2d\u5fc3\uff0c\u670d\u52a1\u6570\u636e\u53ef\u4ee5\u901a\u8fc7 dataInfoId + version \u552f\u4e00\u6807\u8bc6\u3002Session \u5728\u521b\u5efa\u63a8\u9001\u4efb\u52a1\u65f6\u4f1a\u4ece Data \u62c9\u53d6\u6700\u65b0\u7684\u670d\u52a1\u6570\u636e\uff0c\u5229\u7528 Guava \u7684\u00a0<code>LoadingCache<\/code>\u00a0,\u5927\u91cf\u63a8\u9001\u4efb\u52a1\u88ab\u521b\u5efa\u65f6\uff0c\u7f13\u5b58\u7684\u5229\u7528\u7387\u4f1a\u6bd4\u8f83\u9ad8\uff0c\u53ef\u4ee5\u51cf\u5c11\u5f88\u591a\u4ece Data \u62c9\u53d6\u6570\u636e\u7684\u5f00\u9500\u3002<\/p>\n<p><strong>&#8211;<\/strong> <strong>Session \u5229\u7528 LoadingCache \u4ece Data \u62c9\u53d6\u6570\u636e[5]<\/strong><\/p>\n<p>a.\u4f1a\u4f20\u5165\u521b\u5efa\u63a8\u9001\u4efb\u52a1\u65f6\u7684\u7248\u672c\uff08\u4e00\u822c\u7531 Data \u7684\u53d8\u66f4\u901a\u77e5\u5e26\u8fc7\u6765\uff09\u5bf9\u6bd4 Cache \u5185\u7684\u6570\u636e\u662f\u5426\u8db3\u591f\u65b0\uff1b<\/p>\n<p>b.\u5982\u679c\u4e0d\u591f\u65b0\uff0c\u6e05\u7406\u7f13\u5b58\u540e\u5229\u7528 LoadingCache \u4ece Data \u62c9\u53d6\u4e00\u6b21\u6570\u636e\uff1b<\/p>\n<p>c. LoadingCache \u4f1a\u914d\u7f6e maximumWeight \u9632\u6b62\u6570\u636e\u8fc7\u591a\u5bfc\u81f4 OOM \u3002<\/p>\n<h4>3.3.2 \u538b\u7f29\u63a8\u9001<\/h4>\n<p>\u5728\u96c6\u7fa4\u89c4\u6a21\u6bd4\u8f83\u5927\u7684\u65f6\u5019\uff0c\u6bd4\u5982\u6709\u4e00\u4e2a\u5e94\u7528\u53d1\u5e03\u4e86 100 \u4e2a\u63a5\u53e3\uff0c\u6bcf\u4e2a\u63a5\u53e3\u7684\u53d1\u5e03\u6570\u636e\u6709 150B \uff0c\u8be5\u5e94\u7528\u6709 8000 \u4e2a\u5b9e\u4f8b\uff0c\u6bcf\u4e2a\u63a5\u53e3\u6709 2w \u8ba2\u9605\u65b9\u3002\u90a3\u4e48\u6bcf\u6b21\u53d8\u66f4\u8fd9\u4e2a\u5e94\u7528\u7684\u673a\u5668\u9020\u6210\u7684\u5168\u91cf\u63a8\u9001\uff0c\u6bcf\u4e2a\u63a8\u9001\u5305 1MB \uff0c \u7d2f\u79ef\u9700\u8981\u53d1\u51fa 200w \u4e2a\u63a8\u9001\u5305\uff0c\u5373\u4f7f Session \u53ef\u4ee5\u6a2a\u5411\u6269\u5bb9\u5230 100 \u53f0\uff0c Session \u5355\u673a\u4e5f\u9700\u8981\u5728 7 \u79d2\u5185\u53d1\u51fa 20GB \u7684\u6d41\u91cf\uff0c\u4e25\u91cd\u963b\u585e Session \u7684\u7f51\u7edc\u961f\u5217\uff0c\u4e5f\u4f1a\u5f88\u5feb\u6253\u7206 netty buffer \uff0c\u9020\u6210\u5927\u91cf\u7684\u63a8\u9001\u5931\u8d25\uff0c\u8fd9\u4e48\u591a\u63a8\u9001\u5305\u7684\u5e8f\u5217\u5316\u4e5f\u4f1a\u8017\u8d39 Session \u5927\u91cf\u7684 CPU \u3002  <\/p>\n<p>\u5bf9\u4e8e Data \uff0c\u5982\u679c Session \u7684\u6570\u91cf\u8fc7\u591a\uff0c\u6bcf\u6b21\u53d8\u66f4\u9700\u8981\u7ed9\u6bcf\u53f0 Session \u8fd4\u56de\u5927\u91cf\u7684\u5927\u6570\u636e\u5305\uff0c\u4e5f\u4f1a\u4ea7\u751f\u5927\u91cf\u7684\u51fa\u53e3\u6d41\u91cf\uff0c\u5f71\u54cd\u5176\u4ed6\u8bf7\u6c42\u7684\u6210\u529f\u7387\u3002  <\/p>\n<p>\u7531\u4e8e\u6bcf\u4e2a\u5b9e\u4f8b\u53d1\u5e03\u7684\u6570\u636e\u7684\u76f8\u4f3c\u5ea6\u5f88\u9ad8\uff0c\u51e0\u4e4e\u53ea\u6709 IP \u4e0d\u4e00\u81f4\uff0c\u6240\u4ee5\u5f53\u91c7\u7528\u538b\u7f29\u63a8\u9001\u65f6\u538b\u7f29\u7387\u4f1a\u975e\u5e38\u9ad8\uff0c\u80fd\u538b\u7f29\u5230 5% \u7684\u5927\u5c0f\u4ee5\u4e0b\uff0c\u6b64\u65f6 Session \u7684\u51fa\u53e3\u6d41\u91cf\u53ef\u4ee5\u5927\u5e45\u5ea6\u964d\u4f4e\u3002  <br \/>SOFARegistry \u5185\u90e8\u6709\u4e24\u4e2a\u5730\u65b9\u7528\u5230\u4e86\u538b\u7f29\uff0c\u5e76\u4e14\u90fd\u6709\u538b\u7f29\u7f13\u5b58\uff0c\u53ef\u4ee5\u6781\u5927\u7684\u51cf\u5c11\u5e8f\u5217\u5316\u548c\u538b\u7f29\u7684 CPU \u5f00\u9500\u3002  <br \/>Session \u5728\u5f00\u542f\u538b\u7f29\u7f13\u5b58\u540e\uff0c\u538b\u7f29\u5728 CPU \u5360\u6bd4\u83b7\u5f97\u4e86\u5927\u5e45\u5ea6\u7684\u964d\u4f4e (9% -&gt; 0.5%\uff09\u3002  <br \/>\u5bf9\u4e8e Data \u7531\u4e8e\u6570\u636e\u5305\u88ab\u63d0\u524d\u5e8f\u5217\u5316+\u538b\u7f29\u8fdb\u884c\u7f13\u5b58\uff0c\u6574\u4f53\u6027\u80fd\u83b7\u5f97\u4e86\u5927\u5e45\u5ea6\u7684\u63d0\u5347\uff0c\u53ef\u4ee5\u8f7b\u677e\u627f\u8f7d 300 \u53f0\u4ee5\u4e0a\u7684 Session \uff0c\u652f\u6491\u4ebf\u7ea7\u6570\u636e\u91cf\u7684\u673a\u623f\u3002  <\/p>\n<p><strong>&#8211;<\/strong> <strong>Session \u5728\u521b\u5efa\u63a8\u9001\u5305\u7684\u65f6\u5019\u8fdb\u884c\u4e86\u538b\u7f29\u52a0\u7f13\u5b58[6]<\/strong>  <br \/><strong>&#8211;<\/strong> <strong>Data \u8fd4\u56de\u670d\u52a1\u6570\u636e\u7ed9 Session \u7684\u65f6\u5019\u8fdb\u884c\u4e86\u538b\u7f29\u52a0\u7f13\u5b58[7]<\/strong><\/p>\n<h3>3.4 \u9762\u5411\u9519\u8bef\u8bbe\u8ba1<\/h3>\n<p>\u5728\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u673a\u5668\u6545\u969c\u662f\u5f88\u5e38\u89c1\u7684\u4e8b\u60c5\uff1a\u7269\u7406\u673a\u5b95\u673a\u3001\u7f51\u7edc\u6545\u969c\u3001 OOM \uff0c \u7cfb\u7edf\u4ece\u8bbe\u8ba1\u4e0a\u5c31\u9700\u8981\u8003\u8651\u51fa\u9519\u7684\u573a\u666f\u80fd\u81ea\u52a8\u6062\u590d\u3002<\/p>\n<h4>3.4.1 \u91cd\u8bd5<\/h4>\n<p>\u5728\u4e00\u4e2a\u5206\u5e03\u5f0f\u7cfb\u7edf\u4e2d\uff0c\u5931\u8d25\u662f\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u73b0\u8c61\uff0c\u6bd4\u5982\u56e0\u4e3a\u7f51\u7edc\u6216\u8005\u673a\u5668\u53d8\u66f4\u7b49\u95ee\u9898\u9020\u6210\u8bf7\u6c42\u5931\u8d25\uff0c\u901a\u8fc7\u6dfb\u52a0\u91cd\u8bd5\u961f\u5217\uff0c\u52a0\u5165\u6b21\u6570\u6709\u9650\u7684\u91cd\u8bd5\u53ef\u4ee5\u6781\u5927\u7a0b\u5ea6\u4e0a\u8fdb\u884c\u5bb9\u9519  <\/p>\n<p><strong>&#8211;<\/strong> <strong>Data \u53d8\u66f4\u901a\u77e5 Session \u5931\u8d25\u4f1a\u52a0\u5165\u91cd\u8bd5\u961f\u5217\u6700\u591a\u91cd\u8bd5 3 \u6b21[8]<\/strong>  <br \/><strong>&#8211;<\/strong> <strong>Session \u63a8\u9001\u7ed9 Client \u5931\u8d25\u65f6\u4f1a\u52a0\u5165\u961f\u5217\u6700\u591a\u91cd\u8bd5 3 \u6b21[9]<\/strong><\/p>\n<h4>3.4.2 \u5b9a\u65f6\u4efb\u52a1<\/h4>\n<p>\u7136\u91cd\u8bd5\u53ef\u4ee5\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u63d0\u9ad8\u6210\u529f\u7387\uff0c\u4f46\u6bd5\u7adf\u4e0d\u80fd\u65e0\u9650\u7684\u91cd\u8bd5\u3002\u540c\u65f6\u5404\u4e2a\u6512\u6279\u64cd\u4f5c\u672c\u8eab\u4e5f\u4f1a\u6709\u5bb9\u91cf\u4e0a\u9650\uff0c\u77ac\u95f4\u5927\u91cf\u7684\u8bf7\u6c42\u4f1a\u9020\u6210\u4efb\u52a1\u88ab\u4e22\u5f03\uff0c\u56e0\u6b64\u5c31\u9700\u8981\u6709\u5b9a\u65f6\u4efb\u52a1\u6765\u5bf9\u56e0\u5931\u8d25\u9020\u6210\u4e0d\u4e00\u81f4\u7684\u72b6\u6001\u8fdb\u884c\u4fee\u590d\u3002  <\/p>\n<p>\u7b80\u8981\u4ecb\u7ecd\u4e00\u4e0b SOFARegistry \u5185\u90e8\u76f8\u5173\u7684\u5b9a\u65f6\u4efb\u52a1\u662f\u5982\u4f55\u8bbe\u8ba1\uff0c\u4ece\u800c\u5b9e\u73b0\u6570\u636e\u7684\u6700\u7ec8\u4e00\u81f4\u6027\uff1a <\/p>\n<p><strong>&#8211;\u00a0\u589e\u91cf\u6570\u636e\u540c\u6b65<\/strong><\/p>\n<p>Session \u4f5c\u4e3a\u5ba2\u6237\u7aef\u540c\u6b65\u5199\u5165\u6570\u636e\u7684\u89d2\u8272\uff0c\u53ef\u4ee5\u8ba4\u4e3a\u4ed6\u7684 pub\/sub \u6570\u636e\u662f\u6700\u6700\u51c6\u786e\u7684\u6574\u4e2a\u6570\u636e\u7684\u540c\u6b65\u8fc7\u7a0b\u662f\u4e00\u4e2a\u5355\u5411\u6d41\uff0c\u5229\u7528\u5b9a\u65f6\u4efb\u52a1\u505a\u5230\u6700\u7ec8\u4e00\u81f4\u6027client -&gt; Session -&gt; dataLeader -&gt; dataFollower<\/p>\n<p><strong>&#8211;<\/strong> <strong>Data \u5b9a\u65f6 (\u9ed8\u8ba4 6s) \u4e0e\u6240\u6709\u7684 Session \u5bf9\u6bd4\u5e76\u540c\u6b65 pub \u6570\u636e[10]<\/strong>\u00a0 \u00a0 <\/p>\n<p>a.\u4f5c\u4e3a Session \u53d1\u9001\u5230 Data \u4e0a\u7684 pub\u3001unpub\u3001clientoff \u7b49\u4fee\u6539\u6570\u636e\u7684\u8bf7\u6c42\u5931\u8d25\u7684\u515c\u5e95\u63aa\u65bd<\/p>\n<p>b.\u540c\u65f6\u4f1a\u5728 slot leader \u8fc1\u79fb\u5230\u65b0\u7684 Data \u4e0a\u6216\u8005 slot follower \u5347\u7ea7\u6210 slot leader \u7684\u65f6\u5019\u4e3b\u52a8\u53d1\u8d77\u4e00\u6b21\u540c\u6b65\uff0c\u786e\u4fdd slot \u6570\u636e\u7684\u5b8c\u6574\u6027 <\/p>\n<p><strong>&#8211;<\/strong> <strong>Data slot follower \u5b9a\u65f6(\u9ed8\u8ba4 3min) \u4e0e Data slot leader \u5bf9\u6bd4\u5e76\u540c\u6b65 pub \u6570\u636e[11]<\/strong><\/p>\n<p>\u66f4\u8be6\u7ec6\u7684\u5206\u6790\u53ef\u4ee5\u53c2\u8003\u00a0<em><a href=\"https:\/\/link.segmentfault.com\/?enc=yp2G8zrrLqPckl5CCXkGTw%3D%3D.r5b09sjjwycxxx52zkNs72i3ByQoWAs2jWiQFd9dfljGTy6%2F%2BE0qpjR01FRyBxu3RigPsyht95upYei56U1DOWNStw9xWvrWIo%2Fxbn65W%2F9ceeuTZ2VLRZnW3PuGWm8Gqy94hpy99QNR8flTK2yInA%3D%3D\" rel=\"nofollow\">https:\/\/www.sofastack.tech\/projects\/sofa-registry\/code-analyze\/code-analyze-data-synchronization\/<\/a><\/em>  <\/p>\n<p><strong>&#8211; \u63a8\u9001\u8865\u507f<\/strong><\/p>\n<p>\u7531\u4e8e\u5b58\u5728\u5404\u79cd\u573a\u666f\u5bfc\u81f4\u63a8\u9001\u5931\u8d25\uff0c\u4e0b\u9762\u6bcf\u4e00\u4e2a\u573a\u666f\u90fd\u4f1a\u5bfc\u81f4\u670d\u52a1\u6570\u636e\u6ca1\u6709\u6b63\u786e\u63a8\u9001\u5230\u6bcf\u4e2a\u5ba2\u6237\u7aef\u4e0a\u00a0 \u00a0 <\/p>\n<p>a. Session \u5199\u5165\u5230 Data \u5931\u8d25<\/p>\n<p>b. Data \u5199\u5165\u6570\u636e\u540e\u901a\u77e5 Session \u5931\u8d25<\/p>\n<p>c. Session \u56e0\u4e3a\u63a8\u9001\u4efb\u52a1\u8fc7\u591a\u5bfc\u81f4\u4e22\u5f03\u4efb\u52a1<\/p>\n<p>d. Session \u63a8\u9001\u5ba2\u6237\u7aef\u5931\u8d25\uff0c\u6bd4\u5982\u5ba2\u6237\u7aef fgc \uff0c\u6216\u8005\u7f51\u7edc\u6ce2\u52a8  <\/p>\n<p><strong>&#8211;<\/strong> <strong>Session \u5b9a\u65f6\uff08\u9ed8\u8ba4 5s\uff09\u4e0e Data \u5bf9\u6bd4\u63a8\u9001\u7248\u672c\u89e6\u53d1\u63a8\u9001\u4efb\u52a1[12]<\/strong><\/p>\n<p>a. Session \u805a\u5408\u6240\u6709 Subscriber \u7684 lastPushVersion \uff0c\u53d1\u9001\u5230 Data<\/p>\n<p>b. Data \u4f1a\u8fd4\u56de\u6700\u65b0\u6570\u636e\u7684 version<\/p>\n<p>c. Session \u901a\u8fc7\u5bf9\u6bd4 Data\u00a0\u7684\u4e0a\u6570\u636e\u7684 version \u6765\u5224\u65ad\u662f\u5426\u8981\u89e6\u53d1\u63a8\u9001\u4efb\u52a1<\/p>\n<h3>3.5 \u51cf\u5c11\u5185\u5b58\u5360\u7528\u4e0e\u5206\u914d<\/h3>\n<h4>3.5.1 WordCache<\/h4>\n<p>\u4e1a\u52a1\u53d1\u9001\u7ed9\u6ce8\u518c\u4e2d\u5fc3\u7684\u6570\u636e\u901a\u5e38\u6709\u5927\u91cf\u7684\u91cd\u590d\u5185\u5bb9\u7684 String \uff0c\u6bd4\u5982\u63a5\u53e3\u540d\u79f0\uff0c\u5c5e\u6027\u540d\u79f0\u7b49\u7b49\uff0c\u8fd9\u4e9b\u5b57\u7b26\u4e32\u5360\u7528\u4e86\u6ce8\u518c\u4e2d\u5fc3\u5f88\u5927\u4e00\u90e8\u5206\u7684\u5185\u5b58\u7a7a\u95f4\u3002  <br \/>SOFARegistry \u5185\u4f1a\u5229\u7528 WordCache \u8fdb\u884c\u5bf9\u8fd9\u4e9b\u5b57\u7b26\u4e32\u8fdb\u884c\u590d\u7528\uff0c\u91c7\u7528 guava \u7684\u00a0 WeakInterner \u5b9e\u73b0\u3002\u901a\u8fc7 WordCache \uff0c\u53ef\u4ee5\u5927\u5927\u51cf\u8f7b\u5e38\u9a7b\u5185\u5b58\u7684\u538b\u529b\u3002<\/p>\n<pre><code>public final class WordCache {\n    private static final Interner &lt; String &gt; interners = Interners.newWeakInterner();\n\n    public static String getWordCache(String s) {\n        if (s == null) {\n           return null;\n        }\n        return interners.intern(s);\n    }\n}\n\npublic final class PublisherUtils {\n    public static Publisher internPublisher(Publisher publisher) {\n        ...        \n        publisher.setDataId(publisher.getDataId());\n        ...\n        return publisher;\n     }\n}\npublic abstract class BaseInfo implements Serializable, StoreData &lt; String &gt; {\n    public void setDataId(String dataId) {\n        this.dataId = WordCache.getWordCache(dataId);\n    }\n}<\/code><\/pre>\n<h4>3.5.2 \u4e34\u65f6\u5bf9\u8c61\u590d\u7528*<\/h4>\n<p>\u5bf9\u4e8e\u9ad8\u9891\u4f7f\u7528\u573a\u666f\uff0c\u5bf9\u8c61\u590d\u7528\u5bf9\u5185\u5b58\u4f18\u5316\u662f\u6bd4\u8f83\u5927\u7684\u3002 <\/p>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<p><strong>&#8211;<\/strong> \u4f7f\u7528\u4e86 ThreadLocal \u6765\u5bf9 StringBuilder \u8fdb\u884c\u590d\u7528\uff0c\u5bf9\u4e8e\u9ad8\u5e76\u53d1\u573a\u666f\uff0c\u80fd\u51cf\u5c11\u5f88\u591a\u4e34\u65f6\u5185\u5b58\u7684\u5206\u914d\uff1b  <\/p>\n<p><strong>&#8211;<\/strong> \u4e0b\u9762\u7684\u4ee3\u7801\u4e2d join \u91cd\u8f7d\u4e86\u591a\u4efd\uff0c\u800c\u6ca1\u6709\u4f7f\u7528\u00a0<code>join(String... es)<\/code>\u00a0\u8fd9\u79cd\u7684\u5199\u6cd5\uff0c\u4e5f\u662f\u56e0\u4e3a\u907f\u514d\u51fd\u6570\u8c03\u7528\u7684\u65f6\u5019\u9700\u8981\u4e34\u65f6\u5206\u914d\u4e00\u4e2a array \u3002<\/p>\n<pre><code>public\u00a0final\u00a0class\u00a0ThreadLocalStringBuilder\u00a0{\nprivate static final int maxBufferSize = 8192;    \nprivate static final transient ThreadLocal &lt; StringBuilder &gt; builder =        ThreadLocal.withInitial(() - &gt; new StringBuilder(maxBufferSize));\n    private ThreadLocalStringBuilder() {}\n    public static StringBuilder get() {\n    StringBuilder b = builder.get();\n    if (b.capacity() &gt; maxBufferSize) {\n    b = new StringBuilder(maxBufferSize);\n    builder.set(b);\n    } else {\n    b.setLength(0);\n    }\n    return b;\n    }\n    public static String join(String e1, String e2) {\n    StringBuilder sb = get();\n    sb.append(e1).append(e2);\n    return sb.toString();\n    }\n    public static String join(String e1, String e2, String e3) {\n    StringBuilder sb = get();\n    sb.append(e1).append(e2).append(e3);\n    return sb.toString();\n    }\n...\n}<\/code><\/pre>\n<h3>3.6 \u7ebf\u7a0b\u6c60\u6b7b\u9501<\/h3>\n<h4>3.6.1 \u72ec\u7acb Bolt \u7ebf\u7a0b\u6c60<\/h4>\n<p>\u6839\u636e\u8bf7\u6c42\u7c7b\u578b\u4e0d\u540c\u62c6\u5206\u7ebf\u7a0b\u6c60\u53ef\u4ee5\u5927\u5e45\u5ea6\u63d0\u9ad8\u6297\u5e76\u53d1\u7684\u80fd\u529b\uff0cSOFARegistry \u5185\u5206\u4e86\u591a\u4e2a\u72ec\u7acb\u7684\u7ebf\u7a0b\u6c60\uff0c\u4e0d\u540c\u8bf7\u6c42\u548c\u4e8b\u4ef6\u4f7f\u7528\u540c\u4e00\u4e2a\u7ebf\u7a0b\u6c60\u5904\u7406\uff0c\u9020\u6210\u6b7b\u9501\uff1a<\/p>\n<p><strong>&#8211; Session<\/strong>\u00a0 \u00a0 <\/p>\n<p>a. accessDataExecutor : \u5904\u7406\u6765\u81ea\u6ce8\u518c\u4e2d\u5fc3\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42<\/p>\n<p>b. dataChangeRequestExecutor \uff1a\u5904\u7406 data \u901a\u77e5\u53d8\u66f4<\/p>\n<p>c. dataSlotSyncRequestExecutor : \u5904\u7406 data \u5411 Session \u53d1\u8d77\u540c\u6b65\u7684\u8bf7\u6c42<\/p>\n<p>&#8230;<\/p>\n<p><strong>&#8211;\u00a0data<\/strong><\/p>\n<p>a. publishProcessorExecutor : \u5904\u7406 Session \u5199\u6570\u636e\u7684\u8bf7\u6c42<\/p>\n<p>b. getDataProcessorExecutor : \u5904\u7406 Session \u62c9\u53d6\u6570\u636e\u7684\u8bf7\u6c42<\/p>\n<p>&#8230;<\/p>\n<h4>3.6.2 KeyedThreadPoolExecutor<\/h4>\n<p>\u4ee3\u7801[13]\u5bf9\u4e8e\u4e00\u4e2a\u7ebf\u7a0b\u6c60\u5185\uff0c\u53ef\u4ee5\u5bf9 task \u6dfb\u52a0 key \uff0c\u6bd4\u5982\u63a8\u9001\u7528\u7684\u7ebf\u7a0b\u6c60\uff0c\u6309\u7167\u63a8\u9001\u7684 IP \u5730\u5740\u4f5c\u4e3a key \uff0c \u907f\u514d\u5bf9\u4e00\u4e2a\u5ba2\u6237\u7aef\u77ed\u65f6\u95f4\u4ea7\u751f\u8fc7\u591a\u7684\u63a8\u9001\u3002<\/p>\n<pre><code>public class KeyedThreadPoolExecutor {\nprivate static final Logger LOGGER = LoggerFactory.getLogger(KeyedThreadPoolExecutor.class);\nprivate final AbstractWorker[] workers;\nprotected final String executorName;\nprotected final int coreBufferSize;\nprotected final int coreSize;\n\n    public &lt; T extends Runnable &gt; KeyedTask &lt; T &gt; execute(Object key, T runnable) {\n    KeyedTask task = new KeyedTask(key, runnable);\n    AbstractWorker w = workerOf(key);\n    \/\/ should not happen, \n    if (!w.offer(task)) { \n    throw new FastRejectedExecutionException( \n    String.format(\n    &quot;%s_%d full, max=%d, now=%d&quot;, executorName, w.idx, coreBufferSize, w.size()));\n    }\n    w.workerCommitCounter.inc();\n    return task;\n    }\n}<\/code><\/pre>\n<h3>3.7 \u5176\u4ed6\u5e38\u89c1\u4f18\u5316<\/h3>\n<h4>3.7.1 \u5012\u6392\u7d22\u5f15<\/h4>\n<p>SOFARegistry \u5185\u5bf9\u90e8\u5206\u6570\u636e\u9700\u8981\u6309\u67d0\u4e9b\u5c5e\u6027\u8fdb\u884c\u67e5\u627e\uff0c\u6bd4\u5982\u6839\u636e IP \u67e5\u8be2\u53d1\u5e03\u548c\u8ba2\u9605\u7684\u6570\u636e\uff0c\u7528\u4e8e\u4e1a\u52a1\u8fd0\u7ef4\u65f6\u7684\u63d0\u524d\u6458\u6d41\uff0cSession \u5355\u673a\u5f80\u5f80\u5305\u542b\u4e86\u63a5\u8fd1\u767e\u4e07\u7684\u6570\u636e\u91cf\uff0c\u5982\u679c\u6bcf\u6b21\u67e5\u8be2\u90fd\u9700\u8981\u904d\u5386\u5168\u91cf\u6570\u636e\u96c6\uff0c\u5728\u9ad8\u9891\u573a\u666f\uff0c\u8fd9\u4e2a\u5f00\u9500\u662f\u65e0\u6cd5\u63a5\u53d7\u7684\u3002  <br \/>\u56e0\u6b64 SOFARegistry \u5185\u8bbe\u8ba1\u4e86\u4e00\u4e2a\u7b80\u5355\u9ad8\u6548\u7684\u5012\u6392\u7d22\u5f15\u6765\u505a\u6839\u636e IP \u67e5\u8be2\u8fd9\u4ef6\u4e8b\uff0c\u53ef\u4ee5\u63d0\u9ad8\u6210\u5343\u4e0a\u4e07\u500d\u7684\u6458\u6d41\u6027\u80fd\uff0c\u80fd\u591f\u652f\u6491\u4e0a\u5343 Pod \u540c\u65f6\u8fd0\u7ef4\u3002<\/p>\n<p>\u8be6\u7ec6\u5206\u6790\u53ef\u4ee5\u53c2\u8003\uff1a<\/p>\n<p><em><a href=\"https:\/\/link.segmentfault.com\/?enc=3bGcMqqn17mg8%2FanGu3zpg%3D%3D.dP%2FweaG8Hz42IFJQy7NFWv%2FIIwjY%2FnhsTT8ygUIfOEGJKjn7Y5QiDx4Kikl%2BEKXWqjFLxmNQWCb%2BS0P3nrERJAbBg9Gz99TssGxPpno5D83HHfAbIuLw0JD%2FL6OF0JwuKUDVXTHtHPyHClvikC3rJA%3D%3D\" rel=\"nofollow\">https:\/\/www.sofastack.tech\/projects\/sofa-registry\/code-analyze\/code-analyze-data-inverted-index\/<\/a><\/em><\/p>\n<h4>3.7.2 \u5f02\u6b65\u65e5\u5fd7<\/h4>\n<p>SOFARegistry \u5185\u90e8\u7684\u65e5\u5fd7\u8f93\u51fa\u91cf\u662f\u6bd4\u8f83\u5927\u7684\uff0c\u6bcf\u4e00\u4e2a\u63a8\u9001\u53d8\u66f4\u90fd\u5728\u5404\u4e2a\u9636\u6bb5\u90fd\u4f1a\u6709\u65e5\u5fd7\uff0c\u5404\u4e2a\u7ec4\u4ef6\u4e4b\u95f4\u7684\u4ea4\u4e92\u4e5f\u6709\u8be6\u7ec6\u660e\u786e\u7684\u9519\u8bef\u65e5\u5fd7\uff0c\u7528\u4e8e\u81ea\u52a8\u5316\u8bca\u65ad\u7cfb\u7edf\u5bf9\u7cfb\u7edf\u8fdb\u884c\u81ea\u6108\u3002<\/p>\n<p>\u5f02\u6b65\u65e5\u5fd7\u8f93\u51fa\u76f8\u5bf9\u540c\u6b65\u65e5\u5fd7\u4f1a\u5e26\u6765\u5f88\u5927\u7684\u6027\u80fd\u63d0\u5347\u3002<\/p>\n<p>SOFARegistry \u662f\u4e00\u4e2a\u57fa\u4e8e SpringBoot \u7684\u9879\u76ee\uff0c\u4e4b\u524d\u662f\u91c7\u7528\u9ed8\u8ba4\u7684 logback \u4f5c\u4e3a\u65e5\u5fd7\u8f93\u51fa\u7ec4\u4ef6\uff0c\u5728\u67d0\u6b21\u6545\u969c\u6ce8\u5165\u538b\u6d4b\u540e\uff0c\u53d1\u73b0 logback AsyncAppender \u7684\u4e00\u4e2a\u00a0bug[14]\u00a0\uff0c \u5728\u78c1\u76d8\u6ce8\u5165\u6545\u969c\u65f6\uff0clogback \u56e0\u4e3a\u7c7b\u52a0\u8f7d\u5931\u8d25\u5bfc\u81f4\u5f02\u6b65\u8f93\u51fa\u7ebf\u7a0b\u6302\u6389\u4e86\uff0c\u5728 Error \u7ea7\u522b\u65e5\u5fd7\u961f\u5217\u88ab\u6253\u6ee1\u6574\u4e2a\u8fdb\u7a0b\u8fdb\u5165\u5361\u6b7b\u7684\u72b6\u6001\uff0c\u6240\u6709\u7684\u7ebf\u7a0b\u5168\u90e8\u5361\u5728 Logger \u4e0a\uff0c\u6240\u4ee5\u5728\u65b0\u7248\u672c\u4e2d\u6539\u6210\u4e86\u91c7\u7528\u00a0log4j2 async logger[15]\u00a0\u7684\u5b9e\u73b0\u3002<\/p>\n<h3>3.8 \u5f02\u5e38\u5e26\u6765\u7684\u989d\u5916\u5f00\u9500<\/h3>\n<h4>3.8.1 hessian \u53cd\u5e8f\u5217\u5316<\/h4>\n<p>\u4e0b\u56fe\u4e3a\u6211\u4eec\u5728\u67d0\u6b21\u538b\u6d4b\u4e2d\u7684\u706b\u7130\u56fe\uff0c\u53d1\u73b0\u5927\u91cf\u7684 CPU \u6d88\u8017\u5728 hessian \u89e3\u6790\u5931\u8d25\u89e6\u53d1\u7684\u5f02\u5e38\u4e0a\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042736143\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<p>\u7ecf\u6392\u67e5\uff0c\u662f\u6211\u4eec\u7684\u54cd\u5e94\u5305\u91cc\u7684 List \u4f7f\u7528\u4e86\u00a0<code>Collections.unmodifiableList<\/code>,\u00a0hessian \u65e0\u6cd5\u6784\u9020\u00a0<code>UnmodifiableList<\/code>\u00a0\u4f1a\u964d\u7ea7\u5230\u00a0<code>ArrayList<\/code>\u00a0\uff0c\u4f46\u964d\u7ea7\u8fc7\u7a0b\u4f1a\u629b\u51fa\u5f02\u5e38\u5bfc\u81f4\u8017\u8d39\u4e86\u5927\u91cf\u7684 CPU \u3002<\/p>\n<h4>3.8.2\u00a0 fillInStackTrace<\/h4>\n<p>\u5728\u67d0\u4e9b\u9ad8\u9891\u8c03\u7528\u7684\u5730\u65b9 throw Exception , \u00a0Throwable \u9ed8\u8ba4\u7684 fillInStackTrace \u5f00\u9500\u5f88\u5927\uff1a<\/p>\n<pre><code>\npublic class Throwable implements Serializable {\npublic synchronized Throwable fillInStackTrace() {\nif (stackTrace != null ||\nbacktrace != null \/* Out of protocol state *\/ ) {\nfillInStackTrace(0);\nstackTrace = UNASSIGNED_STACK;\n} \nreturn this;\n    }\n}<\/code><\/pre>\n<p>\u5efa\u8bae override \u6389 fillInStackTrace \u65b9\u6cd5\uff0c\u6bd4\u5982\u7ebf\u7a0b\u6c60\u7684 RejectedExecutionException ,<\/p>\n<pre><code>public class FastRejectedExecutionException extends RejectedExecutionException {\npublic FastRejectedExecutionException(String message) {\nsuper(message);\n  }\n  @Override  public Throwable fillInStackTrace() {\n  \/\/ not fill the stack trace    return this;\n  }\n}<\/code><\/pre>\n<h3>3.9 Client \u4f18\u5316\u6280\u5de7<\/h3>\n<p>\u5927\u89c4\u6a21\u96c6\u7fa4\u65f6\uff0c\u4e0d\u5149\u662f\u6ce8\u518c\u4e2d\u5fc3\uff0c\u6ce8\u518c\u4e2d\u5fc3\u5ba2\u6237\u7aef\u4e43\u81f3\u66f4\u4e0a\u5c42\u7684\u903b\u8f91\u4e5f\u4f1a\u9047\u5230\u74f6\u9888\uff0c\u8682\u8681\u5185\u90e8\u4e3b\u8981\u7684\u573a\u666f\u662f MOSN \uff0c\u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e9b\u5728 SOFARegistry \u8fed\u4ee3\u8fc7\u7a0b\u4e2d Go \u8bed\u8a00\u76f8\u5173\u7684\u4f18\u5316\u6280\u5de7\u3002<\/p>\n<h4>3.9.1 \u5bf9\u8c61\u590d\u7528<\/h4>\n<p><strong>&#8211; \u89e3\u6790 URL \u53c2\u6570\u4f18\u5316<\/strong><\/p>\n<p>SOFARPC\u00a0\u6846\u67b6\u4e0b\uff0c\u53d1\u5e03\u5230\u6ce8\u518c\u4e2d\u5fc3\u7684\u6570\u636e\u662f url \u683c\u5f0f\uff0cMOSN \u7aef\u5728\u63a5\u6536\u5230\u6ce8\u518c\u4e2d\u5fc3\u63a8\u9001\u7684\u65f6\u5019\u5c31\u9700\u8981\u89e3\u6790 url \u53c2\u6570\uff0c\u91c7\u7528 go \u6807\u51c6\u5e93\u7684\u00a0<code>url.Values<\/code>\u00a0\u89e3\u6790\u5927\u91cf\u7684 url \u5728 CPU \u548c alloc \u65b9\u9762\u90fd\u4e0d\u4f73\uff0c\u66ff\u6362\u6210\u57fa\u4e8e sync.Pool \u5b9e\u73b0\uff0c\u53ef\u4ee5\u8fdb\u884c\u5bf9\u8c61\u590d\u7528\u7684\u00a0<code>fasthttp.Args<\/code>\u00a0\u53ef\u4ee5\u51cf\u5c11\u5927\u91cf\u7684 CPU \u548c alloc \u5f00\u9500\u3002<\/p>\n<p><strong>&#8211; \u5c40\u90e8 slice \u5185\u5b58\u590d\u7528<\/strong>go \u7684 slice \u8bbe\u8ba1\u5341\u5206\u7cbe\u5de7\uff0c \u901a\u8fc7\u00a0<code>a = a[:0]<\/code>\u53ef\u4ee5\u5f88\u8f7b\u677e\u7684\u590d\u7528\u4e00\u4e2a slice \u5e95\u5c42 array \u7684\u5185\u5b58\u7a7a\u95f4\uff0c\u5728\u9ad8\u9891\u573a\u666f\u4e0b\uff0c\u4e00\u4e2a\u5c40\u90e8\u53d8\u91cf\u7684\u590d\u7528\u80fd\u8282\u7701\u5f88\u591a\u7684\u5185\u5b58\u5f00\u9500\uff1a<\/p>\n<p><em><a href=\"https:\/\/link.segmentfault.com\/?enc=nRSdvRCegqqYS8ClemRlNw%3D%3D.D4V3iEqvZ%2BdYh5Kd8EcTrpt2JCWNZBghpkoa%2Bl%2B6CRlq61734ygEZRe6clQkgqfX\" rel=\"nofollow\">https:\/\/github.com\/mosn\/mosn\/pull\/1794\/files<\/a><\/em><\/p>\n<h4>3.9.2 string hash<\/h4>\n<p>\u4ee3\u7801\u4e2d\uff0c\u5f88\u5e38\u89c1\u5bf9\u4e00\u4e2a string \u8ba1\u7b97 Hash \uff0c\u5982\u679c\u91c7\u7528\u6807\u51c6\u5e93\uff0c\u7531\u4e8e\u5165\u53c2\u5927\u591a\u4e3a\u4e3a\u00a0<code>[]byte<\/code>\uff0c\u56e0\u6b64\u9700\u8981\u505a\u00a0<code>[]byte(s)<\/code>\u00a0\u628a string \u8f6c\u5316\u4e3a\u00a0<code>[]byte<\/code>, \u800c\u8fd9\u4e00\u6b65\u5f80\u5f80\u6bd4\u90e8\u5206 Hash \u7b97\u6cd5\u672c\u8eab\u7684\u5f00\u9500\u8fd8\u9ad8\u3002<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5f00\u53d1\u989d\u5916\u7684\u76f4\u63a5\u5bf9 string \u8ba1\u7b97 Hash \u7684\u51fd\u6570\u6765\u4f18\u5316\uff0c\u6bd4\u5982 fnv Hash \u5bf9\u5e94\u7684\u4f18\u5316\u5e93\uff1a<em><a href=\"https:\/\/link.segmentfault.com\/?enc=%2FQOjoMxLQCYN4NR1fdliJA%3D%3D.DIQ2AqGjqul8Q3wIySSybD6v5WAghDIyEfPAtN%2B19zpOs27en1qO5L7XbkhW38jd\" rel=\"nofollow\">https:\/\/github.com\/segmentio\/fasthash<\/a><\/em><\/p>\n<h4>3.9.3 \u51cf\u5c11\u5b57\u7b26\u4e32\u62fc\u63a5<\/h4>\n<p>\u5728\u91c7\u7528\u591a\u4e2a string \u5171\u540c\u4f5c\u4e3a map \u7684 key \u7684\u65f6\u5019\uff0c\u5e38\u89c1\u628a\u8fd9\u51e0\u4e2a\u5b57\u7b26\u4e32\u62fc\u63a5\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32\u4f5c\u4e3a key \uff0c\u6b64\u65f6\u53ef\u4ee5\u91c7\u7528\u5b9a\u4e49\u4e00\u4e2a struct \u4f5c\u4e3a key \u7684\u65b9\u5f0f\u6765\u51cf\u5c11\u4e34\u65f6\u7684\u5185\u5b58\u5206\u914d\u3002<\/p>\n<pre><code>key1 := s1 + s2 + s3<\/code><\/pre>\n<pre><code>type  Key struct{\ns1 string \ns2 string\ns3 string\n}<\/code><\/pre>\n<h4>3.9.4 Bitmap<\/h4>\n<p>bitmap \u4f5c\u4e3a\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u4f18\u5316\u624b\u6bb5\uff0c\u5728\u5408\u9002\u7684\u573a\u666f\u8fdb\u884c\u4f7f\u7528\u5728 CPU \u4ee5\u53ca memory \u65b9\u9762\u90fd\u4f1a\u6709\u6bd4\u8f83\u5927\u7684\u6539\u5584\u3002  <br \/>MOSN \u7684\u4ee3\u7801\u4e2d\u5c31\u6709\u5229\u7528 bitmap \u4f18\u5316\u7528\u4e8e\u8def\u7531\u5339\u914d\u7684 subsetLoadbalancer \u7684\u6848\u4f8b\uff0c\u5927\u5927\u964d\u4f4e\u4e86\u6ce8\u518c\u4e2d\u5fc3\u63a8\u9001\u671f\u95f4 MOSN \u53d8\u66f4\u7684\u5f00\u9500\uff0c\u8be6\u7ec6\u53ef\u4ee5\u770b\uff1a  <\/p>\n<p><em><a href=\"https:\/\/link.segmentfault.com\/?enc=njilXypzn9Us1J3sWBmShA%3D%3D.v%2F19ov2JemAHiXynE78MZcqORS%2F%2FArTZ5gS42ao22wqba2ZBC0AQ9TTXkFMB2IC2eUfeVbQEJKG2BC3zf3wDHw%3D%3D\" rel=\"nofollow\">https:\/\/www.sofastack.tech\/blog\/build-subset-optimization\/<\/a><\/em>  <br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=4zXXuiWrObVq%2BZCK%2FSS2YA%3D%3D.aZbV1Zq%2BDSbvPu7qOPt3I3aqRbm7McvqxuilIvfCtF9U2XI3hh3lNYxKj4SiEqOk\" rel=\"nofollow\">https:\/\/github.com\/mosn\/mosn\/pull\/2010<\/a><\/em><\/p>\n<h4>3.9.5 Random<\/h4>\n<p>golang \u6807\u51c6\u5e93\u00a0<code>math\/rand<\/code>\u00a0\u63d0\u4f9b\u7684\u662f\u4e00\u4e2a\u975e\u7ebf\u7a0b\u5b89\u5168\u7684\u968f\u673a\u79cd\u5b50\uff0c\u4e3a\u4e86\u5728\u5e76\u53d1\u573a\u666f\u4f7f\u7528\u4ed6\uff0c\u9700\u8981\u52a0\u4e0a\u4e92\u65a5\u9501\uff0c\u800c\u4e92\u65a5\u9501\u4f1a\u5e26\u6765\u6bd4\u8f83\u5927\u7684\u5f00\u9500\u3002<\/p>\n<p>\u5bf9\u4e8e\u968f\u673a\u79cd\u5b50\u5b89\u5168\u8981\u6c42\u4e0d\u9ad8\uff0c\u4f46\u6027\u80fd\u8981\u6c42\u6bd4\u8f83\u9ad8\u7684\u573a\u666f\u4e0b\uff0c\u6709\u5176\u4ed6\u7684\u4e24\u4e2a\u9009\u62e9:  <\/p>\n<p><strong>&#8211;<\/strong>\u00a0<em><a href=\"https:\/\/link.segmentfault.com\/?enc=oPa10HxwJ6BTcUfk50d3ZQ%3D%3D.FUbqQ5UQjS1KIiTdYzt3%2FJfQqQ7iAMC50vtNwiD002ONvObeQr6sx6tJxpeIC1Ni\" rel=\"nofollow\">https:\/\/github.com\/valyala\/fastrand<\/a><\/em>  <\/p>\n<p>\u4f7f\u7528 sync.Pool \u5b9e\u73b0\uff0c\u652f\u6301\u5e76\u53d1\u4f7f\u7528\u65e0\u9700\u52a0\u9501;  <\/p>\n<p><strong>&#8211;<\/strong> <em><a href=\"https:\/\/link.segmentfault.com\/?enc=aOm%2Fd8yVdk5bUd%2BgI7UUrg%3D%3D.Dkfq8x%2B2I%2FBDYfEIwlI2IL%2FVnA0rG4bBanYEci%2BDUl5MqkjlFgVymn9QPRjMj4RTbr0ZfFUs%2Bbt6JJQYpL%2BWC8i%2BIPeyGRSnxkt9XmNStqQ%3D\" rel=\"nofollow\">https:\/\/github.com\/golang\/go\/blob\/master\/src\/runtime\/stubs.go#L154<\/a><\/em>  <\/p>\n<p>go runtime \u7684\u975e\u5bfc\u51fa\u65b9\u6cd5\uff0cthreadlocal \u7684\u5b9e\u73b0\uff0c\u76f4\u63a5\u4f7f\u7528 runtime \u5185\u7684 m.fastrand \u5c5e\u6027<\/p>\n<p>\u4f7f\u7528 link \u6307\u4ee4\u53ef\u4ee5\u8fdb\u884c\u5bfc\u51fa<\/p>\n<pre><code>\/\/go:linkname FastRandN runtime.fastrandn\nfunc FastRandN(n uint32) uint32<\/code><\/pre>\n<p>\u5bf9\u6bd4\u4e00\u4e0b\u8fd9 3 \u4e2a rand \u7684\u6027\u80fd<\/p>\n<pre><code>BenchmarkRand\nBenchmarkRand\/mutex_rand\nBenchmarkRand\/mutex_rand-12           16138432          75.3ns\/op\nBenchmarkRand\/fast_rand\nBenchmarkRand\/fast_rand-12            227684223           5.32 ns\/op\nBenchmarkRand\/runtime_rand\nBenchmarkRand\/runtime_rand-12         1000000000           0.561 ns\/op\nPASS<\/code><\/pre>\n<p>\u76f8\u6bd4\u6807\u51c6\u5e93\u7684 math.rand , \u00a0runtime.fastrandn \u5982\u6b64\u7684\u5feb\uff0c\u56e0\u4e3a\u4ed6\u76f4\u63a5\u4f7f\u7528\u4e86go runtime \u4e2d m.fastrand \u4f5c\u4e3a\u79cd\u5b50\uff0c\u6ca1\u6709\u52a0\u9501\u64cd\u4f5c\uff0c\u662f threadlocal \u7684\u5b9e\u73b0\uff0c\u5bf9\u4e8e\u00a0 randn \u7684\u53d6\u6a21\u64cd\u4f5c\u4e5f\u8fdb\u4f18\u5316\uff0c\u6539\u7528\u4e58\u52a0\u79fb\u4f4d\u5b9e\u73b0 \uff1a\u00a0<em><a href=\"https:\/\/link.segmentfault.com\/?enc=OTKGk%2FANwGHtu%2B4vKaCugw%3D%3D.qJdMiKyJsLd67qYFBB6Ya6u0nDGjxGfstRvjXrukElQ2LxERP8ih9rwXllGeKrpZ1YL9LYxw5PAL%2Bga3cZZM03VIj2OPub6oMVHj8SF4tqo%3D\" rel=\"nofollow\">https:\/\/lemire.me\/blog\/2016\/06\/27\/a-fast-alternative-to-the-modulo-reduction<\/a><\/em><\/p>\n<h2>4 \u603b\u7ed3\u4e0e\u5c55\u671b<\/h2>\n<p>\u6700\u65b0\u7248\u672c\u7684 SOFARegistry \uff0c\u901a\u8fc7\u4e0a\u8ff0\u4f18\u5316\uff0c\u6211\u4eec\u652f\u6491\u8d77\u4e86\u5343\u4e07\u7ea7\u522b\u6570\u636e\u91cf\u7684\u96c6\u7fa4\u7684\u670d\u52a1\u53d1\u73b0\uff0c\u6574\u4f53\u8d44\u6e90\u5f00\u9500\u76f8\u6bd4\u4e8e\u8001\u7248\u672c\u4e5f\u6709\u4e86\u5f88\u5927\u7684\u4e0b\u964d\uff0c\u5f53\u7136\u672a\u6765\u8fd8\u6709\u4e00\u4e9b\u4f18\u5316\u70b9\uff1a<\/p>\n<p><strong>&#8211;<\/strong> \u7531\u4e8e\u5927\u91cf\u7684\u4f7f\u7528\u4e86\u56fa\u5b9a\u5ef6\u8fdf\u7684\u6279\u5904\u7406\uff0c\u5bfc\u81f4\u63a8\u9001\u5ef6\u8fdf\u8fd8\u662f\u504f\u9ad8\uff0c\u63a8\u9001\u53d8\u66f4\u5ef6\u8fdf\u4f1a\u6709 5s \u5de6\u53f3\uff0c\u800c\u5e02\u9762\u4e0a\u5e38\u89c1\u7684\u6ce8\u518c\u4e2d\u5fc3 watch \u7684\u5ef6\u8fdf\u4e00\u822c\u5728 1s \u4ee5\u4e0b\uff0c\u672a\u6765\u5e0c\u671b\u53ef\u4ee5\u901a\u8fc7\u8bc6\u522b\u6570\u636e\u91cf\uff0c\u51cf\u5c11\u6279\u5904\u7406\u7684\u56fa\u5b9a\u5ef6\u8fdf\uff0c\u51cf\u5c11\u6574\u4f53\u53d8\u66f4\u63a8\u9001\u5ef6\u8fdf\u3002<\/p>\n<p><strong>&#8211;<\/strong> \u76ee\u524d\u5bf9\u4e8e\u5355\u673a\u623f\u6ce8\u518c\u4e2d\u5fc3\u7684\u89c4\u6a21\u652f\u6491\u5df2\u7ecf\u5b8c\u5168\u65e0\u538b\u529b\uff0c\u4f46\u540e\u7eed SOFARegistry \u4f1a\u652f\u6301\u591a\u673a\u623f\u6570\u636e\u540c\u6b65\u7684\u529f\u80fd\uff0c\u8fd9\u90e8\u5206\u529f\u80fd\u5728\u751f\u4ea7\u843d\u5730\u8fd8\u9700\u8981\u6211\u4eec\u7ee7\u7eed\u4f18\u5316 SOFARegistry \u7684\u6027\u80fd\u3002<\/p>\n<h2>5 \u76f8\u5173\u94fe\u63a5<\/h2>\n<p>[1]Session \u63a5\u6536\u5230\u5927\u91cf Publisher \uff0c\u6512\u6279\u53d1\u8bf7\u6c42\u5230 Data\uff1a<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=jV4U02p10z3Jmmkca4DnfA%3D%3D.1AZnICyA9BFs9561ersZ2yirkTzCCxybZCevcYKwyjY1te%2BAC6fr62jAghplsN7BLbv5um%2Fl4IYsEgdNJJktM3gzzxGXHLXNdqR67GxydTBpjRuiJ%2FsfI69RrRbfjwcTvZmumwQlSJNdNt3Wrkr%2ByIPAoGVYEo1Ug5QO3ge%2B9pU6M6sDcVfIPofI7cWc%2F78bQ4W5LoG2KWNk7Oc5ftG66%2B92lCtVA7ft0Cy2WdVrwdZDYlZ6z4jtMghvnu%2FVcqDwB7Hc2i3Mlm%2FyOm8nG%2FB6Dw%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/node\/service\/DataNodeServiceImpl.java#L108<\/a><\/em><\/p>\n<p>[2]Session \u63a5\u6536\u5230\u5927\u91cf Subscriber \uff0c\u805a\u5408\u53bb\u91cd\u540e\u521b\u5efa\u63a8\u9001\u4efb\u52a1:<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=v1zGU%2FfyfmyI6gXdBnU43g%3D%3D.FNPuziOkoB5Vy27RQ%2BCuW1QAkZTAhVK4EAbbCYN1xlKkSqLeAuzdHHMd85XRMek6Yl1Jv5%2FYEvDbLGlaOLUaC%2F3dyOE8NRubeDkSXFpwO9fvM4tWD%2FPlwxlDQayceoWzERsIM2UWyUNMETTVKHFlNahnfUO7VmDomxdprvINS5PjTTZNFi5yYDuoGIDgwT3Akz83jfMA5W6OOhkM%2FYt94qNpV5VWQQ6WSn%2BDyfI3emnyk1cl3Ss8Xr2cQcl5sHFA\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/push\/RegProcessor.java#L54<\/a><\/em><\/p>\n<p>[3]\u7528 Map \u5b58\u50a8 DataServer \u4e0a\u53d1\u751f\u53d8\u5316\u6570\u636e\u7684 DataInfoId \uff0c\u805a\u5408\u901a\u77e5 Session \u8fdb\u884c\u63a8\u9001<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=H5fr8NM%2BCAtH0VnKyjb9JA%3D%3D.4AaHtMHkwyCKM8pei6vROMJHYQECZDN26WJE292CBIlig9wxjdpQ8CvV3ABvcHhB5flFbsUeRK9zn4BXeOkGJAmEZ9zgGVonBNyHTPgVeq1MBsugJDqN72fi8GBzFCEfr5lzAkDxBALfxyuVqjOSVq8wCefqIxve43N0CeIM16Hneqj4JioYuvdgvXkzMflcmJ9vTxRDrAPbhy54UciE6nXkDyaL05wia14WkF51pH3cyXbKqFKmL%2BkfoBKb8E1%2FJyWDfhgmznD74%2FKUdc2dRA%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/data\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/data\/change\/DataChangeEventCenter.java#L112<\/a><\/em><\/p>\n<p>[4]\u7528 Map \u5b58\u50a8 PushTask \u8fdb\u884c\u53bb\u91cd\uff0c\u907f\u514d\u6570\u636e\u8fde\u7eed\u53d8\u5316\u89e6\u53d1\u5927\u91cf\u63a8\u9001\u4efb\u52a1<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=3ZN%2FwhmWlj2Pf%2FHysUEMhg%3D%3D.EsUQYJ1NJDIpFdBZtDKdJZtcx3ZOxfX7Ovu9HEaIs%2BP7clGKLfzy6VjzK6lGY6U0EO38rt6w1iDX9xKZBM9YT2pqAUznHWNtVPTDORulqvngCraitXOLDXAP7X9GuVRbaftqwyigdRjAc5msl0X4DZx6YqcNohpdAFf7IMtGLZrK3a9EV4s003xXfZqG7H8dw9mt16cjdNaNlMGP0g1X7WrKEudcu7NlmEmSnesE%2BDk4Cf%2B4VpGoGcuacMZJvR3ASgCIQztZQ9yqWp7bg3fcpQ%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/push\/PushTaskBuffer.java#L51<\/a><\/em><\/p>\n<p>[5]Session \u5229\u7528 LoadingCache \u4ece Data \u62c9\u53d6\u6570\u636e<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=LCCr9QsY7MzLs3EmndSoPg%3D%3D.Oz2VgjZCw%2FLzrUtyU5qexPh4oe19XaiqSHKEyQ6bgDc121f1EY3slUvEyl8O1gNK6kEgOALLso385gjXi9s%2B9AyKATrifM6G4CqkT%2FW%2Fytwfm4xM6G0mc8V5JPgycb9NHrKIjc%2BoqLr8hfXGBT1JNgN19xi9xnHGc13Fnd7IogVuDQiIsqtaKxAVCBtZNcZOz8qeLmIQUT3b0Jr9rctAwvDBtd9Eu56oE8PeuR1yyMPkfr0%2FA9rrTqxmHVvsVlFn\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/push\/FirePushService.java<\/a><\/em><\/p>\n<p>[6]Session \u5728\u521b\u5efa\u63a8\u9001\u5305\u7684\u65f6\u5019\u8fdb\u884c\u4e86\u538b\u7f29\u52a0\u7f13\u5b58<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=CsePs3tphxUtzNrm%2FcANOA%3D%3D.e6RU2c2%2FIhv6cJwcWuqyvKoE10KOH4B17xDLgECrIxlpfqmNyAAy%2BNQRmi3MuLVY%2BxQA0SZEDhof%2FMTtjcaDaL6y6eTbY7m9uMVRrq0rDtCxTH%2FMD65Yn3MGkC8KD15dE%2FRDQku811Tstax5FHSdBzu8D7tcHB5IBc%2BVzi7XjNHq6Enk8pN8dU1V1BOzlzMFDFTR1w8HiVK5GeJT5lBIsvm5OBZpmtMg0JvNOsppSmzTXIJT3Y6sVhlRuAE%2Bg225z5EYNYw8qGHxQTNPMeImyNOMEm2QCLji148SwIu0irI%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/converter\/pb\/ReceivedDataConvertor.java#L81<\/a><\/em><\/p>\n<p>[7]Data \u8fd4\u56de\u670d\u52a1\u6570\u636e\u7ed9 Session \u7684\u65f6\u5019\u8fdb\u884c\u4e86\u538b\u7f29\u52a0\u7f13\u5b58<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=R2%2FrQuf13exCPZkxiXHvkw%3D%3D.KsOZ9QWXL7gG9PvkHUUo4XeAPxrCxcP50C6Eu9zEFRlNVbek1z%2Bxu1b7HC30Om%2BaAbk%2Bx9qcIVDwRveozoaHuJfV2cmbO%2FLBWYdGgNkcqniJd1fc8Urhi9BBnuIY9tWcMczL7r%2FJcrCisBeXjhWg3p%2FYSgcMfFKfX%2BzISXsuiEX970OjrfN2quCCyPP0Epw%2FS1u3omKEcAkse%2Bh6Bt6gKct3%2Bkqz8iIH7u0pmpdXumyY9fdVEA1cFqFQ%2Fs4tztje\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/shared\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/shared\/util\/DatumUtils.java#L149<\/a><\/em><\/p>\n<p>[8]Data \u53d8\u66f4\u901a\u77e5 Session \u5931\u8d25\u4f1a\u52a0\u5165\u91cd\u8bd5\u961f\u5217\u6700\u591a\u91cd\u8bd53\u6b21<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=a4scRImz4bb4obwVzwXyAA%3D%3D.HtG8mTP8Cc1n3MLpE%2F6S%2BmDELpsb4MdCEFYAA99ZA%2Fbf7XYumNT2xJ84%2FVon8JbGZ3N6db2VsPkpKb5o5l2zLBlfwRWgnxnIloTC%2ByruI7OaaEJCFh5hy%2B96olScgWl%2Bw9xfjuW9cm10wxRvfyaVFnx%2F%2FL3jC4ZnKvbuYFHLVqzeE%2BGexaarKkk%2FJhwcrJodfqzDH%2BFsKhn0c7iZba%2BgYt3cKzbY%2FzcF0PU7oZgoyaXI%2FKIu16un%2F2lUIB47wr4YI%2BaA433ExyslsRClpFwP%2Fw%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/data\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/data\/change\/DataChangeEventCenter.java#L199<\/a><\/em><\/p>\n<p>[9]Session \u63a8\u9001\u7ed9 Client \u5931\u8d25\u65f6\u4f1a\u52a0\u5165\u961f\u5217\u6700\u591a\u91cd\u8bd53\u6b21<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=Y%2BIPpbKBSvj3Gi85MZR9Eg%3D%3D.gQVzYc3kLUm5zRicpX4lDlyA8c65AZbPGxbhhGA4NwyGXVEYtGwsq1J20W2%2FRSYmJjzSaXiUZ7LpEbwoJTi14ciiNmFxfXYhQLnLstCCxoOJwus%2Bmr4vNoL0m1Uj0yKc0ZD8cZMXMuxbkZp2GlLOg63GJn2fBDRO4aEgPJ%2BZqkD3VQp2SGdf14GfKnJnJ3Yk3elZLZsS6ewSwp1E%2FKa1%2FEDo71vzN8Li6thfUbzkvAyOS4%2FN7Uiz5cyaEQ%2FCtTjsDMB3ehdThJpfHgkq5%2BwN%2FA%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/push\/PushProcessor.java#L494<\/a><\/em><\/p>\n<p>[10]Data \u5b9a\u65f6 (\u9ed8\u8ba4 6s ) \u4e0e\u6240\u6709\u7684 Session \u5bf9\u6bd4\u5e76\u540c\u6b65 pub \u6570\u636e<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=vdpm%2FB8B%2BiveI8Sx%2BdwT1w%3D%3D.yTEyK1aR5MKO5Zp2SdCHSyTkxxh9rDLBMziSVYLzL%2B729hTQ2JpojIhSjZ2wNyAAr%2BBmDQbHUQPXrs4BkALBEWh%2FW9uVSyN1nDflDQnA6fTYX%2FA0UIeqG7zZRKKn4a9npQ11gkb7Ih0yuAJsEQaA3u45EC%2BEb4tBwqYQS3mTJoZ0XkI1p3xaG6SGlfhvs2YsUSq%2FdlPfUAk7Z8%2FUCkMWgUg27yo1ZA1AzdXd6x83wB6y0TEM04SxQqyetA76%2FUQK\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/data\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/data\/slot\/SlotManagerImpl.java#L374<\/a><\/em><\/p>\n<p>[11]Data slot follower \u5b9a\u65f6(\u9ed8\u8ba4 3min) \u4e0e Data slot leader \u5bf9\u6bd4\u5e76\u540c\u6b65 pub \u6570\u636e<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=QWYvrCsG2i%2BM59tJ521R6Q%3D%3D.5sAUHYmfdRIz26VWpJDRPKLv9GM3FiDuR1qUZfUtw%2Bp1wBNfug94mPlb9GODnt523PJujB3tnb2td%2FANC4fxKfooOO0dY0m0ez0DF0Q7Q5%2FJaE1EjtWuLbHxs6jnro9qbTBoO3tldzIrKvLMNkbNvq7arrSIc8vE1Z7QESzufkOBCayvx5J1t3wfob7DX8zOrjtWqzWGpL0aD67etZFG3FBNwXxi%2Fa7bn9%2B2y54sQK3gJLVcoAfQ32BsVVp1ho4S\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/data\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/data\/slot\/SlotManagerImpl.java#L376<\/a><\/em><\/p>\n<p>[12]Session \u5b9a\u65f6\uff08\u9ed8\u8ba4 5s \uff09\u4e0e Data \u5bf9\u6bd4\u63a8\u9001\u7248\u672c\u89e6\u53d1\u63a8\u9001\u4efb\u52a1<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=aoEgp%2FhtnZ3j%2Bym55OZnHw%3D%3D.yr7KaVH6m4ADbeFzolsTy59eXHkqJFcLWIWrjorWwcjHrmRmWLeoDnRNw1MbhWee7lGweIypAsG9HwJ2IniYvc1Ju7fS98TPWcohELieb5OZvnecETLACZBmOC4yxJ0cV2CDligUjWx953d9Uzmm5qilLaqmOtpVfcSz5LTGmX57WKuDQFIiT80eIcIEO2l5mvOuOECIQBFnZaqUsnH3dmytq1kvSA%2Fz8IwDSK5gAyoTfMvNRbI6P1HE4va5rfNAZ54Q0TONwqwPgd8oTjwXLg%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/server\/session\/src\/main\/java\/com\/alipay\/sofa\/registry\/server\/session\/registry\/SessionRegistry.java#L360<\/a><\/em><\/p>\n<p>[13]\u4ee3\u7801<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=Gf7q9TDjW0AXzBWkgoTJ0A%3D%3D.TiVsUawZFR3yfufRn6nfdUpBPaEZ4Szp4jiosb3g5crbHJfnLJA0DUxJznwAWbuFWeML%2FZGn2Bc8SFjfc11Aabusdlhkh9GN9jqaRMCAqX64g8yIzENxOdEUccZvKv09wPCgcrgcfgpCIE07Jcel7fsJZcuj9YPs9%2F2xLh3wsKF6zR%2FacA8k754RCe0I8CpVkxBJgdaEHh8fpk%2BUbKx%2BetSvIvfr%2B9TX2t8aPlBExj5JgnkumORnKiNR%2B6XIXxOs\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/common\/util\/src\/main\/java\/com\/alipay\/sofa\/registry\/task\/KeyedThreadPoolExecutor.java#L176<\/a><\/em><\/p>\n<p>[14]bug<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=p%2FgPL1%2Biz0XS6PISyIFqpA%3D%3D.9h1mXiNDPuAArG8%2FGnwWGK6mrB1bMMogQLt5qXaNeQWGgSmckFbMvP0oM3IHnWZr9i2EVY6QbTxP%2BaXPH8Dyaij0rqe9lAu9MmfFNK7uiVY%3D\" rel=\"nofollow\">https:\/\/jira.qos.ch\/projects\/LOGBACK\/issues\/LOGBACK-1358?filter=allopenissues<\/a><\/em><\/p>\n<p>[15]log4j2 async logger<br \/><em><a href=\"https:\/\/link.segmentfault.com\/?enc=YeDVXZTT6Z2yn2hrLwRvDA%3D%3D.4TpChXVzZwdHmHB8gTOgcStR8Cj9%2Bgv7m9Yjk%2FSgncPtk%2F%2BLig0Qpsu%2B3kdryeNFNFmNj3WU6Mt9dx1L8Ma%2BWokNajoedtn%2Bzuf6KlUhdYla9%2BEVuFrwTV%2B3k8vTrtlFa811cfsYY%2BavnI6Hj3Vd6r%2FjzPB9E6XkYySyO0FdPyVst0J8MghZy5HVfUhNclGN\" rel=\"nofollow\">https:\/\/github.com\/sofastack\/sofa-registry\/blob\/d9ca139595f6cc5b647f53297db7be8c14390c2b\/server\/distribution\/all\/bin\/base\/start_base.sh#L24<\/a><\/em><\/p>\n<p><strong>\u672c\u5468\u63a8\u8350\u9605\u8bfb<\/strong><\/p>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=xYEXHU7LVDO0HUNZ%2BSFcVA%3D%3D.PZZr3BEd8PFzkAVvaCrRuUNglzPcwjW830AVqAstUA%2BKg8atgm2zH6FEm6TkhE2BBWa%2BUb0jzugQ7E5wDLryIVJg61Ae4DAmggxKGsLlz7NaWNXKa7UqVinMkd%2BbGEFjuMYHffBBhzXesQ8nOJDM7eU4pOe5ln5sXld4yw%2B2lWmZ28PZFYDnpV%2FnM91UQjPb0VQ6U9J%2BLC90EwyWeEf8JvxNwg%2BRd94SRugO0EdKR%2Bcryj3P%2BERxO6Vqn6QmA5U9ACSORbRByWN8EGj3G5EPVVZPhdLmf4HDytypJGOY8U8%3D\" rel=\"nofollow\">SOFARegistry\u00a0\u6e90\u7801\uff5c\u6570\u636e\u5206\u7247\u4e4b\u6838\u5fc3-\u8def\u7531\u8868 SlotTable \u5256\u6790<\/a><\/p>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=F3IW%2FmBT%2FeW3Znf6fJtNzQ%3D%3D.x3iLxLCOazW5LtR1TMuG8uEMsBhd6iIccIvt69gui7EKzhLev3uXvWIrXevRXw8QOlOYV8jcqbrE%2BwuTpNF7RnZfBYA9KBidFWeRJScJQ3cMjvy%2BxVMaXbzMzLH6PR%2B45pZf9sVC7MErrb5Vae2Mg1HghkDHF%2BrlPe6vaNTXJiK4%2BRpXklKU3MD%2BAQWIvwR7zOjVbR6CJliEO8faX%2FbLzyvAsrAeYy9IjAh7l14Sn69m8RrhzrW9bMUR7O2k5iLHXl4TLvPVUKGzZNiWu9H0LPqVMO%2BR8rJpkHkC5JU5CUU%3D\" rel=\"nofollow\">\u63a2\u7d22 SOFARegistry\uff08\u4e00\uff09\uff5c\u57fa\u7840\u67b6\u6784\u7bc7<\/a><\/p>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=xteErzbIQi9WQNqzHU9h1Q%3D%3D.lQ%2BadRSod5dG5fxqFf1dVXRr7Pmwu%2B3U0nECwxFDxB%2FXznj%2BBRfZrPpma2RUMmZCMMB4sAr4dyX0oBFk8Qg%2F%2B9UXNPBSfDnabD%2FW0dwN%2F031LW4iGkTkiwra0Au5jbZCoL0yQe73TBn8%2B9WfoqW1FKS9e7Q7KHMaAHxdn81c3ya6TDK%2FgceDg3xmShP0zMmNwbSqHWAhM6RvPmKDm6GiGnH1PCW78hVXp%2FTZNApFaqf3g2Z8dN8gIcnaaXhYKCQ7W%2BlRt3%2FYr8TPoOCv2BYGfq9cOppFFE3OkGbu%2F8Ry8cM%3D\" rel=\"nofollow\">SOFARegistry \u6e90\u7801\uff5c\u6570\u636e\u540c\u6b65\u6a21\u5757\u89e3\u6790<\/a><\/p>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=DB%2BkpMK8MJcP%2BiSQ%2BPclzQ%3D%3D.9aqVIiI3T3Qn5uCXVJWsNcbxWXdn4XvawatlrLo7oOfV974Mv92lDAAjutxNeKKgy8HkXGy57cuCSs6Zatc0kzZApF9jUcOk4gDLI%2Ffp6hf4NQ6Qmex0XqnEXznOVMGK5ui2Ho9x7Edk8T%2FlF6Y3JgitU6yEum5n4YimdxKof8X5ME3rWDLMlciRr5jS3yr%2FvUDiK6JBBnSj2QlcAoTXHPc6MaGHkdcJjjCtagGjIrxO%2Fq0RPM2p0X2NpRn0v9ceqmJVNLlY%2BA2a%2BAsoPHC0PEPOK3983YMb7c8uOT7m9X0%3D\" rel=\"nofollow\">\u76f4\u64ad\u9884\u544a | SOFAChannel#30\u300aNydus \u5f00\u6e90\u5bb9\u5668\u955c\u50cf\u52a0\u901f\u670d\u52a1\u7684\u6f14\u8fdb\u4e0e\u672a\u6765\u300b<\/a><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042736139\">https:\/\/segmentfault.com\/a\/1190000042736139<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\uff5c\u674e\u65ed\u4e1c \u4e13\u6ce8\u4e8e SOFARegistry \u53ca\u5176\u5468\u8fb9\u57fa\u7840\u8bbe\u65bd\u7684\u5f00\u53d1\u4e0e\u4f18\u5316 \u672c\u6587 7016 \u5b57 \u9605\u8bfb\u00a015 \u5206 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10006787","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006787"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006787\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}