On Tue, 2015-03-10 at 21:59 +0100, Andy Wingo wrote: > On Thu 26 Feb 2015 08:51, Nala Ginrut <[email protected]> writes: > > > 3. I have to mention that the current inner server is not non-block and > > weak for slow-header-DDOS. > > Indeed. I think the right solution is cothreads. What do you think? >
Yes, it's my answer too. ;-) For more clearly, NIO + cooperative threads. If it's BIO, then it works fine with normal/good requests, but halts with the intended tricky formatted bad requests. Sometimes it could halt long time when you upload bigger file. That's what current Artanis suffering from. But could be solved easily with Nginx reverse-proxy. Anyway, this issue is not only about NIO, there're large room for optimizing though. > > PS: To those who care, unfortunately, Guile has no epoll/kqueue yet, > > that's one of the reasons why I want to write new server core for > > Artanis. ;-) > > The wip-ethreads branch has something like this. Perhaps that could > serve for inspiration :) Yes, it's good start for me. Years ago, Mark once gave me a warn that a good non-blocking design may need to change something in Guile-core, especially ports. But it's not an easy work to make the whole Guile support non-blocking in short time. Dunno if it's still true for current Guile. My plan is to provide restricted non-blocking I/O cautiously. Of course, I'm optimistic to expect Guile support better non-blocking from long term perspective. ;-)
