How many maximum number of simultaneous Chrome connections/threads I can start through Selenium WebDriver?

假装没事ソ 提交于 2020-01-14 04:10:06

问题


Assuming I do not have a Grid setup, what is the Maximum number of simultaneous Chrome threads I can start from Selenium WebDriver?

Is it 5? And does it hold good for Chrome Headless as well?


回答1:


Browser connection limitations

Browsers limit the number of HTTP connections with the same domain name. This restriction is defined in the HTTP specification (RFC2616). Most modern browsers allow six connections per domain where as most of the older browsers allow only two connections per domain.

The HTTP 1.1 protocol states that single-user clients should not maintain more than two connections with any server or proxy. This is the reason for browser limits. You can find a detailed discussion in RFC 2616 – Hypertext Transfer Protocol, section 8 – Connections.

Modern browsers are less restrictive than this, allowing a larger number of connections. The RFC does not specify how to prevent the limit being exceeded. Either connections can be blocked from opening or existing connections can be closed.

Table of MAXIMUM SUPPORTED CONNECTIONS:


http.maxConnections

As per Networking Properties:

http.maxConnections (default: 5)

If HTTP keepalive is enabled (see above) this value determines the maximum number of idle connections that will be simultaneously kept alive, per destination.


Connection per-host

As per Network.http.max-connections-per-server Firefox 3 has boosted the connections per host to 15.

As per Match Firefox's per-host connection limit of 15 Chrome team tried to match the same and went through the discussion Configurable connections-per-host but ended up without any conclusion in Configurable connections-per-host


Conclusion

The same standards are also applicable while you use any of the WebDriver and Web Browser variant combo. The behavior with Selenium Grid Setup, Chrome Headless and Firefox Headless will also be identical.


References

  • Increasing Google Chrome's max-connections-per-server limit to more than 6
  • How to solve Chrome's 6 connection limit when using xhr polling
  • Max parallel http connections in a browser?


来源:https://stackoverflow.com/questions/52220159/how-many-maximum-number-of-simultaneous-chrome-connections-threads-i-can-start-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!