<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20140516161520004336 { }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span><span style="font-family: monospace; font-size: medium; line-height: normal;">ngx_http_upstream_module </span><span style="background-color: rgb(255, 255, 255);"><span left-pos="24|12" right-pos="24|12" space="" class="high-light-bg" style="border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; cursor: pointer; font-family: arial; font-size: 12px; line-height: 22px;">Load balancing</span><span left-pos="36|6,0|8" right-pos="36|6,0|8" space="0| " class="" style="font-family: arial; font-size: 12px; line-height: 22px;"> </span></span><span left-pos="36|6,0|8" right-pos="36|6,0|8" space="0| " class="" style="background-color: window; font-family: arial; font-size: 12px; line-height: 22px;">algorithm upstream</span><span left-pos="8|16" right-pos="8|16" space="0| " class="" style="background-color: window; font-family: arial; font-size: 12px; line-height: 22px;"> the instruction ip_hash;</span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>gaoping@richinfo.cn</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:renenglish@gmail.com">Shafreeck Sea</a></div><div><b>Date:</b> 2014-05-16 16:14</div><div><b>To:</b> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a></div><div><b>Subject:</b> Re: nginx1.4.7 ip_hash load balancing strategy</div></div></div><div><div class="FoxDiv20140516161520004336"><div dir="ltr">why ip_hash ?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-16 15:29 GMT+08:00 <a href="mailto:gaoping@richinfo.cn">gaoping@richinfo.cn</a> <span dir="ltr"><<a href="mailto:gaoping@richinfo.cn" target="_blank">gaoping@richinfo.cn</a>></span>:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div>
<div><span></span>hi</div><div>     <span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px">When my nginx</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px"> is</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px"> below</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px"> this structure,</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px">Nginx</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> access to the</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> IP</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> proxy server</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> by</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> IP</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px">,</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> then</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> nginx</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> ip_hash</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> load balancing</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px">,</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> will</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> all requests are</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> routed to</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> the same tomcat</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px">,</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> do not know if you have</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> what</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"> good method to solve the</span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px">.</span></div>
<div><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px">   </span><span style="font-size:10.5pt;background-color:window;color:rgb(51,51,51);font-family:arial;line-height:22px"><span style="font-size:13px"> </span></span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px">The ip_hash function</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px"> can be</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px"> introduced into</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:13px;line-height:22px"> a custom IP.</span><span style="background-color:window;color:rgb(51,51,51);font-family:arial;font-size:10.5pt;line-height:22px">      </span></div>
<div>    <font color="#ff0000"> <span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px">Prerequisite</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px">:</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> can not</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> change the existing</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> structure</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px">,</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> and</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> nginx access to the</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> IP is only a</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px">proxy server</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px">,</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> and</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> IP</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> client</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> request is</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> not</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px"> true</span><span style="font-size:10.5pt;background-color:window;font-family:arial;line-height:22px">,</span></font></div>
<div><span style="color:rgb(51,51,51);font-family:arial;line-height:22px">  </span></div>
<div><img src="cid:_Foxmail.1@a1211391-a0ce-1e5a-190b-85deaf67df44" border="0"></div><hr style="width:210px;min-height:1px" align="left" color="#b5c4df" size="1"><span class="HOEnZb"><font color="#888888">
<div><span><div style="MARGIN:10px;FONT-FAMILY:verdana;FONT-SIZE:10pt"><div><a href="mailto:gaoping@richinfo.cn" target="_blank">gaoping@richinfo.cn</a></div></div></span></div>
</font></span></div><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>
</div></div></blockquote>
</body></html>