From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.0 required=5.0 tests=none shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: archivist@yhbt.net Delivered-To: archivist@dcvr.yhbt.net Received: from rubyforge.org (50-56-192-79.static.cloud-ips.com [50.56.192.79]) by dcvr.yhbt.net (Postfix) with ESMTP id 6DB221F452 for ; Tue, 30 Oct 2012 20:40:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 2042B2E06F; Tue, 30 Oct 2012 20:40:28 +0000 (UTC) X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) by rubyforge.org (Postfix) with ESMTP id 106832E06D for ; Tue, 30 Oct 2012 20:40:23 +0000 (UTC) Received: by mail-oa0-f50.google.com with SMTP id n16so896706oag.23 for ; Tue, 30 Oct 2012 13:40:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=i/hH889SetDxia2Cf+nUlTDkicXHjvwXhQ+wkS3rIvY=; b=TskmeOqWWyWANCUhhdZ7IIjoU8tYOLmCKqvXzcw/pUuAZIsPCpAPzHkfaufByM3j8K 5y5cftq/1Nh4IpOp9DW6Qg80ljnSRaVN2dyOw+6msXbSBO0TIY7s748YvcDWi/Y+CRN2 BOyAom8CYNHpFim8EQiJtiYBuQk3zY9N11zYZtIIGmuHW5/yP6gKeOXMjqq/qeXnOZd8 4czNRDODLVcAJ8aq6qXADlaHAeh5LpjOeXtMI8teY9RuEzv2/tOSExz/DySlXgU6r3CG lgffF/EG3EWSXIPzz8pW/+4PVzSyvH2w9O9J2e6ECQlPSn/mHUzeiW4kKwsx0bwrwfp+ KhSg== MIME-Version: 1.0 Received: by 10.182.95.205 with SMTP id dm13mr29146595obb.9.1351629623763; Tue, 30 Oct 2012 13:40:23 -0700 (PDT) Received: by 10.60.4.65 with HTTP; Tue, 30 Oct 2012 13:40:23 -0700 (PDT) In-Reply-To: <20121029215312.GA29353@dcvr.yhbt.net> References: <20121029184549.GA9690@dcvr.yhbt.net> <20121029215312.GA29353@dcvr.yhbt.net> Date: Tue, 30 Oct 2012 16:40:23 -0400 Message-ID: Subject: Re: Combating nginx 499 HTTP responses during flash traffic scenario From: Tom Burns To: unicorn list X-Gm-Message-State: ALoCoQlI9oXvgwonG8ptikdEcW1T6Uxl32BjFPnLu76YgKoqySCirBLTMglsUMmod/Pr4KZlf/uy X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org On Mon, Oct 29, 2012 at 5:53 PM, Eric Wong wrote: > Maybe this gross hack can work for you guys. It writes the first > chunk of the HTTP response header out immediately after reading > the request headers, and sends the rest once it gets the status... I tested the patch today and it does what we want, dropping connections before passing them to the rails app when the client has already disconnected. I also benchmarked the patch to see if it had a negligible performance hit and it did not. The cost was absorbed by the variation in speed of the other components in the stack (nginx & rails). I noticed on my computer applying the patch breaks test_rack_lint_big_put in the unicorn test suite. This may be just my issue as the test suite does not run cleanly anyways if I checkout origin/master. We'd prefer to not have to fork unicorn for this change. How do you feel about merging this or a derivative thereof? I can develop this further if you can send me what you'd want. Cheers, Tom _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying