{"id":21530,"date":"2024-01-02T10:56:22","date_gmt":"2024-01-02T10:56:22","guid":{"rendered":"https:\/\/server.hk\/blog\/21530\/"},"modified":"2024-11-14T10:31:12","modified_gmt":"2024-11-14T02:31:12","slug":"mongodb-glossary-config-server","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21530\/","title":{"rendered":"MongoDB \u8a5e\u5f59\u8868 &#8211; \u914d\u7f6e\u4f3a\u670d\u5668"},"content":{"rendered":"<h1 id=\"mongodb-glossary-config-server-XquXSqCPtz\">MongoDB \u8a5e\u5f59\u8868 &#8211; \u914d\u7f6e\u4f3a\u670d\u5668<\/h1>\n<p>\u5728 MongoDB \u7684\u4e16\u754c\u4e2d\uff0c\u914d\u7f6e\u4f3a\u670d\u5668\u5728\u7ba1\u7406 MongoDB \u53e2\u96c6\u7684\u5143\u6578\u64da\u548c\u914d\u7f6e\u8a2d\u7f6e\u65b9\u9762\u8d77\u7740\u81f3\u95dc\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5b83\u4f5c\u70ba\u4e00\u500b\u4e2d\u592e\u5132\u5b58\u5eab\uff0c\u7528\u65bc\u5b58\u5132\u548c\u5206\u767c\u53e2\u96c6\u7684\u5143\u6578\u64da\uff0c\u5305\u62ec\u6709\u95dc\u53e2\u96c6\u5206\u7247\u914d\u7f6e\u3001\u6578\u64da\u584a\u5206\u4f48\u53ca\u5176\u4ed6\u91cd\u8981\u7d30\u7bc0\u7684\u8cc7\u8a0a\u3002<\/p>\n<h2 id=\"understanding-the-config-server-XquXSqCPtz\">\u7406\u89e3\u914d\u7f6e\u4f3a\u670d\u5668<\/h2>\n<p>\u914d\u7f6e\u4f3a\u670d\u5668\u662f MongoDB \u5206\u7247\u67b6\u69cb\u4e2d\u7684\u95dc\u9375\u7d44\u4ef6\u3002\u5206\u7247\u662f\u4e00\u7a2e\u6280\u8853\uff0c\u7528\u65bc\u5c07 MongoDB \u6578\u64da\u5eab\u6c34\u5e73\u64f4\u5c55\u5230\u591a\u53f0\u4f3a\u670d\u5668\u6216\u5206\u7247\u4e0a\u3002\u6bcf\u500b\u5206\u7247\u5305\u542b\u6578\u64da\u7684\u5b50\u96c6\uff0c\u800c\u914d\u7f6e\u4f3a\u670d\u5668\u8ca0\u8cac\u8a18\u9304\u54ea\u500b\u6578\u64da\u4f4d\u65bc\u54ea\u500b\u5206\u7247\u4e0a\u3002<\/p>\n<p>\u7576\u5ba2\u6236\u7aef\u5411 MongoDB \u53e2\u96c6\u767c\u9001\u67e5\u8a62\u6642\uff0c\u914d\u7f6e\u4f3a\u670d\u5668\u6703\u6839\u64da\u5206\u7247\u914d\u7f6e\u5e6b\u52a9\u78ba\u5b9a\u61c9\u8a72\u7531\u54ea\u500b\u5206\u7247\u8655\u7406\u8a72\u67e5\u8a62\u3002\u5b83\u5145\u7576\u8def\u7531\u6a5f\u5236\uff0c\u5c07\u67e5\u8a62\u5b9a\u5411\u5230\u5305\u542b\u76f8\u95dc\u6578\u64da\u7684\u9069\u7576\u5206\u7247\u3002<\/p>\n<h2 id=\"config-server-components-XquXSqCPtz\">\u914d\u7f6e\u4f3a\u670d\u5668\u7684\u7d44\u4ef6<\/h2>\n<p>\u914d\u7f6e\u4f3a\u670d\u5668\u7531\u4e09\u500b\u7d44\u4ef6\u69cb\u6210\uff1a<\/p>\n<ol>\n<li><strong>\u914d\u7f6e\u4f3a\u670d\u5668\u526f\u672c\u96c6\uff1a<\/strong>\u914d\u7f6e\u4f3a\u670d\u5668\u526f\u672c\u96c6\u662f\u4e00\u7d44 MongoDB \u7bc0\u9ede\uff0c\u96c6\u9ad4\u5b58\u5132\u53e2\u96c6\u7684\u5143\u6578\u64da\u3002\u5b83\u901a\u904e\u5c07\u5143\u6578\u64da\u8907\u88fd\u5230\u591a\u500b\u7bc0\u9ede\u4f86\u78ba\u4fdd\u9ad8\u53ef\u7528\u6027\u548c\u5bb9\u932f\u80fd\u529b\u3002\u6700\u5c0f\u63a8\u85a6\u914d\u7f6e\u662f\u4e00\u500b\u4e09\u500b\u6210\u54e1\u7684\u526f\u672c\u96c6\uff0c\u4f46\u66f4\u5927\u7684\u90e8\u7f72\u53ef\u80fd\u9700\u8981\u66f4\u591a\u7bc0\u9ede\u4ee5\u63d0\u9ad8\u6027\u80fd\u548c\u53ef\u9760\u6027\u3002<\/li>\n<li><strong>\u914d\u7f6e\u8cc7\u6599\u5eab\uff1a<\/strong>\u914d\u7f6e\u8cc7\u6599\u5eab\u662f\u4fdd\u5b58 MongoDB \u53e2\u96c6\u5143\u6578\u64da\u7684\u8cc7\u6599\u5eab\u3002\u5b83\u5305\u542b\u4e00\u4e9b\u96c6\u5408\uff0c\u5982 <code>config.chunks<\/code>\uff0c\u8a72\u96c6\u5408\u5b58\u5132\u6709\u95dc\u6578\u64da\u584a\u5728\u5206\u7247\u4e0a\u5206\u4f48\u7684\u8cc7\u8a0a\uff0c\u4ee5\u53ca <code>config.shards<\/code>\uff0c\u8a72\u96c6\u5408\u5b58\u5132\u6709\u95dc\u53e2\u96c6\u4e2d\u500b\u5225\u5206\u7247\u7684\u8a73\u60c5\u3002<\/li>\n<li><strong>\u914d\u7f6e\u4f3a\u670d\u5668\u67e5\u8a62\u8def\u7531\u5668\uff1a<\/strong>\u914d\u7f6e\u4f3a\u670d\u5668\u67e5\u8a62\u8def\u7531\u5668\u8ca0\u8cac\u6839\u64da\u5b58\u5132\u5728\u914d\u7f6e\u8cc7\u6599\u5eab\u4e2d\u7684\u5143\u6578\u64da\u5c07\u67e5\u8a62\u8def\u7531\u5230\u9069\u7576\u7684\u5206\u7247\u3002\u5b83\u5145\u7576\u5ba2\u6236\u7aef\u8207\u53e2\u96c6\u4e4b\u9593\u7684\u4e2d\u9593\u4eba\uff0c\u78ba\u4fdd\u67e5\u8a62\u88ab\u5b9a\u5411\u5230\u6b63\u78ba\u7684\u5206\u7247\u3002<\/li>\n<\/ol>\n<h2 id=\"config-server-deployment-XquXSqCPtz\">\u914d\u7f6e\u4f3a\u670d\u5668\u90e8\u7f72<\/h2>\n<p>\u5728\u90e8\u7f72 MongoDB \u53e2\u96c6\u6642\uff0c\u5fc5\u9808\u4ed4\u7d30\u898f\u5283\u548c\u914d\u7f6e\u914d\u7f6e\u4f3a\u670d\u5668\uff0c\u4ee5\u78ba\u4fdd\u6700\u4f73\u6027\u80fd\u548c\u53ef\u9760\u6027\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u95dc\u9375\u8003\u616e\u56e0\u7d20\uff1a<\/p>\n<ul>\n<li><strong>\u786c\u9ad4\u8981\u6c42\uff1a<\/strong>\u914d\u7f6e\u4f3a\u670d\u5668\u9700\u8981\u8db3\u5920\u7684\u8cc7\u6e90\u4f86\u6709\u6548\u8655\u7406\u5143\u6578\u64da\u548c\u8def\u7531\u64cd\u4f5c\u3002\u5efa\u8b70\u4f7f\u7528\u5177\u5099\u5145\u8db3 CPU\u3001\u5167\u5b58\u548c\u5b58\u5132\u5bb9\u91cf\u7684\u5c08\u7528\u786c\u9ad4\u6216\u865b\u64ec\u6a5f\u5668\u3002<\/li>\n<li><strong>\u7db2\u7d61\u914d\u7f6e\uff1a<\/strong>\u914d\u7f6e\u4f3a\u670d\u5668\u7bc0\u9ede\u61c9\u8207 MongoDB \u5206\u7247\u548c\u5ba2\u6236\u7aef\u4fdd\u6301\u4f4e\u5ef6\u9072\u7db2\u7d61\u9023\u63a5\u3002\u5efa\u8b70\u5c07\u5176\u90e8\u7f72\u5728\u9760\u8fd1\u7684\u4f4d\u7f6e\uff0c\u4ee5\u6e1b\u5c11\u7db2\u7d61\u5ef6\u9072\u3002<\/li>\n<li><strong>\u5b89\u5168\u6027\uff1a<\/strong>\u4fdd\u8b77\u914d\u7f6e\u4f3a\u670d\u5668\u514d\u53d7\u672a\u6388\u6b0a\u8a2a\u554f\u5c0d\u65bc\u4fdd\u969c\u53e2\u96c6\u7684\u5143\u6578\u64da\u81f3\u95dc\u91cd\u8981\u3002\u5f37\u70c8\u5efa\u8b70\u5be6\u65bd\u9069\u7576\u7684\u8eab\u4efd\u9a57\u8b49\u548c\u52a0\u5bc6\u6a5f\u5236\uff0c\u4f8b\u5982 MongoDB \u5167\u5efa\u7684\u8eab\u4efd\u9a57\u8b49\u548c SSL\/TLS\u3002<\/li>\n<\/ul>\n<h2 id=\"conclusion-XquXSqCPtz\">\u7d50\u8ad6<\/h2>\n<p>\u914d\u7f6e\u4f3a\u670d\u5668\u662f MongoDB \u5206\u7247\u67b6\u69cb\u4e2d\u7684\u91cd\u8981\u7d44\u4ef6\uff0c\u8ca0\u8cac\u7ba1\u7406\u53e2\u96c6\u7684\u5143\u6578\u64da\u4e26\u5c07\u67e5\u8a62\u8def\u7531\u5230\u9069\u7576\u7684\u5206\u7247\u3002\u7406\u89e3\u5176\u89d2\u8272\u4e26\u6b63\u78ba\u90e8\u7f72\u5c0d\u65bc\u69cb\u5efa\u53ef\u64f4\u5c55\u4e14\u9ad8\u6027\u80fd\u7684 MongoDB \u53e2\u96c6\u81f3\u95dc\u91cd\u8981\u3002<\/p>\n<p>\u5982\u9700\u6709\u95dc MongoDB \u4ee5\u53ca\u5176\u5982\u4f55\u70ba\u60a8\u7684\u696d\u52d9\u5e36\u4f86\u6548\u76ca\u7684\u66f4\u591a\u8cc7\u8a0a\uff0c\u53ef\u8003\u616e\u63a2\u7d22 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS \u4e3b\u6a5f\u670d\u52d9<\/a>\u3002\u901a\u904e\u4ed6\u5011\u53ef\u9760\u4e14\u9ad8\u6548\u7684 VPS \u89e3\u6c7a\u65b9\u6848\uff0c\u60a8\u53ef\u4ee5\u5145\u5206\u5229\u7528 MongoDB \u7684\u80fd\u529b\uff0c\u4e26\u69cb\u5efa\u5065\u58ef\u7684\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MongoDB \u8a5e\u5f59\u8868 &#038;#82&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-21530","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21530"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21530\/revisions"}],"predecessor-version":[{"id":23930,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21530\/revisions\/23930"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}