Mobile app version of vmapp.org
Login or Join
Odierno851

: What is the meaning of "25 simultaneous connections for an extended or consistent period of time" What is the meaning of following statement? A shared server should not have more than 25 simultaneous

@Odierno851

Posted in: #WebHosting

What is the meaning of following statement?

A shared server should not have more than 25 simultaneous connections for an extended or consistent period of time.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

1 Comments

Sorted by latest first Latest Oldest Best

 

@Welton855

A shared server should not have more than 25 simultaneous connections for an extended or consistent period of time.


Assuming


this statement is made in the context of a webserver serving webpages for a website or web application,
the context was 25 connections per user account on a shared host - knowing there would be anything from 5 to 30 other accounts on the machine


Then its purpose is most likely a guideline to prevent users exceeding the servers memory resources.
Likely also to prevent overloading other resources such as CPU.

When a browser wants to request a webpage from a server - it must first establish TCP connections with that server (lets assume apache as its the most common). Typically the browser will establish about 6-8 TCP connections.
It is these TCP connections over which HTTP requests and responses travel. HTTP is the protocol which contains the HTML and javascript files, images etc.
One of the less desirable characteristics of Apache is that everytime it establishes a TCP connection with a browser it needs to load the "apache program" into memory - for every connection.
How much memory per connection apache consumes varies alot and is determined by how many modules are loaded into apache: rewrite, logging, authentication etc, also whether the pages are static or CGI scripts like PHP, Ruby, etc and also the MPM - mulitprocessing module Apache is using, options being


prefork
worker
event


Taking a default configuration of Apache 2.4 as a baseline. In order to prevent apache consuming too much memory and causing the server to page RAM (very bad) apache defines an upper threshold on connections it will hold open using the MaxRequestWorkers directive


The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served. Any connection attempts over the MaxRequestWorkers limit will normally be queued, up to a number based on the ListenBacklog directive.


This is set at 150 by default, so when you consider you have to share these 150 connections amongst the other users the 25 connections per user account is not unreasonable.
This obviously varies by many orders of magnitude from site to site and server to server, but hopefully this gives some background into how and why the host provider would recommend you stay within those limits.

For anyone wanting more background this is the best introduction I have read on the subject - www.nginx.com/blog/http-keepalives-and-web-performance/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme