{"id":10020498,"date":"2024-12-15T23:16:05","date_gmt":"2024-12-15T15:16:05","guid":{"rendered":"https:\/\/itmax.cn\/?p=10020498"},"modified":"2024-12-15T23:16:05","modified_gmt":"2024-12-15T15:16:05","slug":"%e7%b3%bb%e7%bb%9f%e7%bb%84%e4%bb%b6%e4%bc%98%e5%8c%96%e7%9a%84%e6%80%9d%e8%80%83%e6%a1%86%e6%9e%b6","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10020498","title":{"rendered":"\u7cfb\u7edf\u7ec4\u4ef6\u4f18\u5316\u7684\u601d\u8003\u6846\u67b6"},"content":{"rendered":"<p>\u6211\u4e4b\u524d\u7684\u6587\u7ae0\u91cc\u6709\u5206\u4eab\u8fc7\u81ea\u5df1\u603b\u7ed3\u7684\u505a\u6280\u672f\u9009\u578b\u7684\u601d\u8003\u6846\u67b6\uff0c\u672c\u6587\u5c06\u4f1a\u5206\u4eab\u4e00\u4e0b\u6211\u603b\u7ed3\u7684\u505a\u7cfb\u7edf\u7ec4\u4ef6\u8c03\u4f18\/\u4f18\u5316\u7684\u601d\u8003\u6846\u67b6\u3002<\/p>\n<h2>\u7ec4\u4ef6\u4f18\u5316\u7684\u601d\u8003\u6846\u67b6<\/h2>\n<p>\u5e38\u89c1\u7684\u4e92\u8054\u7f51\u67b6\u6784\u57fa\u672c\u79bb\u4e0d\u5f00\u6570\u636e\u5e93\u3001\u7f13\u5b58\u3001\u6d88\u606f\u961f\u5217\u3001\u641c\u7d22\u3001\u6570\u636e\u5904\u7406\u7b49\u7b49\u5404\u79cd\u7ec4\u4ef6\uff0c\u867d\u7136\u7ec4\u4ef6\u7684\u5f62\u6001\u4e0d\u4e00\u3001\u529f\u80fd\u4e0d\u540c\uff0c\u4f46\u662f\u6211\u4ecd\u7136\u628a\u5bf9\u4ed6\u4eec\u7684\u4f18\u5316\u603b\u7ed3\u5f52\u7eb3\u4e3a\u4e86\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000045605593\" alt=\"\" title=\"\"><\/p>\n<p>\u8fd9\u51e0\u70b9\u5206\u522b\u4e3a\uff1a<\/p>\n<ul>\n<li><code>\u73af\u5883\u4e0e\u914d\u7f6e<\/code>\uff1a\u5bf9\u7ec4\u4ef6\u7684\u8fd0\u884c\u73af\u5883\u3001\u7ec4\u4ef6\u7684\u7cfb\u7edf\u914d\u7f6e\u505a\u4f18\u5316\u3002<\/li>\n<li><code>\u6570\u636e\u7ed3\u6784\/\u7ec4\u7ec7<\/code>\uff1a\u5bf9\u5728\u8be5\u7ec4\u4ef6\u4e2d\u5982\u4f55\u5b9a\u4e49\u6570\u636e\u7ed3\u6784\u6216\u7ec4\u7ec7\u6570\u636e\u7684\u65b9\u5411\u4e0a\u601d\u8003\u4f18\u5316\u3002<\/li>\n<li><code>\u4f7f\u7528\u4fa7<\/code>\uff1a\u4f5c\u4e3a\u8be5\u7ec4\u4ef6\u7684\u5ba2\u6237\u7aef\u4e00\u4fa7\uff0c\u4f7f\u7528\u7ec4\u4ef6\u65f6\u505a\u4f18\u5316\u3002<\/li>\n<li><code>\u4e0e\u5176\u5b83\u7ec4\u4ef6\u534f\u4f5c<\/code>\uff1a\u8be5\u7ec4\u4ef6\u4e4b\u5916\uff0c\u4e0e\u5176\u5b83\u7ec4\u4ef6\u66f4\u597d\u5730\u534f\u4f5c\u5b8c\u6210\u7cfb\u7edf\u6574\u4f53\u6027\u7684\u4f18\u5316\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e48\u8bf4\u4e5f\u8bb8\u6709\u4e9b\u62bd\u8c61\uff0c\u4ee5\u4e0b\u4ee5\u4e00\u4e9b\u5e38\u89c1\u7684\u7ec4\u4ef6\/\u4e2d\u95f4\u4ef6\u4e3a\u4f8b\uff0c\u770b\u770b\u5982\u4f55\u4f7f\u7528\u6574\u5957\u601d\u8003\u6846\u67b6\u3002<\/p>\n<h2>\u5e38\u89c1\u7ec4\u4ef6\u4f7f\u7528\u793a\u4f8b<\/h2>\n<h3>MySQL<\/h3>\n<p>MySQL \u901a\u8fc7\u4e0a\u8ff0\u6846\u67b6\u53ef\u4ee5\u4f38\u5c55\u51fa\u4ee5\u4e0b\u7684\u70b9\uff1a<\/p>\n<ul>\n<li>\n<p><code>\u73af\u5883\u4e0e\u914d\u7f6e<\/code>\uff1a<\/p>\n<ul>\n<li>\u9ad8\u6027\u80fd\u7684\u786c\u4ef6\uff0c\u5982 SSD \u548c\u66f4\u5927\u5185\u5b58\u3002<\/li>\n<li>\u8c03\u6574\u8fde\u63a5\u6570\u3001\u7ebf\u7a0b\u6570\u3001buffer\u3001cache \u7b49\u7b49\u914d\u7f6e\u3002<\/li>\n<li>\u4e3b\u4ece\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u6570\u636e\u7ed3\u6784\/\u7ec4\u7ec7<\/code>\uff1a<\/p>\n<ul>\n<li>\u8bbe\u8ba1\u5408\u7406\u7684\u6570\u636e\u8868\u7ed3\u6784\uff0c\u8303\u5f0f\u5316\u6216\u53cd\u8303\u5f0f\u3002<\/li>\n<li>\u9002\u5f53\u7684\u7d22\u5f15\uff08\u5982\u4e09\u661f\u7d22\u6027\u539f\u5219\uff09\u3002<\/li>\n<li>\u5206\u5e93\u5206\u8868\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u4f7f\u7528\u4fa7<\/code>\uff1a<\/p>\n<ul>\n<li>\u67e5\u8be2\u5c3d\u53ef\u80fd\u547d\u4e2d\u7d22\u5f15\u3001\u9002\u5f53\u7684 JOIN \u8054\u8868\u3001\u907f\u514d\u6df1\u5ea6\u5206\u9875\u3002<\/li>\n<li>\u4f7f\u7528\u8fde\u63a5\u6c60\u3002<\/li>\n<li>\u6279\u91cf\u64cd\u4f5c\u3001\u51cf\u5c11\u7f51\u7edc\u5f80\u8fd4\u8017\u65f6\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u4e0e\u5176\u5b83\u7ec4\u4ef6\u534f\u4f5c<\/code>\uff1a<\/p>\n<ul>\n<li>\u4e0e\u7f13\u5b58\u3001NoSQL \u7b49\u7ec4\u4ef6\u534f\u4f5c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Redis<\/h3>\n<p>Redis\uff1a<\/p>\n<ul>\n<li>\n<p><code>\u73af\u5883\u4e0e\u914d\u7f6e<\/code>\uff1a<\/p>\n<ul>\n<li>\u9ad8\u6027\u80fd\u7684\u786c\u4ef6\u3001\u7981\u7528 swap\u3002<\/li>\n<li>\u8c03\u6574\u6700\u5927\u5185\u5b58\u3001\u6dd8\u6c70\u7b56\u7565\u3001\u6301\u4e45\u5316\u3001\u591a\u7ebf\u7a0b\u7b49\u7b49\u914d\u7f6e\u3002<\/li>\n<li>\u96c6\u7fa4\u3001\u4e3b\u4ece\uff08\u54e8\u5175\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u6570\u636e\u7ed3\u6784\/\u7ec4\u7ec7<\/code>\uff1a<\/p>\n<ul>\n<li>\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u7ed3\u6784\u3002<\/li>\n<li>\u907f\u514d\u5927 key\u3002<\/li>\n<li>\u8ba9\u6570\u636e\u5206\u5e03\u5f97\u66f4\u5747\u8861\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u4f7f\u7528\u4fa7<\/code>\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u8fde\u63a5\u6c60\u3002<\/li>\n<li>\u6279\u91cf\u64cd\u4f5c\u3001\u51cf\u5c11\u7f51\u7edc\u5f80\u8fd4\u8017\u65f6\u3002<\/li>\n<li>\u907f\u514d\u5355\u4e2a\u6307\u4ee4\u963b\u585e\u3002<\/li>\n<\/ul>\n<\/li>\n<li><code>\u4e0e\u5176\u5b83\u7ec4\u4ef6\u534f\u4f5c<\/code>\u3002<\/li>\n<\/ul>\n<h3>Kafka<\/h3>\n<p>Kafka\uff1a<\/p>\n<ul>\n<li>\n<p><code>\u73af\u5883\u4e0e\u914d\u7f6e<\/code>\uff1a<\/p>\n<ul>\n<li>\u9ad8\u6027\u80fd\u7684\u786c\u4ef6\u3002<\/li>\n<li>\u8c03\u6574\u5206\u533a\u6570\u3001\u526f\u672c\u3001\u6301\u4e45\u5316\u7b56\u7565\u7b49\u7b49\u914d\u7f6e\u3002<\/li>\n<li>\u96c6\u7fa4\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u6570\u636e\u7ed3\u6784\/\u7ec4\u7ec7<\/code>\uff1a<\/p>\n<ul>\n<li>\u63a7\u5236\u6d88\u606f\u5927\u5c0f\u3002<\/li>\n<li>\u5408\u9002\u7684\u5206\u533a\u952e\u8bbe\u8ba1\u3002<\/li>\n<li>\u5408\u7406\u89c4\u5212 topic \u548c\u5206\u533a\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u4f7f\u7528\u4fa7<\/code>\uff1a<\/p>\n<ul>\n<li>\u5408\u9002\u7684 <code>acks<\/code>\u3002<\/li>\n<li>\u5408\u5e76\u5c0f\u6d88\u606f\uff0c\u51cf\u5c11\u8bf7\u6c42\u6b21\u6570\u3002<\/li>\n<li>\u9002\u5f53\u7684\u6d88\u8d39\u8005\u6570\u91cf\u3002<\/li>\n<\/ul>\n<\/li>\n<li><code>\u4e0e\u5176\u5b83\u7ec4\u4ef6\u534f\u4f5c<\/code>\u3002<\/li>\n<\/ul>\n<h3>Elasticsearch<\/h3>\n<p>Elasticsearch\uff1a<\/p>\n<ul>\n<li>\n<p><code>\u73af\u5883\u4e0e\u914d\u7f6e<\/code>\uff1a<\/p>\n<ul>\n<li>\u9ad8\u6027\u80fd\u7684\u786c\u4ef6\u3001\u7981\u7528 swap\u3002<\/li>\n<li>\u8c03\u6574 JVM\u3001\u5206\u533a\u6570\u3001\u526f\u672c\u6570\u3001\u5237\u65b0\u5468\u671f\u7b49\u7b49\u914d\u7f6e\u3002<\/li>\n<li>\u96c6\u7fa4\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u6570\u636e\u7ed3\u6784\/\u7ec4\u7ec7<\/code>\uff1a<\/p>\n<ul>\n<li>\u5408\u9002\u7684 mapping\uff0c\u907f\u514d mapping \u7206\u70b8\u3002<\/li>\n<li>\u5408\u9002\u7684\u6570\u636e\u7c7b\u578b\uff0c\u662f\u5426\u6784\u5efa\u7d22\u5f15\u3001\u4fdd\u7559\u6e90\u6570\u636e\u3002<\/li>\n<li>\u5408\u5e76 shard \u548c segment\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>\u4f7f\u7528\u4fa7<\/code>\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 Bulk API \u6279\u91cf\u64cd\u4f5c\u3002<\/li>\n<li>\u907f\u514d\u6df1\u5ea6\u5206\u9875\uff0c\u907f\u514d join \u64cd\u4f5c\u3002<\/li>\n<li>\u53ea\u8fd4\u56de\u9700\u8981\u7684\u5b57\u6bb5\u3002<\/li>\n<li>\u4f7f\u7528 preference \u8def\u7531\u5230\u540c\u6837\u7684\u8282\u70b9\u3002<\/li>\n<\/ul>\n<\/li>\n<li><code>\u4e0e\u5176\u5b83\u7ec4\u4ef6\u534f\u4f5c<\/code>\u3002<\/li>\n<\/ul>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u5efa\u7acb\u7ed3\u6784\u5316\u7684\u601d\u8003\u6846\u67b6\uff0c\u53ef\u4ee5\u907f\u514d\u6211\u4eec\u5728\u9762\u5bf9\u95ee\u9898\u65f6\u9677\u5165\u6df7\u4e71\u548c\u65e0\u5e8f\u3002\u672c\u6587\u4ec5\u4f9b\u53c2\u8003\uff0c\u66f4\u91cd\u8981\u7684\u662f\u81ea\u6211\u601d\u8003\u5e76\u6784\u5efa\u81ea\u5df1\u7684\u6846\u67b6\u548c\u7cfb\u7edf\u3002<\/p>\n<hr>\n<p>(\u6211\u662f\u51cc\u865a\uff0c\u5173\u6ce8\u6211\uff0c\u65e0\u5e7f\u544a\uff0c\u4e13\u6ce8\u6280\u672f\uff0c\u4e0d\u717d\u52a8\u60c5\u7eea\uff0c\u6b22\u8fce\u4e0e\u6211\u4ea4\u6d41)<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000045605591\">https:\/\/segmentfault.com\/a\/1190000045605591<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4e4b\u524d\u7684\u6587\u7ae0\u91cc\u6709\u5206\u4eab\u8fc7\u81ea\u5df1\u603b\u7ed3\u7684\u505a\u6280\u672f\u9009\u578b\u7684\u601d\u8003\u6846\u67b6\uff0c\u672c\u6587\u5c06\u4f1a\u5206\u4eab\u4e00\u4e0b\u6211\u603b\u7ed3\u7684\u505a\u7cfb\u7edf\u7ec4\u4ef6\u8c03\u4f18\/\u4f18\u5316\u7684\u601d\u8003\u6846\u67b6\u3002 [&hellip;]<\/p>\n","protected":false},"author":4,"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-10020498","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\/10020498","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10020498"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020498\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10020498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10020498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10020498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}