socket pool implementation question

474 views
Skip to first unread message

all smooth

unread,
Jun 6, 2013, 1:08:03 AM6/6/13
to chromi...@chromium.org
Any one can explain/share the design details here why Chrome uses up to 6 sockets per host and RFC 2626 suggests no more than 2 connections. 
My understanding is now use spdy each socket can handle multiple request/responses, so only one connection is required per client is required, then why 6 sockets?

I am confused with the facts: Chrome socket pool (6 sockets per host), RFC(no more 2sockets per host), spdy(1 connection is enough)

Does each tab process share the socket pool?  What if socket is closed by server, then in runtime the process get the related socket from the pool and check its status and decide reconnect?

below are excerpt from:

http://www.chromium.org/developers/design-documents/network-stack
said:
"
Currently these are set to 32 sockets per proxy, 6 sockets per destination host, and 256 sockets per process (not implemented exactly correct, but good enough).  Socket pools also abstract the socket request from the fulfillment, thereby giving us "late binding" of sockets.  A socket request can be fulfilled by a newly connected socket or an idle socket (reused from a previous http transaction)."

and in end of above exerpt it points to the link to http://en.wikipedia.org/wiki/HTTP_persistent_connection which said:
"According to RFC 2616 (page 46), a single-user client should not maintain more than 2 connections with any server or proxy."

cheers,
-all smooth

Ryan Hamilton

unread,
Jun 6, 2013, 10:42:15 AM6/6/13
to guangyuan li, chromium-dev
Chrome's socket pool limits match the behavior of other browsers, all of which long ago realized that the RFC's limits were *way* too small to achieve reasonable performance.  RFC 2616 is from 1999.  The internet and the web have change dramatically since then.  You might want to check out the  That being said, when Chrome has a SPDY connection to an origin (host:port), it will only have a single SPDY connection to that origin.  As you say, SPDY multiplexes multiple request over the same connection so there is no need for multiple connections.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
 
 
 

all smooth

unread,
Jun 6, 2013, 11:57:29 AM6/6/13
to chromi...@chromium.org
Thanks Ryan, it completely makes sense.

Jeffrey Yasskin

unread,
Jun 6, 2013, 11:57:47 AM6/6/13
to r...@chromium.org, guangyuan li, chromium-dev

all smooth

unread,
Jun 6, 2013, 3:48:22 PM6/6/13
to chromi...@chromium.org
Thanks. Very good description.
Reply all
Reply to author
Forward
0 new messages