You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by SteveR <sr...@vonage.com> on 2015/10/03 20:39:26 UTC
camel:netty4: How to control the number of outgoing TCP connections
I'm using *Camel 2.15.2* and *camel:netty4* on RHEL6 and I have a Camel route
that reads from a *SEDA *queue and sends via *netty4:tcp *to a remote host.
When doing a load test in dev, I see that exactly 50 TCP connections get
established to the remote host. I would like to understand what controls how
many TCP connections that *camel-netty4 *attempts to establish to the remote
host. I wonder if the remote host's *backlog *parameter is what limits it
to 50? But I'm more interested in the *camel-netty4* behavior, since it's
initiating the TCP connection attempts.
Thanks, SteveR
Here's what the route looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route startupOrder="99" customId="true" id="ROUTE_ID_SEDA_QUEUE"
xmlns="http://camel.apache.org/schema/spring">
<from
uri="seda:SEDA_QUEUE_99?size=1000000&concurrentConsumers=25&waitForTaskToComplete=Never&failIfNoConsumers=true&timeout=10000"/>
<setExchangePattern pattern="InOnly" id="setExchangePattern4"/>
<to
uri="netty4:tcp://listener-02.dloco.s.mission.net:9006?serverInitializerFactory=#SERVER_PIPELINE_FACTORY_SEAD_ROUTE&keepAlive=true&tcpNoDelay=true&connectTimeout=30000&sync=false&sendBufferSize=8388608&receiveBufferSize=8388608&disconnect=false&allowDefaultCodec=true&receiveBufferSizePredictor=8192"
id="to6"/>
<setProperty propertyName="CamelCharsetName" id="setProperty8">
<expressionDefinition>iso-8859-1</expressionDefinition>
</setProperty>
</route>
... and here's, what I see with *netstat *after starting the load test:
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 0 0.0.0.0:7993 0.0.0.0:*
LISTEN
tcp 0 0 10.262.134.26:8093 0.0.0.0:*
LISTEN
tcp 0 0 10.262.134.26:9006 0.0.0.0:*
LISTEN
tcp 0 0 10.262.172.26:58731 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58865 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58882 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58875 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.134.26:9006 10.262.160.24:44516
ESTABLISHED
tcp 0 0 10.262.172.26:58877 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58871 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58894 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58908 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58906 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58876 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58904 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58862 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58896 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58863 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58737 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58881 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58867 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.134.26:9006 10.262.160.24:44514
ESTABLISHED
tcp 0 0 10.262.172.26:58902 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58888 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58878 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58870 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58884 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58864 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.134.26:9006 10.262.160.24:44515
ESTABLISHED
tcp 0 0 10.262.172.26:58879 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58869 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58868 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58909 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58889 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58861 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58886 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58905 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58735 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58887 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58901 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58903 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58900 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58883 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58874 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58730 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58907 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58736 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.134.26:9006 10.262.160.24:44513
ESTABLISHED
tcp 0 0 10.262.172.26:58873 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58734 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58872 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58733 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58885 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58895 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58732 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58866 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.172.26:58880 10.262.153.73:9006
ESTABLISHED
tcp 0 0 10.262.134.26:9006 10.262.160.24:44512
ESTABLISHED
--
View this message in context: http://camel.465427.n5.nabble.com/camel-netty4-How-to-control-the-number-of-outgoing-TCP-connections-tp5772227.html
Sent from the Camel - Users mailing list archive at Nabble.com.