{"id":523,"date":"2008-08-22T00:00:00","date_gmt":"2008-08-21T16:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=523"},"modified":"2011-07-15T09:19:24","modified_gmt":"2011-07-15T01:19:24","slug":"resin-clustering","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=523","title":{"rendered":"resin clustering"},"content":{"rendered":"<p><DIV>\u672c\u6587\u4e3b\u8981\u8bb2\u8ff0resin\u7684clustering\uff0c\u7b80\u5355\u660e\u4e86\u3002\u7531\u4e8e\u6761\u4ef6\u9650\u5236\uff0c\u53ea\u4f7f\u7528\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u8fd0\u884c\u591a\u4e2aresin\u6765\u5b9e\u73b0clustering\uff0c\u5982\u679c\u591a\u53f0\u670d\u52a1\u5668\uff0c\u53ea\u8981\u4fee\u6539\u76f8\u5e94\u7684ip\u5730\u4e0b\u5c31\u53ef\u4ee5\u4e86\u3002<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u6b65\u9aa4\uff11\uff1a<\/DIV><br \/>\n<DIV>\u914d\u7f6e\u597dresin.conf\uff0c\u81f3\u5c11\u53ef\u4ee5\u628aweb\u5e94\u7528\u8fd0\u884c\u8d77\u6765\u3002<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u6b65\u9aa4\uff12\uff1a<\/DIV><br \/>\n<DIV>\u6267\u884c\uff1acp resin.conf resin-web.conf<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>resin.conf\u4f5c\u4e3aclustering\u7684\u914d\u7f6e\u6587\u4ef6\uff1b<\/DIV><br \/>\n<DIV>resin-web.conf\u4e3a\u4f5cweb-tier\u7684\u914d\u7f6e\u6587\u4ef6\uff1b<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u4fee\u6539resin.conf<\/DIV><br \/>\n<DIV>\u628aapp-tier\u4e2d\u7684&lt;http address=&#8221;*&#8221; port=&#8221;80&#8243;\/&gt;\u3000\u4fee\u6539\u4e3a\u3000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;http address=&#8221;*&#8221; port=&#8221;80&#8243;\/&#8211;&gt;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u5728&lt;!&#8211; define the servers in the cluster &#8211;&gt;\u4e0b\u9762\u589e\u52a0servers(ip\u548c\u7aef\u53e3\u53ef\u4ee5\u81ea\u884c\u4fee\u6539)<\/DIV><br \/>\n<DIV>&nbsp;&lt;server id=&#8221;a&#8221; address=&#8221;192.168.1.65&#8243; port=&#8221;6800&#8243;\/&gt;<BR>&nbsp;&lt;server id=&#8221;b&#8221; address=&#8221;192.168.1.64&#8243; port=&#8221;6801&#8243;\/&gt;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u4fee\u6539resin-web.conf<\/DIV><br \/>\n<DIV><br \/>\n<DIV>\u5728&lt;!&#8211; define the servers in the cluster &#8211;&gt;\u4e0b\u9762\u589e\u52a0servers(ip\u548c\u7aef\u53e3\u53ef\u4ee5\u81ea\u884c\u4fee\u6539)<\/DIV><br \/>\n<DIV>&nbsp;&lt;server id=&#8221;a&#8221; address=&#8221;192.168.1.65&#8243; port=&#8221;6800&#8243;\/&gt;<BR>&nbsp;&lt;server id=&#8221;b&#8221; address=&#8221;192.168.1.64&#8243; port=&#8221;6801&#8243;\/&gt;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u628aweb-tier\u4e2d\u7684 &lt;http address=&#8221;*&#8221; port=&#8221;9080&#8243;\/&gt;\u4fee\u6539\u4e3a &lt;http address=&#8221;*&#8221; port=&#8221;80&#8243;\/&gt;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u6b65\u9aa4\uff13\uff1a<\/DIV><br \/>\n<DIV>\u542f\u52a8app-tier<\/DIV><br \/>\n<DIV>java -jar lib\/resin.jar -conf conf\/resin.conf -server a &amp;<\/DIV><br \/>\n<DIV>java -jar lib\/resin.jar -conf conf\/resin.conf -server b &amp;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u542f\u52a8web-tier<\/DIV><br \/>\n<DIV>java -jar lib\/resin.jar -conf conf\/resin-web.conf -server web-a &amp;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u6253\u5f00\u6d4f\u89c8\u5668\u8f93\u5165localhost<\/DIV><br \/>\n<DIV>\u770b\u770b\u8f93\u51fa\u4ec0\u4e48\uff1f<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u8bd5\u7740\u628aa\u5173\u95ed\uff0c\u518d\u6253\u5f00locahost\u770b\u770b\uff1f<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>\u6210\u529f\u4e86\u5427\uff1f<\/DIV><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4e3b\u8981\u8bb2\u8ff0resin\u7684clustering\uff0c\u7b80\u5355\u660e\u4e86\u3002\u7531\u4e8e\u6761\u4ef6\u9650\u5236\uff0c\u53ea\u4f7f\u7528\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u8fd0\u884c\u591a\u4e2aresin\u6765\u5b9e\u73b0clustering\uff0c\u5982\u679c\u591a\u53f0\u670d\u52a1\u5668\uff0c\u53ea\u8981\u4fee\u6539\u76f8\u5e94\u7684ip\u5730\u4e0b\u5c31\u53ef\u4ee5\u4e86\u3002 &nbsp; \u6b65\u9aa4\uff11\uff1a \u914d\u7f6e\u597dresin.conf\uff0c\u81f3\u5c11\u53ef\u4ee5\u628aweb\u5e94\u7528\u8fd0\u884c\u8d77\u6765\u3002 &nbsp; \u6b65\u9aa4\uff12\uff1a \u6267\u884c\uff1acp resin.conf resin-web.conf &nbsp; resin.conf\u4f5c\u4e3aclustering\u7684\u914d\u7f6e\u6587\u4ef6\uff1b resin-web.conf\u4e3a\u4f5cweb-tier\u7684\u914d\u7f6e\u6587\u4ef6\uff1b &nbsp; \u4fee\u6539resin.conf \u628aapp-tier\u4e2d\u7684&lt;http address=&#8221;*&#8221; port=&#8221;80&#8243;\/&gt;\u3000\u4fee\u6539\u4e3a\u3000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!&#8211;http address=&#8221;*&#8221; port=&#8221;80&#8243;\/&#8211;&gt; &nbsp; \u5728&lt;!&#8211; define the servers in the cluster &#8211;&gt;\u4e0b\u9762\u589e\u52a0servers(ip\u548c\u7aef\u53e3\u53ef\u4ee5\u81ea\u884c\u4fee\u6539) &nbsp;&lt;server id=&#8221;a&#8221; address=&#8221;192.168.1.65&#8243; port=&#8221;6800&#8243;\/&gt;&nbsp;&lt;server id=&#8221;b&#8221; address=&#8221;192.168.1.64&#8243; port=&#8221;6801&#8243;\/&gt; &nbsp; \u4fee\u6539resin-web.conf \u5728&lt;!&#8211; define the servers in the cluster &#8211;&gt;\u4e0b\u9762\u589e\u52a0servers(ip\u548c\u7aef\u53e3\u53ef\u4ee5\u81ea\u884c\u4fee\u6539) &nbsp;&lt;server id=&#8221;a&#8221; address=&#8221;192.168.1.65&#8243; port=&#8221;6800&#8243;\/&gt;&nbsp;&lt;server id=&#8221;b&#8221; address=&#8221;192.168.1.64&#8243; port=&#8221;6801&#8243;\/&gt; &nbsp; \u628aweb-tier\u4e2d\u7684 &hellip; <a href=\"https:\/\/www.strongd.net\/?p=523\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">resin clustering<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,20],"tags":[71,17],"class_list":["post-523","post","type-post","status-publish","format-standard","hentry","category-linux","category-20","tag-clustering","tag-resin-2"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=523"}],"version-history":[{"count":1,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/523\/revisions"}],"predecessor-version":[{"id":847,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/523\/revisions\/847"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}