<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Khoa.<BR> <BR>You are correct. This means that the server calls <code>shutdown</code> very shortly after accepting the connection. The server has reach max TCP connection limit, or server is busy handling other connections.<BR> <BR>The following link "<a class="question-hyperlink" href="http://stackoverflow.com/questions/3870260/why-will-a-tcp-server-send-a-fin-immediately-after-accepting-a-connection">Why will a TCP Server send a FIN immediately after accepting a connection?</a>" is a good reference to your question.<BR> <BR><a href="http://stackoverflow.com/questions/3870260/why-will-a-tcp-server-send-a-fin-immediately-after-accepting-a-connection">http://stackoverflow.com/questions/3870260/why-will-a-tcp-server-send-a-fin-immediately-after-accepting-a-connection</a><BR> <BR> <BR> <BR>Best regards,<BR> <BR>Winston Hong<br><br><BR> <BR> <BR><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Tue, 7 May 2013 10:31:01 +0700<br>From: onmyway133@gmail.com<br>To: sr-users@lists.sip-router.org<br>Subject: Re: [SR-Users] Max concurrent TCP connection that Kamailio support ?<br><br><div dir="ltr">Hi Yang Hong, thanks for your reply and those papers<div><br></div><div>1. When client make TCP connection, it usually get [FIN,ACK] and [RST] from server. Does that mean that server has reach max TCP connection limit, or server is busy handling other connections?</div>
<div><br></div><div>P/S: proposed that my server is very strong</div></div><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">On Mon, May 6, 2013 at 10:24 PM, Yang Hong <span dir="ltr"><<a href="mailto:yang_hong@hotmail.com" target="_blank">yang_hong@hotmail.com</a>></span> wrote:<br>
<blockquote style="padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="ecxgmail_quote">


<div><div dir="ltr">Hi Khoa.<br> <br>The maximum number of concurrent TCP connections depend on the computational capacity of the server. Kamailio can be regarded as an application server of high performance SIP/VoIP.<br>
 <br>In the following post, the Kamailio user set max TCP connections to 64K. <br><a href="http://lists.sip-router.org/pipermail/sr-users/2013-April/077555.html" target="_blank">http://lists.sip-router.org/pipermail/sr-users/2013-April/077555.html</a><br>
 <br>Actually the theoretical maximum number of open TCP connections is  general setting for all servers (not limited to Kamailio). The following link is a good reference for your question.<br>"What is the theoretical maximum number of open TCP connections that a modern Linux box can have?" Stack Overflow <br>
 <a href="http://stackoverflow.com/questions/2332741/what-is-the-theoretical-maximum-number-of-open-tcp-connections-that-a-modern-lin" target="_blank">http://stackoverflow.com/questions/2332741/what-is-the-theoretical-maximum-number-of-open-tcp-connections-that-a-modern-lin</a><br>
 <br>The max_tcp_connections set to 2048 is a very conservative setting. Theoretically you can set a large number of max_tcp_connections. However, Kamailio node may exhibit overload even collapse, when concurrent TCP connections reaches maximum setting during peak-hour and each connection perform heavy task by average.<br>
<br>To be conservative, you can collect statistics about CPU and memory utilization of Kamailio node under 2048 connections (your current default setting). For example, if CPU utilization is only 10%, you can increase max_tcp_connections setting from 2048 to 20480.<br>
 <br>Similar to potential overload caused by too many TCP connections, SIP also faces with overload issue recently due to its popularity. <br> <br>Build-in overload mechanism cannot prevent overload effectively. Therefore, IETF SIP Overload Control (soc) Working Group works on IETF RFC "SIP Overload Control" currently.<br>
<a href="http://tools.ietf.org/html/draft-ietf-soc-overload-control-12" target="_blank">http://tools.ietf.org/html/draft-ietf-soc-overload-control-12</a><br> <br>IETF SIP Overload Control discussion archives<br><a href="http://www.ietf.org/mail-archive/web/sip-overload/current/threads.html#00874" target="_blank">http://www.ietf.org/mail-archive/web/sip-overload/current/threads.html#00874</a><br>
 <br>A survey on SIP overload control algorithms (including IETF RFC "SIP Overload Control") can be downloaded from the following link free of charge.<br>Y. Hong, C. Huang, and J. Yan, “A Comparative Study of SIP Overload Control Algorithms,"Network and Traffic Engineering in Emerging Distributed Computing Applications, Edited by J. Abawajy, M. Pathan, M. Rahman, A.K. Pathan, and M.M. Deris, IGI Global, 2012, pp. 1-20.<br>
<a href="http://www.researchgate.net/publication/231609451_A_Comparative_Study_of_SIP_Overload_Control_Algorithms" target="_blank">http://www.researchgate.net/publication/231609451_A_Comparative_Study_of_SIP_Overload_Control_Algorithms</a><br>
<a href="http://arxiv.org/abs/1210.1505" target="_blank">http://arxiv.org/abs/1210.1505</a><br><a href="http://www.igi-global.com/chapter/comparative-study-sip-overload-control/67496" target="_blank">http://www.igi-global.com/chapter/comparative-study-sip-overload-control/67496</a><br>
 <br>Control theorectic approaches have been applied to model the interactions between an overloaded SIP server and its upstream servers as a feedback control system in two different scenarios - redundant retransmission ratio control and round trip delay control (IEEE Globecom 2010 and ICC 2011).<br>
 <br>"Mitigating SIP Overload Using a Control-Theoretic Approach" IEEE Globecom 2010<br><a href="http://www.researchgate.net/publication/221284946_Mitigating_SIP_Overload_Using_a_Control-Theoretic_Approach" target="_blank">http://www.researchgate.net/publication/221284946_Mitigating_SIP_Overload_Using_a_Control-Theoretic_Approach</a><br>
<a href="http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5683124&url=http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber%3D5683124" target="_blank">http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5683124&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D5683124</a><br>
 <br>Implementation of implicit SIP overload control in the real system<br>"An Efficient Earthquake Early Warning Message Delivery Algorithm Using an in Time Control-Theoretic Approach"<br><a href="http://link.springer.com/chapter/10.1007/978-3-642-23641-9_15" target="_blank">http://link.springer.com/chapter/10.1007%2F978-3-642-23641-9_15</a>#<br>
<a href="http://www.ipv6.org.tw/docu/elearning8_2011/1010004798p_3-7.pdf" target="_blank">http://www.ipv6.org.tw/docu/elearning8_2011/1010004798p_3-7.pdf</a> <br> <br>"Design Of A PI Rate Controller for Mitigating SIP Overload" IEEE ICC 2011<br>
<a href="http://www.researchgate.net/publication/224249824_Design_of_a_PI_Rate_Controller_for_Mitigating_SIP_Overload" target="_blank">http://www.researchgate.net/publication/224249824_Design_of_a_PI_Rate_Controller_for_Mitigating_SIP_Overload</a><br>
<br>Skype story published by Road Runner (TimeWarner Cable Inc.)<br><a href="http://features.rr.com/article/01vBgtc8TR17z?q=Skype" target="_blank">http://features.rr.com/article/01vBgtc8TR17z?q=Skype</a><br><a href="http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5963029&url=http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber%3D5963029" target="_blank">http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5963029&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D5963029</a> <br>
 <br> <br>Best regards,<br>Winston Hong<br>Software Engineer<br>InBay Technologies Inc.<br>Ottawa, <br>Canada K2K 1Y3<br><a href="http://www.inbaytech.com/solutions.html" target="_blank">http://www.inbaytech.com/solutions.html</a> <br>
<br><br> <br><div><div></div><hr>Date: Mon, 6 May 2013 10:54:13 +0700<br>From: <a href="mailto:onmyway133@gmail.com" target="_blank">onmyway133@gmail.com</a><br>To: <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
Subject: [SR-Users] Max concurrent TCP connection that Kamailio support ?<div><div class="h5"><br><br><div dir="ltr">Hi,<div><br></div><div>What is the maximum number of concurrent TCP connection that Kamailio can handle ?</div>
<div>I see the max_tcp_connections (which is set to 2048), is that the answer ?</div><div><br></div>
<div>How to test for this ?</div><div><br></div><div>Many thanks<br clear="all"><div><br></div>-- <br><span>Khoa Pham</span><br><span>HCMC University of Science</span><br>
<span>Faculty of Information Technology</span><br>
</div></div>
<br></div></div>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></div>                                     </div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color: rgb(0, 0, 0);">Khoa Pham</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">HCMC University of Science</span><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">Faculty of Information Technology</span><br>
</div>
<br>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</div>                                         </div></body>
</html>