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 2019/01/19 02:05:03 UTC

[GitHub] AprliRainkun opened a new issue #111: Cannot reuse TCP connection across action invocations

AprliRainkun opened a new issue #111: Cannot reuse TCP connection across action invocations
URL: https://github.com/apache/incubator-openwhisk-client-go/issues/111
 
 
   In the current implimentation, `LoadX509KeyPair()` is executed when making a new http request. As a result, a new `Transport` is created for each request. However,  TCP connections cannot be reused across different transports. This will cause the program to reach fd limits quickly under a heavy load, e.g., invoke actions programmingly.
   
   Here is a demo of the deficiency:
   When I invoke an action (host ip: `13.66.***.**`) sequentially for a couple of times, several connections are established. Idealy, only one connection should be created and reused.
   ```
   Active Internet connections (servers and established)
   Proto Recv-Q Send-Q Local Address           Foreign Address         State      
   tcp        0      0 localhost:socks         0.0.0.0:*               LISTEN     
   tcp        0      0 localhost:1188          0.0.0.0:*               LISTEN     
   tcp        0      0 mingyu-virtual-ma:35702 13.66.***.**:https      ESTABLISHED
   tcp        0      0 mingyu-virtual-ma:35698 13.66.***.**:https      ESTABLISHED 
   tcp        0      0 mingyu-virtual-ma:35696 13.66.***.**:https      ESTABLISHED
   tcp        0      0 mingyu-virtual-ma:35700 13.66.***.**:https      ESTABLISHED
   tcp        0      0 mingyu-virtual-ma:35704 13.66.***.**:https      ESTABLISHED
   tcp        0      0 mingyu-virtual-ma:35694 13.66.***.**:https      ESTABLISHED
   tcp6       0      0 ip6-localhost:ipp       [::]:*                  LISTEN     
   tcp6       0      0 ip6-localhost:socks     [::]:*                  LISTEN
   ```

----------------------------------------------------------------
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