From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 576961FE3D for ; Fri, 3 Jun 2016 01:28:09 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH 0/2] proxy_pass: allow disabling proxy buffering Date: Fri, 3 Jun 2016 01:28:35 +0000 Message-Id: <20160603012837.19143-1-e@80x24.org> List-Id: The code still feels iffy, but I think it mostly works. At least the https:// version of YHBT.net is running it and it doesn't seem to be falling over. I'll beat on it a bit more over the next few days. The purpose of this is to be able to support streaming gigantic responses from backend servers which are already capable of handling slow clients. So this slows down the rate at which yahns will read from the backend to provide backpressure for the upstream server. lib/yahns/proxy_http_response.rb | 87 ++++++++++++-------- lib/yahns/proxy_pass.rb | 6 +- lib/yahns/req_res.rb | 14 ++++ lib/yahns/wbuf.rb | 5 +- lib/yahns/wbuf_common.rb | 2 +- test/test_proxy_pass_no_buffering.rb | 149 +++++++++++++++++++++++++++++++++++ 6 files changed, 223 insertions(+), 40 deletions(-) Eric Wong (2): proxy_pass: pass entire object to proxy_http_response proxy_pass: support "proxy_buffering: false"