{"id":6191,"date":"2024-08-01T22:46:17","date_gmt":"2024-08-01T14:46:17","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=6191"},"modified":"2024-08-01T22:46:17","modified_gmt":"2024-08-01T14:46:17","slug":"%e5%9f%ba%e4%ba%8enetty%e5%bc%80%e5%8f%91%e8%bd%bb%e9%87%8f%e7%ba%a7rpc%e6%a1%86%e6%9e%b6%ef%bc%8cqps%e8%be%be%e5%88%b010w","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e5%9f%ba%e4%ba%8enetty%e5%bc%80%e5%8f%91%e8%bd%bb%e9%87%8f%e7%ba%a7rpc%e6%a1%86%e6%9e%b6%ef%bc%8cqps%e8%be%be%e5%88%b010w\/","title":{"rendered":"\u57fa\u4e8eNetty\u5f00\u53d1\u8f7b\u91cf\u7ea7RPC\u6846\u67b6\uff0cQPS\u8fbe\u523010w+"},"content":{"rendered":"<div class='wxsyncmain'>\n<p style=\"margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;letter-spacing: 0.544px;text-wrap: wrap;color: rgb(43, 43, 43);font-size: 16px;text-align: left;text-size-adjust: inherit;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;\" data-mpa-powered-by=\"yiban.io\"><span style=\"outline: 0px;color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;caret-color: rgb(136, 136, 136);visibility: visible;\">\u6765\u6e90\uff1ajuejin.cn\/post\/7327835887701327924<\/span><\/p>\n<p style=\"margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;letter-spacing: 0.544px;text-wrap: wrap;color: rgb(43, 43, 43);font-size: 16px;text-align: left;text-size-adjust: inherit;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"outline: 0px;color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;caret-color: rgb(136, 136, 136);visibility: visible;\">\u63a8\u8350\uff1ahttps<\/span><span style=\"outline: 0px;color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;caret-color: rgb(136, 136, 136);visibility: visible;\">:\/\/t.zsxq.com\/HUH8d<\/span><\/p>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"margin-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.03) 0%, rgba(255, 255, 255, 0) 11.49%), linear-gradient(360deg, rgba(50, 0, 0, 0.04) 0%, rgba(255, 255, 255, 0) 12.16%);background-origin: padding-box;background-position: 0% 0%;background-repeat: repeat, repeat;background-size: 20px 20px, 20px 20px;width: auto;font-family: Optima, PingFangSC-light, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;text-align: left;\">\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 20px;margin-bottom: 20px;padding: 10px 10px 10px 20px;border-top: 1px solid rgba(64, 184, 255, 0.4);border-bottom: 1px solid rgba(64, 184, 255, 0.4);border-right: 1px solid rgba(64, 184, 255, 0.4);border-left-width: 1px;border-left-color: rgba(64, 184, 255, 0.4);border-radius: 8px;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.1);width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;overflow: auto;\"><p><span style=\"display: block;color: rgba(64, 184, 250, 0.5);font-size: 28px;line-height: 1.5em;letter-spacing: 0em;font-weight: bold;\">\u275d<\/span><\/p>\n<p style=\"text-indent: 0em;padding-top: 8px;padding-bottom: 8px;color: rgb(59, 59, 59);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">\u7b14\u8005\u5728\u5f00\u53d1\u57fa\u4e8e\u5ba2\u6237\u7aef\/\u670d\u52a1\u7aef\u6a21\u5f0f\u901a\u4fe1\u7684\u63d2\u4ef6\u7684\u65f6\u5019\uff0c\u9700\u8981\u7528\u5230\u8f7b\u91cf\u7ea7\u6700\u5c0f\u5305\u4f9d\u8d56\u7684RPC\u6846\u67b6\uff0c\u800c\u5e02\u9762\u4e0a\u7684RPC\u6846\u67b6\u4efd\u91cf\u8fc7\u4e8e\u5e9e\u5927\uff0c\u6700\u7ec8\u6253\u5305\u4e0b\u6765\u90fd\u662f\u51e0\u5341\u5146\u751a\u81f3\u4e0a\u767e\u5146\uff0c\u800c\u8fd9\u91cc\u9762\u5927\u591a\u6570\u529f\u80fd\u6211\u90fd\u7528\u4e0d\u4e0a\uff0c\u4e8e\u662f\u601d\u6765\u60f3\u53bb\u6211\u51b3\u5b9a\u5199\u4e00\u6b3e\u5c5e\u4e8e\u81ea\u5df1\u7684\u8f7b\u91cf\u7ea7RPC\u6846\u67b6\uff0c\u7b80\u5355\u6613\u7528\u5feb\u901f\u63a5\u5165\u3002<\/p>\n<\/blockquote>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u5173\u4e8e\u6280\u672f\u9009\u578b<\/span><span style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset;\"><\/span><\/h2>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 30px 30px;width: auto;height: auto;align-items: unset;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;color: rgb(43, 43, 43);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset;text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u534f\u8bae\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u7f51\u7edc\u901a\u4fe1\u57fa\u4e8eTCP\/IP\u4e3a\u57fa\u7840\u81ea\u5b9a\u4e49\u5e94\u7528\u5c42\u534f\u8bae\uff0c\u5e38\u89c1\u7684\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316\u5de5\u5177\u6709java\u539f\u751f\u5e8f\u5217\u5316\uff0cjson,kryo,protobuf,fst,hessian\u7b49\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u5728\u4e0d\u8003\u8651\u8de8\u8bed\u8a00\u7684\u60c5\u51b5\u4e0b\uff0c\u4ece\u5e8f\u5217\u5316\u65f6\u957f\/\u5e8f\u5217\u5316\u5927\u5c0f\/\u6613\u7528\u6027\/\u6269\u5c55\u6027\u8fd9\u51e0\u65b9\u9762\u8003\u8651\uff0c\u7efc\u5408\u6027\u6bd4\u8f83\u5f3a\u7684\u662fkryo\uff0c\u4f46\u662fkryo\u53ea\u652f\u6301java\u7248\u672c\u4e0d\u80fd\u8de8\u8bed\u8a00(\u636e\u8bf4\u80fd\u8de8\u8bed\u8a00\u4f46\u662f\u975e\u5e38\u590d\u6742\uff0c\u76f8\u5f53\u4e8e\u4e0d\u80fd\u8de8\u8bed\u8a00\u4e86)\uff0cprotobuf\u662f\u6027\u80fd\u6700\u5f3a\u7684\u4e14\u652f\u6301\u8de8\u8bed\u8a00\uff0c\u4f46\u662f\u9700\u8981\u4e8b\u5148\u57fa\u4e8eproto\u751f\u6210\u4e00\u4e2a\u7c7b\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u6240\u6709\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u7684\u65f6\u5019\u53ea\u80fd\u7528proto\u5b9a\u4e49\u7684\u7c7b\u578b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u6700\u7ec8\u9009\u62e9kryo\u548cprotobuf\u4e24\u79cd\u5e8f\u5217\u5316\u5de5\u5177\uff0c\u4f7f\u7528\u7684\u65f6\u5019\u53ef\u9009\u5e8f\u5217\u5316\u7c7b\u578b\uff0c\u524d\u8005\u5e8f\u5217\u5316\u51e0\u4e4e\u4e0d\u53d7\u9650\u5236\uff0c\u540e\u8005\u652f\u6301\u8de8\u8bed\u8a00\uff0c\u4f46\u662f\u5fc5\u987b\u4e8b\u5148\u751f\u6210proto\u7c7b\u578b\u7684\u7c7b\u5e76\u4f7f\u7528\u5176\u4f5c\u4e3a\u5e8f\u5217\u5316\u5de5\u5177\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 30px 30px;width: auto;height: auto;align-items: unset;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;color: rgb(43, 43, 43);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset;text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u901a\u4fe1\u6846\u67b6\u4f7f\u7528<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u9ad8\u6027\u80fd\u5f02\u6b65\u975e\u963b\u585e\u6846\u67b6\u975eNetty\u4e0d\u53ef\u4e86\uff0c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u57fa\u4e8eNetty\u5f00\u53d1\u53ef\u4e8b\u534a\u529f\u500d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u4f46\u662fNetty\u6253\u5305\u5b8c\u90fd\u9700\u898120M\u5de6\u53f3\uff0c\u6240\u4ee5\u9664\u4e86client\u548cserver\u7aef\u5916\uff0c\u518d\u5f00\u53d1\u4e00\u4e2aclient-mini\u6a21\u5757\uff0c\u8fd9\u4e2a\u6a21\u5757\u662fclient\u7aef\u57fa\u4e8enio\u5f00\u53d1\u7684\uff0c\u6027\u80fd\u867d\u7136\u4e0d\u5982netty\u4f46\u662f\u6ca1\u6709\u4efb\u4f55\u4f9d\u8d56\uff0c\u6253\u5305\u4e0b\u6765\u4ec520kb\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 30px 30px;width: auto;height: auto;align-items: unset;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;color: rgb(43, 43, 43);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset;text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u670d\u52a1\u6ce8\u518c\u548c\u53d1\u73b0<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u6ce8\u518c\u4e2d\u5fc3\u9009\u62e9zookeeper\u4f5c\u4e3a\u670d\u52a1\u6ce8\u518c\u548c\u670d\u52a1\u53d1\u73b0\uff0c\u5f53\u7136\u5982\u679c\u53ea\u7528\u5355\u70b9\u6a21\u5f0f\u7684\u8bdd\u5176\u5b9e\u662f\u4e0d\u9700\u8981\u6ce8\u518c\u4e2d\u5fc3\u7684\uff0c\u6240\u4ee5zookeeper\u662f\u53ef\u9009\u7ec4\u4ef6\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u5f00\u53d1RPC\u6846\u67b6<\/span><span style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u597d\u4e86\uff0c\u6709\u4e86\u4e0a\u8ff0\u8fd9\u4e9b\u6280\u672f\u5c31\u53ef\u4ee5\u6b65\u5165RPC\u6846\u67b6\u7684\u5f00\u53d1\u4e86\uff0c\u6211\u8fd9\u91cc\u5206\u4e3a\u4e86\u4ee5\u4e0b\u6a21\u5757\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">base : \u57fa\u7840\u516c\u5171\u6a21\u5757<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">protocol : \u534f\u8bae\u5c42\uff0c\u5305\u542b\u5e94\u7528\u5c42\u901a\u4fe1\u534f\u8bae\uff0c\u4ee5\u53ca\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316\uff0c\u652f\u6301kryo\u548cprotobuf<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">registry : \u6ce8\u518c\u6a21\u5757\uff0c\u57fa\u4e8ezookeeper\u4f5c\u4e3a\u6ce8\u518c\u4e2d\u5fc3\uff0c\u5305\u542b\u6ce8\u518c\u670d\u52a1\u548c\u670d\u52a1\u53d1\u73b0<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">server : \u670d\u52a1\u7aef<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">client : \u5ba2\u6237\u7aef<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(89, 89, 89);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;\">client-mini : \u4e0d\u4f9d\u8d56\u4efb\u4f55\u5305\u7684\u5ba2\u6237\u7aef\uff0c\u57fa\u4e8eNIO<\/section>\n<\/li>\n<\/ul>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 30px 30px;width: auto;height: auto;align-items: unset;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;color: rgb(43, 43, 43);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset;text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u5e94\u7528\u5c42\u534f\u8bae<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u9996\u5148\u8bbe\u8ba1\u901a\u4fe1\u534f\u8bae\u5c42\uff0c\u4e00\u4e2arpc\u6846\u67b6\u901a\u4fe1\u7684\u6bcf\u4e00\u6b21\u8bf7\u6c42\u4e3b\u8981\u5305\u542b\u670d\u52a1\u540d(serviceName)\uff0c\u51fd\u6570\u540d(methodName)\uff0c\u53c2\u6570\u7c7b\u578b(paramTypes)\u548c\u53c2\u6570(params)\u7b49\u5b57\u6bb5\uff0c\u5f53\u7136\u518d\u52a0\u4e0a\u8bf7\u6c42\u552f\u4e00id: traceId<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;margin-top: 10px;margin-bottom: 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224028614.jpeg&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;\">ClientConfigconfig=<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>ClientConfig();config.setSerializer(SerializerStrategy.KRYO.name());ModulePool.getModule(ClientModule<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd;line-height: 26px;\">class<\/span>).<span style=\"color: #e6c07b;line-height: 26px;\">init<\/span>(<span style=\"color: #e6c07b;line-height: 26px;\">config<\/span>)<\/span>;StringZK_URL=<span style=\"color: #98c379;line-height: 26px;\">\"localhost:2181\"<\/span>;ShadowClientGroupshadowClientGroup=<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>ShadowClientGroup(ZK_URL);shadowClientGroup.init();IHellohelloService=shadowClientGroup.createRemoteProxy(IHello<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd;line-height: 26px;\">class<\/span>,\"<span style=\"color: #e6c07b;line-height: 26px;\">shadowrpc<\/span>:\/\/<span style=\"color: #e6c07b;line-height: 26px;\">DefaultGroup<\/span>\/<span style=\"color: #e6c07b;line-height: 26px;\">helloservice<\/span>\")<\/span>;List&lt;ShadowClient&gt;shadowClientList=shadowClientGroup.getShadowClients(<span style=\"color: #98c379;line-height: 26px;\">\"DefaultGroup\"<\/span>);System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u6240\u6709\u670d\u52a1\u5668:\"<\/span>+shadowClientList.stream().map(c-&gt;c.getRemoteIp()+<span style=\"color: #98c379;line-height: 26px;\">\":\"<\/span>+c.getRemotePort()).collect(Collectors.toList()));<span style=\"color: #c678dd;line-height: 26px;\">for<\/span>(<span style=\"color: #c678dd;line-height: 26px;\">int<\/span>i=<span style=\"color: #d19a66;line-height: 26px;\">0<\/span>;i&lt;shadowClientList.size()*<span style=\"color: #d19a66;line-height: 26px;\">5<\/span>;i++){Stringhello=helloService.hello(i+<span style=\"color: #98c379;line-height: 26px;\">\"\"<\/span>);System.out.println(hello);}<\/code><\/pre>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u6027\u80fd\u6d4b\u8bd5<\/span><span style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u76ee\u524dMac\u7b14\u8bb0\u672c16G 4\u6838\u6d4b\u8bd5\u7684rpc\u8c03\u7528hello\u903b\u8f91\uff0c\u5982\u679c\u4f7f\u7528kryo\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316\uff0c100w\u4e2a\u8bf7\u6c42\u8017\u65f627\u79d2\uff0c\u5e73\u5747QPS\u4e3a3.7w\uff0c\u5982\u679c\u4f7f\u7528protobuf\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316\u8017\u65f625\u79d2, \u5e73\u5747QPS\u4e3a4w\uff0c\u5982\u679c\u7528M1\u82af\u7247\u7684Mac\uff0c\u5e73\u5747QPS\u53ef\u4ee5\u8fbe\u52307W+\uff0c\u6700\u9ad8QPS\u53ef\u4ee5\u8fbe\u523010w+\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(64, 184, 250);margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none none solid;border-width: 1px 1px 4px;border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223842121.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 20px 20px;width: 20px;height: 20px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"font-size: 20px;color: rgb(64, 184, 250);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 25px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\">\u6e90\u7801<\/span><span style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(64, 184, 250, 0.5);align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 20px 0px 0px;box-shadow: none;display: flex;font-size: 22px;font-weight: bold;flex-direction: unset;float: right;height: 10px;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: -10px;overflow: unset;text-indent: 0em;text-shadow: none;transform: none;width: 200px;-webkit-box-reflect: unset;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(43, 43, 43);font-size: 14px;line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;\">\u7bc7\u5e45\u6709\u9650\uff0c\u4ecb\u7ecd\u7684\u65f6\u5019\u4e0d\u591f\u5b8c\u6574\uff0c\u6709\u4e9b\u9057\u6f0f\uff0c\u5982\u9700\u5b8c\u6210\u6e90\u7801\uff0c\u53ef\u52a0\u6211\u5fae\u4fe1\u514d\u8d39\u83b7\u53d6\u3002\u76ee\u524d\u4ec5\u4f9b\u5b66\u4e60\u4ea4\u6d41\u4f7f\u7528\u3002<\/p>\n<\/section>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"505879143\" data-ratio=\"0.6629213483146067\" data-s=\"300,640\"  data-type=\"png\" data-w=\"623\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224006956.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"505879143\" data-ratio=\"0.6629213483146067\" data-s=\"300,640\"  data-type=\"png\" data-w=\"623\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224006956.png\"  \/><\/noscript><\/p>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u4e1a\u4f59\u8349              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u6765\u6e90\uff1ajuejin.cn\/post\/7327835887701327924 \u63a8\u8350\uff1ahttps:\/\/t.zsxq.com\/HUH8d &#8230;<\/p>\n","protected":false},"author":1,"featured_media":6141,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-6191","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223850962-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224006956.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223850962-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223850962-1024x434.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224006956.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223850962-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223850962-1024x434.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223850962.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224006956.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801224006956.png","id":"image1"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":311,"next_post_id":5997,"next_post_title":"SpringBoot\u5b9e\u73b0\u5206\u5e03\u5f0f\u9a8c\u8bc1\u7801\u767b\u5f55\u65b9\u6848","previous_post_id":4795,"previous_post_title":"SpringBoot\u6253\u5305\u6210Docker\u955c\u50cf","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=6191"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6191\/revisions"}],"predecessor-version":[{"id":6255,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6191\/revisions\/6255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/6141"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=6191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=6191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=6191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}