what will happen to a keep-alive connection to the app instance when stopping this app instance ?

34 views
Skip to first unread message

Hongliang Sun

unread,
Oct 4, 2014, 1:21:40 PM10/4/14
to vcap...@cloudfoundry.org
Hi ,all,

        Today I think of a question in Cloud Foundry.

        It is about the connection from haproxy to gorouter and from gorouter to user's app.

        If an instance of a user's app is serving  a lot of requests(maybe 10000), then there must be lots of connections from outer users' web client to haproxy, from haproxy to gorouter, from gorouter to app instance as well.
        Now if the app described above crashes, what will happen to the connections from gorouter to this crashed instance?

        Here is my thoughts.
        If these connections are active, the connection beginner(gorouter) will find the connection endpoint(app instance) is down, and it means this connection should to closed,  and gorouter will shutdown the connection and reclaim the previous fd to the fd resource pool.

        But if these connection are all keep-alive and none of them are active, does this means every connection must consume a fd? if It does, when the app instance crashes, does gorouter have no consciousness about all of these? Then lots of fds are wasted and it really can not be tolerated in Cloud Foundry!!!!!!

        Then when does gorouter reclaim these unused fds in the scene above?  Some policy in TCP?

        Can someone explain this for me   :)

        Thanks in advance.


Hongliang Sun
Zhejiang University, China
 

Matthew Sykes

unread,
Oct 5, 2014, 3:44:32 PM10/5/14
to vcap...@cloudfoundry.org
My understanding is that connections are explicitly closed between the gorouter and the app instance but that they may be kept alive between the client and load balancer and, possibly, the load balancer and the gorouter.

That said, there are others more familiar with the router than I am.

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/bfbf2a92-ce2d-4754-bb84-c274113bf05b%40cloudfoundry.org.

To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.



--
Matthew Sykes
matthe...@gmail.com

Mike Youngstrom

unread,
Oct 5, 2014, 5:25:28 PM10/5/14
to vcap...@cloudfoundry.org

Currently connections between load balancer and GoRouter are not persisted either.

Mike

Reply all
Reply to author
Forward
0 new messages