Welcome! Log In Create A New Profile

Advanced

Re: nginx and Apache killer

Maxim Dounin
August 28, 2011 04:24PM
Hello!

On Sun, Aug 28, 2011 at 04:48:59PM +0000, Venky Shankar wrote:

> >
> > Not really. The problem in Apache is not "not merging", but O(N^2)
> > memory consumption while handling Range requests, where N - number
> > of ranges requested.
> >
>
> Sure, but it hits even badly when it does not check overlapping/same range
> request.

O(N^2) in Apache is only possible with overlapping ranges. It
doesn't mean though that handling overlapping ranges isn't
possible without O(N^2) memory consumption, this is how such
handling is implemented in Apache. (And the patch I linked
actually fixes memory consumption to be O(N).)

> I guess nginx would send back 416 when it
> encounters overlapping ranges (?) and the patch from Igor takes care of
> exceeding content length case.

No, overlapped ranges are perfectly ok in nginx, you are free to
request them and your request will likely be satisfied. While
they don't really make sense from theoretical point of view I
would expect some sloppy software to actually use them.

> > See here for more information:
> >
> > http://permalink.gmane.org/gmane.comp.apache.devel/45196
> > http://permalink.gmane.org/gmane.comp.apache.devel/45290
> >
> > With nginx you are safe: there is no O(N^2) memory consumption.
> > Additionally, it won't do any actual data processing with HEAD
> > requests as used in attacking script in question.
> >
>
> But GET involves data processing. But as you said since there is no O(N*2)
> [or the like] memory consumption with nginx, even GET requests are safe.

Yes.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx and Apache killer

Igor Sysoev August 27, 2011 04:12AM

Re: nginx and Apache killer

Juan Angulo Moreno August 27, 2011 10:06PM

Re: nginx and Apache killer

Maxim Dounin August 28, 2011 04:48AM

Re: nginx and Apache killer

Venky Shankar August 28, 2011 05:44AM

Re: nginx and Apache killer

Maxim Dounin August 28, 2011 10:26AM

Re: nginx and Apache killer

Venky Shankar August 28, 2011 12:50PM

Re: nginx and Apache killer

Maxim Dounin August 28, 2011 04:24PM

Re: nginx and Apache killer

Gena Makhomed August 28, 2011 10:20AM

Re: nginx and Apache killer

Maxim Dounin August 28, 2011 12:38PM

Re: nginx and Apache killer

Gena Makhomed August 28, 2011 04:40PM

Re: nginx and Apache killer

Maxim Dounin August 28, 2011 08:16PM

Re: nginx and Apache killer

Gena Makhomed August 29, 2011 02:32PM

Re: nginx and Apache killer

Igor Sysoev August 29, 2011 02:48PM

Re: nginx and Apache killer

Danran February 23, 2023 11:44AM

Re: nginx and Apache killer

Jim Ohlstein September 01, 2011 08:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready