My client is using CXF 3.2.2 (client side) in AWS Lambdas.  We have
discovered that AWS limits the VPC TCP connections to a maximum of 350
seconds.  Using the TCP protocol keep-alive is one way to work around that
limitation.  

 

Is there a way to either customize the way CXF instantiates the httpclient
so it can include a socket with
socket.setOption(StandardSocketOptions.SO_KEEPALIVE, true) and/or configure
CXF to use a custom httpclient that we provide?

 

We are using CXF to generate synchronous calls to our legacy SOAP service.

 

On a related note, also regarding network performance, our CXF clients will
reuse an existing TCP connection if we have requests that arrive within 3
seconds of one another.  If it is longer than that, a new connection will be
created.  

 

The workaround we found is for our server to send these HTTP headers back to
our CXF client:

 

Connection: Keep-Alive

Keep-Alive: timeout=1200,max=99999

 

It seems that the default for the httpclient connection pool has an idle
time of just 3 seconds.  We are not sure if this is peculiar to our
implementation or is something that is inherent in the way CXF configures
the Java httpclient.

 

Thanks in advance for any assistance!

 

 

Reply via email to