Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up maximum of connections for web

Tags:

wildfly

In JBoss7 we've restricted number of web connections by using this

<connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https" secure="true" max-connections="3000">

for urn:jboss:domain:web:1.0 subsystem which is replaced by urn:jboss:domain:undertow:1.2 in the wildfly. How to setup max-connections in wildfly?

I went through the documentation and didn't find matching attribute.

Thanks

like image 981
Pat Avatar asked Apr 23 '15 14:04

Pat


People also ask

How many concurrent connections can a Web server handle?

With a single CPU core, a web server can handle around 250 concurrent requests at one time, so with 2 CPU cores, your server can handle 500 visitors at the same time. Getting the balance right between performance and cost is crucial as your site grows in popularity.

How many connections can chrome handle?

Chrome has a limit of 6 connections per host name, and a max of 10 connections.


1 Answers

The above comment from Federico Sierra is correct. But in Wildfly 10.x the filter name 'connection-limit' doesn't exist anymore. Instead it is now called 'request-limit'.

So for Wildfly 10.x add filter reference in the untertow subsystem inside 'server' and 'host' context and the request-limit filter inside the 'filters' context:

<subsystem xmlns="urn:jboss:domain:undertow:3.1">
[...]
  <server name="default-server">
  [...]
    <host name="default-host" alias="localhost">
    <location name="/" handler="welcome-content"/>
    [...]
      <filter-ref name="limit-connections"/>
    </host>
  </server>
[...]
  <filters>
    <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
    <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
    <request-limit name="limit-connections" max-concurrent-requests="3000" queue-size="100"/>
  </filters>
</subsystem>

Reference: https://github.com/wildfly/wildfly/blob/master/undertow/src/test/resources/org/wildfly/extension/undertow/undertow-3.1.xml

like image 124
Claudio Kuenzler Avatar answered Jan 26 '23 02:01

Claudio Kuenzler