httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Graute <oliver.gra...@gmail.com>
Subject Re: [users@httpd] Howto accept only one connection
Date Fri, 19 Feb 2016 16:07:25 GMT
On 19/02/16, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Oliver,
> 
> On 2/19/16 10:11 AM, Oliver Graute wrote:
> > On 19/02/16, Aurélien Terrestris wrote:
> >> Hello,
> >> 
> >> I'm not sure we can accept only one connection at a given time. I
> >> tested with the "prefork MPM", and I only achieve 1 concurrent
> >> request being processed at a given time and all others requests
> >> are buffered (ListenBackLog doesn't seem to work on my server).
> >> Once the 1st request has been processed, the other ones are
> >> processed one after the other.
> >> 
> >> If running on a Linux, maybe should you configure the iptables to
> >> limit connections to 1 for the httpd port. Behind a F5
> >> loadbalancer, there is the Connection Limit parameter on the
> >> virtual server which can be set.
> >> 
> >> 
> >> my httpd conf :
> >> 
> >> ./configure .....  --with-mpm=prefork
> >> 
> >> <IfModule mpm_prefork_module> StartServers             1 
> >> MinSpareServers          1 MaxSpareServers          0 
> >> MaxRequestWorkers        1 MaxConnectionsPerChild   0 
> >> ListenBacklog            1 ServerLimit              1 
> >> </IfModule>
> > 
> > thx for this proposal, i will try it this way...
> 
> I'm kind of curious why you are using Apache httpd if you just want a
> single connection to be available. Anyone can write a
> single-connection HTTP service in about two pages of higher-level
> source code (e.g. Python, Java, C#, maybe even Perl). This is a bit
> like using a Saturn V rocket to launch a weather balloon.

I know that using apache is a bit curious for a embedded device. But
today the performance of such an device is like a PC 10 years ago. The
costumer needs features like php, mod_nss, json on top of this webserver.
Apache met all of these and using apache is a requirement to.

> For a single connection, make sure that you disable keepalive -- or at
> least set the keep alive timeout to something small, like 1 second.
> Otherwise, you'll DOS yourself quite easily. I would also set the TCP
> backlog to something small. Maybe as little as 1 (or 0, if that
> doesn't actually mean "backlog until we run out of memory").

ok i'll try

Best regards,

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message