lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Jan 3, 2012, at 10:30 PM, Ashwin Hirschi wrote:

> If it does not, it risks being deemed not suitable for writing software for the web. I don't know about you, but I for one would not like to see that happen.


In the meantime, feel free  to break Nanoki, which sports an HTTP server implemented in pure Lua.

The HTTP implementation doesn't impose any limit of any kind and will happily attempt to process anything you throw at it [sic].

Relevant code:

Perhaps the easiest way would be to generate a simple HTTP request with a bunch of bogus headers hashing to the same as shown by Xavier Wang somewhere else in this thread.

Nanoki's about page is as good as any to use as a guinea pig:

The demo runs under the following setup, on a rather feeble piece of hardware:

exec bin/tcpserver -c 100 -qRHlOD 0 3388 bin/timelimit 60 bin/lua Nanoki.lua .

In other words, at most 100 connections (tcpserver [1]), for at most 60 seconds each (timelimit [2]).

The above page takes around 100ms to retrieve from my current network location. Lets us know once you managed to degrade the response time to 59 seconds using the aforementioned technique :)