You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/16 15:42:06 UTC

[GitHub] tysonnorris commented on issue #3969: use KeepAlive(false) (SocketOption) instead of Connection:close (HTTP header)

tysonnorris commented on issue #3969: use KeepAlive(false) (SocketOption) instead of Connection:close (HTTP header)
URL: https://github.com/apache/incubator-openwhisk/pull/3969#issuecomment-413590542
 
 
   Here is an example of the problem https://github.com/apache/incubator-openwhisk/pull/2795#issuecomment-412958409
   
   Previously, when using "Connection: close" header, akka client would periodically get these connection errors (but not always, and not with all client tests). I changed the keepalive setting based on the keepalive handling added to `ApacheBlockingContainerClient`, but I agree this impl is not related to HTTP connection pooling.
   
   Some options I see are:
   * determine a more appropriate way to disable connection reuse besides keepalive SocketOption (this was the only approach I found)
   * determine why `Connection:close` causes intermittent failures with akka client (have had no luck there so far )
   * don't use `PoolingRestClient` or `Connection: close` in `AkkaContainerClient`, rather force a new connection on each request using `Http().outgoingConnection(<container ip>)`; I'm not sure the real performance impact here, since [docs](https://doc.akka.io/docs/akka-http/current/client-side/connection-level.html) mention it is 'slow'
   * use `PoolingRestClient`, but not `Connection:close`, and allow max connection reuse, but add `client.close()` as part of the `Container.pause()` workflow (to dispose connections when container is paused). Connection pool will be recreated on unpause.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services