{"id":6153,"date":"2019-01-04T17:28:15","date_gmt":"2019-01-04T08:28:15","guid":{"rendered":"https:\/\/chat-messenger.com\/?p=6153"},"modified":"2025-09-25T14:35:09","modified_gmt":"2025-09-25T05:35:09","slug":"load-balancing","status":"publish","type":"post","link":"https:\/\/chat-messenger.com\/zh\/\u624b\u518c\/camserver\/\u8d1f\u8f7d\u5e73\u8861","title":{"rendered":"CAMServer \u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861"},"content":{"rendered":"<p><style type=\"text\/css\"><!--\ntable, th, td {\n    border: none !important;\n}\n--><\/style><\/p>\n\n\n\n<h2>\u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861<\/h2>\n\n\n\n<p><code>CAMServer<\/code> \u6709\u4e86\u7ec8\u6781\u8ba1\u5212\uff0c<span class=\"swl-marker mark_blue\">\u5728\u5185\u90e8\u90e8\u7f72\u73af\u5883\u4e2d\u975e\u5e38\u7b80\u5355<\/span>Web \u548c\u89c6\u9891\u670d\u52a1\u5668\u53ef\u4ee5\u5b9e\u73b0\u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861\u3002\u8fd9\u6837\uff0c\u5373\u4f7f\u4e00\u53f0\u670d\u52a1\u5668\u53d1\u751f\u6545\u969c\uff0c\u670d\u52a1\u4ecd\u53ef\u7ee7\u7eed\uff0c\u5e76\u4e14\u5373\u4f7f\u7531\u5927\u91cf\u7528\u6237\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u5206\u5e03\u5904\u7406\u5e76\u63d0\u4f9b\u670d\u52a1\uff0c\u800c\u4e0d\u4f1a\u964d\u4f4e\u6027\u80fd\u3002<\/p>\n\n\n\n<p>\u6b64\u5916\uff0c\u5206\u5e03\u5f0f\u914d\u7f6e <code>CAMServer<\/code> \u4f46\u5b9e\u65f6\u901a\u4fe1\u662f\u53ef\u80fd\u7684\u3002\u4f8b\u5982<code>CAMServer1<\/code> \u5ba2\u6237\u5df2\u8fde\u63a5\u5230<code>CAMServer2<\/code> \u4e0e\u53e6\u4e00\u4e2a\u8fde\u63a5\u5230\u7f51\u7edc\u7684\u5ba2\u6237\u7aef\u8fdb\u884c\u804a\u5929\u548c\u7f51\u7edc\u4f1a\u8bae<\/p>\n\n\n\n<p class=\"is-style-big_icon_point\">- \u7f51\u7edc\u4f1a\u8bae\u8d1f\u8f7d\u5e73\u8861\u57fa\u4e8e\u6d3b\u52a8\u4f1a\u8bae\u7684\u6570\u91cf\u548c\u53c2\u4e0e\u7528\u6237\u7684\u6570\u91cf\u3002<br>\u30fb\u540c\u65f6\u8fdb\u884c\u7684\u7f51\u7edc\u4f1a\u8bae\u6570\u91cf\u4ec5\u4e3a<code>CAMServer<\/code>\u8fd9\u4e0d\u80fd\u901a\u8fc7\u7b80\u5355\u5730\u6dfb\u52a0\u66f4\u591a\u8282\u70b9\u6765\u5b9e\u73b0\u3002\u8fd8\u9700\u8981\u8003\u8651\u7f51\u7edc\u914d\u7f6e\uff0c\u4ee5\u4fbf\u6240\u6709\u4f1a\u8bae\u4e0d\u4f1a\u901a\u8fc7\u540c\u4e00\u4e2a VPN \u6216\u4e2d\u592e\u8def\u7531\u5668\u8fdb\u884c\u4e2d\u7ee7\u3002<\/p>\n\n\n\n<h2>\u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861\u914d\u7f6e<\/h2>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u6839\u636e\u60a8\u516c\u53f8\u7684\u8981\u6c42\u7ea7\u522b\u548c\u6210\u672c\u914d\u7f6e\u6700\u4f73\u73af\u5883\u3002<\/p>\n\n\n\n<h3>\u5c0f\u578b\u542f\u52a8\u914d\u7f6e<\/h3>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full\"><img width=\"1761\" height=\"1049\" src=\"https:\/\/chat-messenger.com\/wp-content\/uploads\/2024\/05\/image-7.png\" alt=\"\" class=\"wp-image-10911\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<ul><li><strong>\u8d2e\u5b58\uff1a<\/strong>\u5c06 DB\/File \u653e\u7f6e\u5728 CAMServer1 \u7aef\uff0c\u5e76\u4ece CAMServer2 \u5f15\u7528\u5b83\u3002\u5373\u4f7f\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u7528\u6237\u90fd\u53ef\u4ee5\u5b9e\u65f6\u5171\u4eab\u6570\u636e\u3002<\/li><li><strong>\u5907\u4efd<\/strong>\uff1a\u6bcf\u5929\u9700\u8981\u5c06DB\/File\u6570\u636e\u5907\u4efd\u5230CAMServer2\u4e0a\u3002<\/li><li><strong>\u8d1f\u8377\u5206\u914d<\/strong>\uff1a\u53ef\u4ee5\u901a\u8fc7\u6309\u90e8\u95e8\u5212\u5206\u8bbf\u95ee\u7684CAMServer\uff08\u6216\u5c06\u5176\u8bbe\u4e3a\u5907\u7528\u7cfb\u7edf\uff09\u6765\u5b9e\u73b0\u8d1f\u8f7d\u5e73\u8861\u3002Web\u4f1a\u8bae\u59cb\u7ec8\u53ef\u4ee5\u5b9e\u73b0\u8d1f\u8f7d\u5e73\u8861\u3002<\/li><li><strong>\u53ef\u7528\u6027<\/strong>\uff1a1\u53f7\u673a\u53d1\u751f\u6545\u969c\u65f6\u7684DB\u8fde\u63a5\u8bbe\u7f6e <code>cam.serverDatePath.<\/code> \u5982\u679c\u53d1\u751f\u78c1\u76d8\u6545\u969c\uff0c<span style=\"color: var(--color_text); font-family: var(--swl-font_family); font-size: var(--swl-fz--content,16px); font-weight: var(--swl-font_weight); letter-spacing: var(--swl-letter_spacing,normal); background-color: var(--color_content_bg);\">\u5907\u4efd<\/span>\u5df2\u5b8c\u6210<span style=\"color: var(--color_text); font-family: var(--swl-font_family); font-size: var(--swl-fz--content,16px); font-weight: var(--swl-font_weight); letter-spacing: var(--swl-letter_spacing,normal); background-color: var(--color_content_bg);\">\u4fdd\u8bc1\u63d0\u4f9b\u622a\u81f3\u524d\u4e00\u5929\u7684\u6570\u636e\u3002<\/span><\/li><li><strong>\u6210\u672c<\/strong>: \u6700\u4fbf\u5b9c\u7684\u914d\u7f6e\u3002\u60a8\u53ef\u4ee5\u4ece\u5355\u4e2a\u8bbe\u5907\u914d\u7f6e\u5f00\u59cb\uff0c\u7136\u540e\u6839\u636e\u8d1f\u8f7d\u8fdb\u884c\u6269\u5c55\u3002<\/li><\/ul>\n<\/div>\n<\/div>\n\n\n\n<h3>\u5916\u90e8\u5b58\u50a8 (NAS) \u914d\u7f6e<\/h3>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full\"><img width=\"2151\" height=\"1046\" src=\"https:\/\/chat-messenger.com\/wp-content\/uploads\/2024\/05\/image-8.png\" alt=\"\" class=\"wp-image-10912\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<ul><li><strong>\u5b58\u50a8<\/strong>\uff1a\u5c06\u6570\u636e\u5e93\/\u6587\u4ef6\u653e\u7f6e\u5728\u5177\u6709 RAID \u914d\u7f6e\u7684\u9ad8\u8010\u7528\u6027\u5916\u90e8\u5b58\u50a8 NAS \u4e0a\uff0c\u5e76\u540c\u65f6\u5f15\u7528 CAMServer1 \u548c CAMServer2\u3002\u6216\u8005\u6307\u5b9a\u865a\u62df\u5316\u5e73\u53f0\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u7684\u865a\u62df NAS\u3002<\/li><li><strong>\u5907\u4efd<\/strong>\uff1a\u5373\u4f7f\u4f7f\u7528 RAID \u914d\u7f6e\uff0c\u4e5f\u9700\u8981\u6bcf\u5929\u5907\u4efd DB\/\u6587\u4ef6\u6570\u636e\uff0c\u4ee5\u5e94\u5bf9\u7535\u6e90\/\u5916\u58f3\u6545\u969c\u548c\u4eba\u4e3a\u6545\u969c\u3002<\/li><li><strong>\u8d1f\u8377\u5206\u914d<\/strong>\uff1a\u4e0e\u5c0f\u542f\u52a8\u914d\u7f6e\u76f8\u540c\u3002<\/li><li><strong>\u53ef\u7528\u6027<\/strong>\uff1a\u5f53\u53d1\u751f\u6545\u969c\u65f6\uff0c<a href=\"https:\/\/chat-messenger.com\/zh\/\u624b\u518c\/install_verup\/\u6444\u50cf\u5934\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\/\">\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7248\u672c<\/a> \u5982\u679c\u4f60\u4f7f\u7528 <code>cam.clusterHosts.<\/code>\u5b83\u53ef\u4ee5\u68c0\u6d4b\u5e76\u81ea\u52a8\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\u3002<\/li><li><strong>\u6210\u672c<\/strong>\uff1a\u76f8\u5bf9\u4fbf\u5b9c\u7684\u914d\u7f6e\u3002<\/li><\/ul>\n<\/div>\n<\/div>\n\n\n\n<h3>\u5197\u4f59\u5916\u90e8\u5b58\u50a8\u914d\u7f6e<\/h3>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full\"><img width=\"2661\" height=\"1074\" src=\"https:\/\/chat-messenger.com\/wp-content\/uploads\/2024\/05\/image-9.png\" alt=\"\" class=\"wp-image-10913\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<ol><li><strong>\u5b58\u50a8<\/strong>\uff1a\u4f7f\u7528\u5197\u4f59\u6587\u4ef6\u5171\u4eab\u670d\u52a1\u5668\uff08Windows Server \u6545\u969c\u8f6c\u79fb\u7fa4\u96c6 + SAN\u3001AWS S3 + rclone \u7b49\uff09\u7684\u914d\u7f6e\uff0c\u5f3a\u8c03\u9488\u5bf9\u78c1\u76d8\u6545\u969c\u7684\u9ad8\u53ef\u7528\u6027\u3002<\/li><li><strong>\u5907\u4efd<\/strong>\uff1a\u6570\u636e\u4f1a\u81ea\u52a8\u590d\u5236\uff0c\u56e0\u6b64\u6839\u636e\u7b56\u7565\u4e0d\u9700\u8981\u5907\u4efd\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u8003\u8651\u4eba\u4e3a\u6545\u969c\uff08\u4f8b\u5982\u624b\u52a8\u64e6\u9664\u78c1\u76d8\uff09\uff0c\u60a8\u4ecd\u7136\u9700\u8981\u5907\u4efd\u3002<\/li><li><strong style=\"background-color: var(--color_content_bg); color: var(--color_text); font-family: var(--swl-font_family); font-size: var(--swl-fz--content,16px); letter-spacing: var(--swl-letter_spacing,normal);\">\u8d1f\u8377\u5206\u914d<\/strong><span style=\"background-color: var(--color_content_bg); color: var(--color_text); font-family: var(--swl-font_family); font-size: var(--swl-fz--content,16px); font-weight: var(--swl-font_weight); letter-spacing: var(--swl-letter_spacing,normal);\">\uff1a\u4e0e\u5c0f\u542f\u52a8\u914d\u7f6e\u76f8\u540c\u3002<\/span><\/li><li><strong>\u53ef\u7528\u6027<\/strong>\uff1aweb\u670d\u52a1\u5668\u4e0e\u5c0f\u542f\u52a8\u914d\u7f6e\u76f8\u540c\u3002\u5373\u4f7f\u7531\u4e8e\u78c1\u76d8\u6216\u5916\u58f3\u6545\u969c\u800c\u53d1\u751f\u6545\u969c\uff0c\u4e5f\u53ef\u4ee5\u8fdb\u884c\u81ea\u52a8\u5207\u6362\u3002<\/li><li><strong>\u6210\u672c<\/strong>: \u5f15\u8fdb\u6210\u672c\u9ad8\u3002 AWS S3 \u53ef\u4ee5\u4ee5\u4f4e\u6210\u672c\u6784\u5efa\uff0c\u4f46\u5982\u679c\u60a8\u7684\u91cd\u70b9\u662f\u672c\u5730\uff0c\u90a3\u4e48\u5b83\u4e0d\u662f\u4e00\u4e2a\u9009\u62e9\u3002<\/li><\/ol>\n<\/div>\n<\/div>\n\n\n\n<h3>\u8d1f\u8f7d\u5e73\u8861\u5668\u914d\u7f6e<\/h3>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full\"><img width=\"2110\" height=\"1078\" src=\"https:\/\/chat-messenger.com\/wp-content\/uploads\/2024\/05\/image-10.png\" alt=\"\" class=\"wp-image-10929\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<ul id=\"block-69008db6-8cd8-4d4e-b11d-b153c56e5de4\"><li><strong>\u5b58\u50a8<\/strong>\uff1a\u5c0f\u578b\u542f\u52a8\u914d\u7f6e\/NAS\/SAN\u53ef\u9009\u3002<\/li><li><strong>\u5907\u4efd<\/strong>\uff1a\u4e0e\u5c0f\u578b\u542f\u52a8\u914d\u7f6e\/NAS\/SAN \u76f8\u540c\u3002<\/li><li><strong style=\"background-color: var(--color_content_bg); color: var(--color_text); font-family: var(--swl-font_family); font-size: var(--swl-fz--content,16px); letter-spacing: var(--swl-letter_spacing,normal);\"><strong>\u8d1f\u8377\u5206\u914d<\/strong><\/strong><span style=\"background-color: var(--color_content_bg); color: var(--color_text); font-family: var(--swl-font_family); font-size: var(--swl-fz--content,16px); font-weight: var(--swl-font_weight); letter-spacing: var(--swl-letter_spacing,normal);\">\uff1a\u901a\u8fc7\u5c06\u8d1f\u8f7d\u5747\u8861\u5668\u653e\u7f6e\u5728CAMServer\u4e4b\u524d\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5197\u4f59\u548c\u8d1f\u8f7d\u5206\u914d\u3002<\/span>\u9644\u6ce8\uff08\u8865\u5145\u4fe1\u606f\uff09 \u6587\u53f7 <a href=\"#lb-requirements\">\u8d1f\u8f7d\u5747\u8861\u5668\u914d\u7f6e\u8981\u6c42\u8be6\u7ec6\u4fe1\u606f<\/a>\u8fd8\u8bf7\u68c0\u67e5\u3002<\/li><li><strong>\u53ef\u7528\u6027<\/strong>\uff1a\u4e0e\u5197\u4f59\u5916\u90e8\u5b58\u50a8\u914d\u7f6e\u7ed3\u5408\u4f7f\u7528\u65f6\uff0c\u6240\u6709\u5c42\u90fd\u53ef\u4ee5\u8fdb\u884c\u81ea\u52a8\u6545\u969c\u8f6c\u79fb\u3002<\/li><li><strong>\u6210\u672c<\/strong>: \u5f15\u8fdb\u6210\u672c\u9ad8\u3002<\/li><\/ul>\n<\/div>\n<\/div>\n\n\n\n<h2 id=\"load-balancing-settings\">\u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861\u8bbe\u7f6e<\/h2>\n\n\n\n<h3>\u914d\u7f6e\u6982\u8ff0<\/h3>\n\n\n\n<p>\u4e3a\u4f7f CAMServer \u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861\uff0c\u8bf7\u5728\u6bcf\u4e2a\u5206\u5e03\u5f0f\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e00\u4e2a CAMServer\u3001<code>CAM\u670d\u52a1\u5668\/boot.ini<\/code> \u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6761\u76ee\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\" data-no-translation=\"\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cam.clusterHosts=camserver1;camserver2\ncam.clusterHostsDesc=camserver1 \u304c\u30e1\u30a4\u30f3\u30b5\u30fc\u30d0\u3001camserver2 \u306f\u5f85\u6a5f\u7cfb\u30b5\u30fc\u30d0\u3067\u3059\u3002\ncam.serverDatePath=\\\\disk\\CAMServer\\data\ncam.disableLANNetwork=true\n\n# \u30d3\u30c7\u30aa\u30b5\u30fc\u30d0\u306e\u5206\u6563\u8a2d\u5b9a\u3002\u300c\u30b5\u30fc\u30d0=\u30ce\u30fc\u30c9\u5206\u6563\u53c2\u52a0\u6570\u76ee\u5b89\u5024\u300d\u3067\u5b9a\u7fa9\u3002\ncam.videoDomains=camserver1=50;camserver2=50;camserver3=50<\/code><\/pre><\/div>\n\n\n\n<h3 id=\"clusterHosts\">cam.clusterHosts.<\/h3>\n\n\n\n<p><code>cam.clusterHosts.<\/code> \u662f\u6bcf\u4e2a\u5206\u5e03\u5f0f\u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d (FQDN)\u3002 <code>;<\/code> \u5217\u8868\u4ee5 \u5206\u9694\u3002<\/p>\n\n\n\n<h4>\u5728\u7aef\u53e3 443 \u4e0a\u542f\u52a8 CAMServer \u65f6<\/h4>\n\n\n\n<div class=\"hcb_wrap\" data-no-translation=\"\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cam.clusterHosts=camserver1;camserver2 <\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\"><div class=\"wp-block-image is-style-border\">\n<figure class=\"alignleft is-resized\"><img src=\"\/images\/camserver_load-balancing_failover.png\" alt=\"\" width=\"357\" height=\"197\"\/><\/figure><\/div><\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p>\u5982\u679c\u60a8\u4e3a\u6bcf\u4e2a\u90e8\u95e8\u5355\u72ec\u8bbe\u7f6e CAMServer\uff0c\u8bf7\u5728\u6bcf\u4e2a CAMServer \u7684 ini \u6587\u4ef6\u7684\u5f00\u5934\u5199\u5165\u672c\u5730\u4e3b\u673a\u540d (FQDN)\u3002\u9009\u62e9\u521d\u59cb\u8fde\u63a5\u670d\u52a1\u5668\u548c\u542f\u52a8\u65f6\u7684\u89c6\u9891\u670d\u52a1\u5668\u65f6\uff0c\u679a\u4e3e\u987a\u5e8f\u4f1a\u53d7\u5230\u5f71\u54cd\u3002\u6b64\u5916\uff0c<a href=\"https:\/\/chat-messenger.com\/zh\/\u624b\u518c\/install_verup\/\u6444\u50cf\u5934\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\/\">\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7248\u672c<\/a> \u901a\u8fc7\u4f7f\u7528\u5b83\uff0c\u53ef\u4ee5\u5728\u53d1\u751f\u6545\u969c\u65f6\u81ea\u52a8\u5207\u6362\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n<p>*\u5982\u679c\u6ca1\u6709\u914d\u7f6eSSO\u6216\u65e0\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5207\u6362\u65f6\u9700\u8981\u91cd\u65b0\u767b\u5f55\u3002<\/p>\n<\/div>\n<\/div>\n\n\n\n<h4>\u5728\u7aef\u53e3 8080 \u4e0a\u542f\u52a8 CAMServer \u65f6<\/h4>\n\n\n\n<div class=\"hcb_wrap\" data-no-translation=\"\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cam.clusterHosts=camserver1:8080;camserver2:8080 <\/code><\/pre><\/div>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u5728 CAMServer \u524d\u9762\u653e\u7f6e\u4e00\u4e2a L7 \u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u5e76\u5c06 CAMServer \u8f6c\u53d1\u5230\u7aef\u53e3 8080\u3002\u6b64\u60c5\u51b5\u4e0b\u7684\u8bbe\u7f6e\u4e0e\u4e0a\u6587\u76f8\u540c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0ccamapp \u4e0d\u4f1a\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\uff0c\u56e0\u4e3a\u8d1f\u8f7d\u5747\u8861\u5668\u4f1a\u8d1f\u8d23\u6545\u969c\u8f6c\u79fb\u3002\u8fd9\u662f <code>cam.serverURLDomain<\/code>,,<code>cam.clusterHosts.<\/code> \u6bd4\u8f83\u57df\u5e76\u68c0\u6d4b\u548c\u63a7\u5236\u8d1f\u8f7d\u5747\u8861\u5668\u7684\u5b58\u5728\u6216\u4e0d\u5b58\u5728\u3002<\/p>\n\n\n\n<h3>cam.clusterHostsDesc.<\/h3>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\"><div class=\"wp-block-image is-style-border\">\n<figure class=\"alignleft is-resized\"><img src=\"\/images\/camserver_load-balancing_clusterHostsDesc.png\" alt=\"\" width=\"370\" height=\"174\"\/><\/figure><\/div><\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p><code>cam.clusterHostsDesc.<\/code> \u53ef\u4ee5\u66f4\u6539\u5206\u5e03\u5f0f\u670d\u52a1\u5668\u63cf\u8ff0\u5b57\u6bb5\u4e2d\u7684\u6ce8\u91ca\u3002<\/p>\n<\/div>\n<\/div>\n\n\n\n<h3>cam.serverDatePath.<\/h3>\n\n\n\n<p><code>cam.serverDatePath.<\/code> \u6307\u5b9a\u7528\u4e8e\u4fdd\u5b58\u4e0a\u4f20\u9644\u4ef6\u7684\u6570\u636e\u5e93\u3002\u6307\u5b9a\u53ef\u4ee5\u4ece\u5206\u5e03\u5f0f\u670d\u52a1\u5668\u8bbf\u95ee\u7684\u5171\u4eab\u78c1\u76d8\u3002<\/p>\n\n\n\n<p class=\"is-style-big_icon_memo\">* \u6307\u5b9a\u5171\u4eab\u78c1\u76d8\u5e76\u8fd0\u884c\u670d\u52a1\u65f6 <a rel=\"noreferrer noopener\" href=\"https:\/\/chat-messenger.com\/zh\/\u624b\u518c\/camserver\/launch_camserver_as_windows_service\/#svc_osuser\/\" target=\"_blank\">\u8fd0\u884c Windows \u670d\u52a1\u7684\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237<\/a>\u5fc5\u987b\u6307\u5b9a<br>\u5982\u679c\u6ca1\u6709\u5171\u4eab\u78c1\u76d8\uff0c\u5b50 CAMServer \u53ef\u7528\u4f5c\u4e3b CAMServer \u7684 <code>CAMServer\/config<\/code> \u8fd8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u6587\u4ef6\u5939\u5171\u4eab\u5b58\u50a8\u7a7a\u95f4\u3002<\/p>\n\n\n\n<h3 id=\"videoDomains\">cam.videoDomains<\/h3>\n\n\n\n<p>\u89c6\u9891\u670d\u52a1\u5668\u5206\u914d\u8bbe\u7f6e\u3002\u5982\u679c\u6309\u5982\u4e0b\u65b9\u5f0f\u5b9a\u4e49\uff0c\u5219\u5f53\u6309\u679a\u4e3e\u987a\u5e8f\u6392\u5217\u7684\u623f\u95f4\u4e2d\u7684\u53c2\u52a0\u8005\u603b\u6570\u8d85\u8fc750\u4eba\u65f6\uff0c\u5c06\u5728\u4e0b\u4e00\u4e2a\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4f1a\u8bae\u5ba4\u3002<\/p>\n\n\n\n<p><code>cam.videoDomains=camserver1=50;camserver2=50;camserver3=50<\/code><br><\/p>\n\n\n\n<p class=\"is-style-icon_info\">\u30fb\u5982\u679c\u8bbe\u7f6e\u4e86 cam.clusterHosts\uff0c\u5219\u53ef\u4ee5\u7701\u7565<br>- \u6b64\u503c\u5e76\u4e0d\u8868\u793a\u6700\u5927\u8fde\u63a5\u6570\uff0c\u800c\u4ec5\u4ec5\u662f\u8d1f\u8f7d\u5e73\u8861\u7684\u6307\u5bfc\u3002<\/p>\n\n\n\n<h4>cam.disableLANNetwork<\/h4>\n\n\n\n<p>\u5197\u4f59\u914d\u7f6e\u4e2d\u4e0d\u9700\u8981 LAN \u7684 TCP\/UDP \u8fde\u63a5\uff0c\u56e0\u6b64\u8bf7\u7981\u7528\u5b83\u4eec\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\" data-no-translation=\"\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cam.disableLANNetwork=true<\/code><\/pre><\/div>\n\n\n\n<h2 id=\"Firewall\">\u9632\u706b\u5899\u901a\u8baf\u6743\u9650\uff0c\u7528\u4e8e\u670d\u52a1\u5668\u95f4\u6570\u636e\u540c\u6b65<\/h2>\n\n\n\n<ol><li>\u5b9e\u65f6\u6570\u636e\u66f4\u65b0\uff08\u7528\u6237\u72b6\u6001\u3001\u6d88\u606f\u3001\u804a\u5929\u5ba4\u7b49\uff09\u5728 CAMServer \u4e4b\u95f4\u540c\u6b65\uff0c\u56e0\u6b64\u9700\u8981\u4f7f\u7528\u9632\u706b\u5899\u7b49\u5141\u8bb8\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/li><li>TCP \u7aef\u53e3 9090\u30019091 \u548c 9092 \u7528\u4e8e\u8bbf\u95ee\u6570\u636e\u5e93\u4e3b\u8282\u70b9<\/li><li>\u7528\u4e8e\u670d\u52a1\u5668\u5230\u670d\u52a1\u5668\u8fde\u63a5\u7684 TCP 8080 \u7aef\u53e3 URL<ul><li>\u5728 ini \u6587\u4ef6\u4e2d\u5b9a\u4e49 cam.clusterHosts <\/li><li>\u793a\u4f8b\uff09cam.clusterHosts=camserver1:8080;camserver2:8080;camserver3:8080<\/li><\/ul><\/li><\/ol>\n\n\n\n<h2 id=\"lb-requirements\">\u8d1f\u8f7d\u5747\u8861\u5668\u8981\u6c42\u8be6\u7ec6\u4fe1\u606f<\/h2>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full is-resized is-style-shadow\"><img src=\"https:\/\/chat-messenger.com\/wp-content\/uploads\/2024\/12\/image-9.png\" alt=\"\" class=\"wp-image-11408\" width=\"401\" height=\"291\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p>\u6211\u4eec\u5c06\u8be6\u7ec6\u63cf\u8ff0\u8d1f\u8f7d\u5747\u8861\u5668\u914d\u7f6e\u6240\u9700\u7684\u8981\u6c42\u3002<\/p>\n\n\n\n<p class=\"is-style-icon_info\">\u652f\u6301 L7\/L4\uff0c\u4f46\u9700\u8981\u4f1a\u8bdd\u5173\u8054\u3002\u8bf7\u6ce8\u610f\uff0cL7 \u53ef\u4ee5\u6309\u4f1a\u8bdd\u4fee\u590d\u8fde\u63a5\uff0c\u4f46 L4 \u53ea\u80fd\u6309 IP \u4fee\u590d\u8fde\u63a5\u3002\u672c\u8282\u4ecb\u7ecd\u5982\u4f55\u914d\u7f6e L7\u3002<\/p>\n<\/div>\n<\/div>\n\n\n\n<h4>1. SSL \u7ec8\u6b62<\/h4>\n\n\n\n<ol><li>\u5728\u8d1f\u8f7d\u5747\u8861\u5668\u4e0a\u5b89\u88c5 SSL \u8bc1\u4e66\u5e76\u6267\u884c SSL\/TLS \u89e3\u5bc6\u3002<\/li><li>\u4f7f\u7528 HTTPS \u63a5\u53d7\u6765\u81ea\u5ba2\u6237\u7aef\u7684\u901a\u4fe1\uff0c\u4ece\u8d1f\u8f7d\u5747\u8861\u5668\u5230\u540e\u7aef\u4f7f\u7528 HTTP\u3002<\/li><\/ol>\n\n\n\n<h4>2.\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5<\/h4>\n\n\n\n<ol><li>\u4f7f\u7528\u5faa\u73af\u6cd5\u8fdb\u884c\u8d1f\u8f7d\u5e73\u8861<\/li><li>\u9700\u8981\u57fa\u4e8ecookie\u7684\u4f1a\u8bdd\u7ef4\u62a4\uff08\u4f1a\u8bdd\u4eb2\u548c\u6027\uff09\uff0c\u5e76\u4e14\u9700\u8981\u786e\u8ba4\u5176\u5177\u6709\u5c06\u540c\u4e00Client\u7684\u8bbf\u95ee\u5206\u53d1\u5230\u540c\u4e00\u8282\u70b9\u7684\u529f\u80fd\u3002<\/li><\/ol>\n\n\n\n<h4>3. \u6807\u5934\u548c\u9644\u52a0\u5904\u7406\u4f20\u8f93\u5230\u540e\u7aef\u670d\u52a1\u5668\uff088080\uff09<\/h4>\n\n\n\n<p><code>X-\u8f6c\u53d1-\u539f\u578b<\/code><br>LB\u8f6c\u53d1\u5230\u540e\u7aef\u670d\u52a1\u5668\u65f6\u5c06\u8bf7\u6c42\u6807\u8bc6\u4e3ahttps\u7684\u6807\u5934\u9879<\/p>\n\n\n\n<p><code>X-\u8f6c\u53d1-For<\/code><br>LB\u8f6c\u53d1\u7ed9\u540e\u7aef\u670d\u52a1\u5668\u65f6\u6807\u8bc6\u5ba2\u6237\u7aefIP\u5730\u5740\u7684\u5934\u9879\u3002<\/p>\n\n\n\n<p><code>\u5904\u7406 WebSocket \u5347\u7ea7\u6807\u5934<\/code><br>\u5206\u6790HTTP\u8bf7\u6c42\u5e76\u68c0\u6d4bUpgrade\u6807\u5934\uff0c\u89e6\u53d1TCP\u5207\u6362<\/p>\n\n\n\n<p class=\"is-style-icon_info\">\u73b0\u4ee3\u8d1f\u8f7d\u5747\u8861\u5668 (AWS\/GCP\/Azure) \u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5177\u6709\u6807\u51c6\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<h3>4. \u4e0e\u540e\u7aef\u670d\u52a1\u5668\u901a\u4fe1<\/h3>\n\n\n\n<p>\u4ece\u8d1f\u8f7d\u5747\u8861\u5668\u5230\u6bcf\u4e2a CAMServer \u7684\u901a\u4fe1\u662f\u4f7f\u7528\u4ee5\u4e0b\u534f\u8bae\u548c\u7aef\u53e3\u6267\u884c\u7684\u3002<\/p>\n\n\n\n<ul><li>\u534f\u8bae\uff1aHTTP<\/li><li>\u7aef\u53e3\u53f7\uff1a8080<\/li><li>\u8fde\u63a5\u793a\u4f8b\uff1ahttp:\/\/HOSTNAME:8080\/<\/li><\/ul>\n\n\n\n<h3>5. \u5065\u5eb7\u68c0\u67e5<\/h3>\n\n\n\n<ol><li>\u8d1f\u8f7d\u5747\u8861\u5668\u5b9a\u671f\u8bf7\u6c42\u4ee5\u4e0b URL\uff0c\u5982\u679c\u6ee1\u8db3\u6761\u4ef6\uff0c\u5219\u786e\u5b9a\u5176\u201c\u6b63\u5e38\u201d\u3002<\/li><li>\u5065\u5eb7\u68c0\u67e5\u7f51\u5740\uff1ahttp:\/\/HOSTNAME:8080\/CAMServer\/healthCheck<\/li><li>\u5065\u5eb7\u68c0\u67e5\u6761\u4ef6\uff1a HTTP \u72b6\u6001\u7801\uff1a200 \u54cd\u5e94\u6b63\u6587\uff1a{\u201cstatus\u201d:200}<\/li><\/ol>","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e\u5197\u4f59\u548c\u8d1f\u8f7d\u5e73\u8861\uff0cCAMServer \u7684 Ultimate \u8ba1\u5212\u53ef\u8ba9\u60a8\u8f7b\u677e [...]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/posts\/6153"}],"collection":[{"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/comments?post=6153"}],"version-history":[{"count":9,"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/posts\/6153\/revisions"}],"predecessor-version":[{"id":12264,"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/posts\/6153\/revisions\/12264"}],"wp:attachment":[{"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/media?parent=6153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/categories?post=6153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chat-messenger.com\/zh\/wp-json\/wp\/v2\/tags?post=6153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}