<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 7/10/13 7:13 AM, Allen Zhang wrote:<br>
</div>
<blockquote
cite="mid:04588C075527D74CABD19E7C320BCB1C013BEF31@WEMAIL01.we.imgtec.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi list,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a loadbalancer before sipproxies. I
call t_reley() on the dispatcher to forward requests to
destinations.<o:p></o:p></p>
<p class="MsoNormal">All goes well under low load.<o:p></o:p></p>
<p class="MsoNormal">But when load goes up to 500 requests/s,
the loadbalancer still sends requests via only one tcp
connection. This maxes out the tcp write queue.<o:p></o:p></p>
<p class="MsoNormal">Of course I can increase the
‘tcp_conn_wq_max’ value but it doesn’t solve the root problem.<o:p></o:p></p>
<p class="MsoNormal">How do I make the loadbalancer start a new
tcp connection to the destination when existing one becomes
too busy? (Is it possible?)</p>
</div>
</blockquote>
there is no detection for such case and it will add some complexity
to manage a group of connections to same destination (but patches
will be considered, of course).<br>
<br>
However, here are some workarounds:<br>
- use set_forward_close(), but note its issues regarding replies:<br>
<a class="moz-txt-link-freetext" href="http://www.kamailio.org/wiki/cookbooks/devel/core#set_forward_close">http://www.kamailio.org/wiki/cookbooks/devel/core#set_forward_close</a><br>
<br>
- listen on several local tcp sockets and use selectively one of
them via forcing local socket for sending (see $fs variable or
force_send_socket(...))<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
</pre>
</body>
</html>