From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: synchronous controllers taking 6 seconds in Eventmachine config Date: Wed, 15 Sep 2010 14:04:04 -0700 Message-ID: <20100915210404.GA21719@dcvr.yhbt.net> References: <2B157204-E5C6-4F5D-98A9-E2A79F9F9765@christophsturm.com> <20100915185007.GA13709@dcvr.yhbt.net> <97F7A036-4DA6-4CF3-B842-5870F7DE59E7@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1284586230 15763 80.91.229.12 (15 Sep 2010 21:30:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Sep 2010 21:30:30 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed Sep 15 23:30:29 2010 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline In-Reply-To: <97F7A036-4DA6-4CF3-B842-5870F7DE59E7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:132 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OvzYg-0001io-T4 for gclrrg-rainbows-talk@m.gmane.org; Wed, 15 Sep 2010 23:30:27 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 171A71678316 for ; Wed, 15 Sep 2010 17:30:25 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id A3670185835E for ; Wed, 15 Sep 2010 17:04:05 -0400 (EDT) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 167691F973; Wed, 15 Sep 2010 21:04:05 +0000 (UTC) James Tucker wrote: > Eric, you don't do actual keepalive do you, or am i thinking of > unicorn? Rainbows! has had keepalive and pipelining since the earliest releases for simple GET/HEAD requests. At least there are integration tests using curl that do keepalive, so it should work :) Keepalive for proxying sockets/pipes (without async.callback) has improved with recent releases, too. Rainbows! will support keepalive for all other body-less requests, too, and _maybe_ optionally supporting keepalive PUT/POST requests with a body. For requests with a body, the app must consume the entire body (which intentionally does not happen for "synchronous" concurrency models). Unicorn doesn't do keepalive since nginx doesn't do keepalive to backends, yet. That will change if nginx (or another comparable frontend emerges) supports keepalive to the backends. > If the request is sync, then you can close connection after body.each > returns, else you need to use the deferrable api callback in > deferrable bodies wiht the async api. The EM deferrable doesn't do keepalive right now, and may not ever because (I assume) it's used for long-polling and such. Setting "keepalive_timeout 0" for any app doing long-polling/Comet stuff is probably a good idea anyways, the client can't reliably know which requests take a long time. -- Eric Wong _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying