From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: Handling HTTP "Upgrade" requests Date: Wed, 11 Mar 2015 11:55:02 +0800 Organization: HFG Message-ID: <1426046102.2941.59.camel@Renee-desktop.suse> References: <87wq3aan0s.fsf@fsf.org> <1424840743.14360.18.camel@Renee-desktop.suse> <8dvbiqufhr.fsf@freestation00.office.fsf.org> <1424937100.7013.37.camel@Renee-desktop.suse> <87zj7ky3fv.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1426046144 11311 80.91.229.3 (11 Mar 2015 03:55:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2015 03:55:44 +0000 (UTC) Cc: Dave Thompson , guile-devel@gnu.org, David Thompson To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Mar 11 04:55:36 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YVXjs-0007sX-NX for guile-devel@m.gmane.org; Wed, 11 Mar 2015 04:55:20 +0100 Original-Received: from localhost ([::1]:52540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVXjs-0004KG-3s for guile-devel@m.gmane.org; Tue, 10 Mar 2015 23:55:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVXjo-0004K4-B8 for guile-devel@gnu.org; Tue, 10 Mar 2015 23:55:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVXjk-0005GY-Vt for guile-devel@gnu.org; Tue, 10 Mar 2015 23:55:16 -0400 Original-Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:44611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVXjk-0005Fy-Oo; Tue, 10 Mar 2015 23:55:12 -0400 Original-Received: by padet14 with SMTP id et14so7748201pad.11; Tue, 10 Mar 2015 20:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:mime-version:content-transfer-encoding; bh=m+eEEdzmVAOUQYODZBixjm3pzfrIc0u5qLn2T9wXDN4=; b=DFBZcAz9bSudOm0sAbJN2a7PI0b8it1Fwy7QsyDROGJ6KlxlPuK/t1EqgVIP9ihCMk XBe4sx24SDFSyHIaYIu/NNLW/sfPTNbyzl9cbu4QZgNPtcAmA3bKHfa4D0a1VTtJOIPT UtsmkSUmunrbtIQ30ajXntFc5vDKGDgRIP4M0voN6VfakZ2kchY1zmV1tcO5sKMu0xLV Ku/eF7OrVchmplpqXP5EBLAF3lCfTqJOIxwgIewbkhulSPsbvFTAHbyPULERzREkRkOb 2QHfyG5jdwds8xlJ0r/hMc1lVe/bN6lpPnsmyIUUCz6OyIfqGsag6P6fGK//d/i4ZTv5 p76Q== X-Received: by 10.66.102.65 with SMTP id fm1mr72779381pab.115.1426046111045; Tue, 10 Mar 2015 20:55:11 -0700 (PDT) Original-Received: from [147.2.147.174] ([203.192.156.9]) by mx.google.com with ESMTPSA id ji6sm3422274pac.30.2015.03.10.20.55.06 (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 10 Mar 2015 20:55:09 -0700 (PDT) In-Reply-To: <87zj7ky3fv.fsf@pobox.com> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::229 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17697 Archived-At: On Tue, 2015-03-10 at 21:59 +0100, Andy Wingo wrote: > On Thu 26 Feb 2015 08:51, Nala Ginrut 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. ;-)