* [ANN] yahns 1.13.0 -_- sleepy app server for Ruby
@ 2016-08-05 7:44 5% Eric Wong
0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2016-08-05 7:44 UTC (permalink / raw)
To: ruby-talk; +Cc: yahns-public
A Free Software, multi-threaded, non-blocking network
application server designed for low _idle_ power consumption.
It is primarily optimized for applications with occasional users
which see little or no traffic. yahns currently hosts Rack/HTTP
applications, but may eventually support other application
types. Unlike some existing servers, yahns is extremely
sensitive to fatal bugs in the applications it hosts.
* git clone git://yhbt.net/yahns
* https://yahns.yhbt.net/README
* https://yahns.yhbt.net/NEWS.atom.xml
* we only accept plain-text email yahns-public@yhbt.net
* and archive all the mail we receive: https://yhbt.net/yahns-public/
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
lrg nabgure ubeevoyl-anzrq freire :>
Changes:
yahns 1.13.0 - some user-visible improvements...
And probably a billion new regressions!
yahns now allows users to skip the Rack::Head, Rack::Chunked and
Rack::ContentLength middlewares to ease migrating from/to other
real-world Rack HTTP servers. Most notably, our chunked
encoding implementation is a bit faster than Rack::Chunked by
taking advantage of the writev(2) syscall:
https://yhbt.net/yahns-public/20160803031906.14553-4-e@80x24.org/
There's also rack 2.x fixes in the test case and extras/ section
(these incompatibilities did not affect existing users unless
they use the wonky extras/ section).
There's also some graceful shutdown fixes, the process title is
now changed to display the number of live FDs.
Of course, there's the usual round of documentation improvements
which are systemd and OpenSSL setup-related this time around.
However, the majority of changes (proxy_*, wbuf_lite), affect
currently-unadvertised functionality which is subject to removal
or incompatible config changes. However, they are used to serve
our mailing list archives at:
https://yhbt.net/yahns-public/
49 changes since yahns 1.12.5:
proxy_pass: simplify writing request bodies upstream
proxy_pass: hoist out proxy_res_headers method
proxy_pass: simplify proxy_http_response
proxy_pass: split out body and trailer reading in response
proxy_pass: trim down proxy_response_finish, too
proxy_pass: split out req_res into a separate file
proxy_pass: fix resumes after complete buffering is unblocked
proxy_pass: X-Forwarded-For appends to existing list
proxy_pass: pass entire object to proxy_http_response
proxy_pass: support "proxy_buffering: false"
proxy_pass: remove unnecessary rescue
req_res: store proxy_pass object here, instead
proxy_pass: redo "proxy_buffering: false"
wbuf: remove needless "busy" parameter
Merge branch 'maint'
extras/try_gzip_static: do not show backtrace on syscall errors
wbuf: remove tmpdir parameter
wbuf_lite: fix write retries for OpenSSL sockets
test_proxy_pass_no_buffering: fix racy test
queue_*: check for closed IO objects
cleanup graceful shutdown handling
proxy_pass: more descriptive error messages
proxy_pass: fix HTTP/1.0 backends on EOF w/o buffering
wbuf_common: reset offset counter when done
extras/try_gzip_static: resolve symlinks
test_ssl: remove unnecessary priv_key DH parameter
openssl_client: wrap shutdown for graceful termination
proxy_pass: keep trailer buffer on blocked client writes
proxy_pass: avoid TOCTTOU race when unbuffering, too
proxy_pass: avoid accessing logger in env after hijacking
proxy_pass: avoid stuck responses in "proxy_buffering: false"
extras: include status messages in responses
update init and add systemd examples
test_proxy_pass_no_buffering: exclude rb/ru files, too
wbuf_lite: use StringIO instead of TmpIO
wbuf_lite: truncate StringIO when done
wbuf_lite: prevent clobbering responses
wbuf_lite: unify EOF error handling
wbuf_lite: reset sf_offset/sf_count consistently
wbuf_lite: clear @busy flag when re-arming
http_response: drop bodies for non-compliant responses
fix rack 2.x compatibility bugs
doc: add session cache usage to OpenSSL example
test: skip some buffering tests on non-default values
response: drop clients after HTTP responses of unknown length
response: reduce stack overhead for parameter passing
response: support auto-chunking for HTTP/1.1
Revert "document Rack::Chunked/ContentLength semi-requirements"
extras/exec_cgi: fix for HTTPoxy vulnerability
Please note the disclaimer:
yahns is extremely sensitive to fatal bugs in the apps it hosts. There
is no (and never will be) any built-in "watchdog"-type feature to kill
stuck processes/threads. Each yahns process may be handling thousands
of clients; unexpectedly killing the process will abort _all_ of those
connections. Lives may be lost!
yahns hackers are not responsible for your application/library bugs.
Use an application server which is tolerant of buggy applications
if you cannot be bothered to fix all your fatal bugs.
--
EW
^ permalink raw reply [relevance 5%]
* [PATCH 4/4] Revert "document Rack::Chunked/ContentLength semi-requirements"
2016-08-03 3:19 7% [PATCH 0/4] remove chunked/Content-Length requirement from apps Eric Wong
@ 2016-08-03 3:19 7% ` Eric Wong
0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2016-08-03 3:19 UTC (permalink / raw)
To: yahns-public
Actually, I guess I misread, rack (starting at) 1.0 stopped
requiring Content-Length/Chunked headers but I never noticed.
Oh well.
This reverts commit 4968041a7e1ff90b920704f50fccb9e7968d0d99.
---
Documentation/yahns-rackup.pod | 10 ----------
examples/yahns_rack_basic.conf.rb | 6 ------
2 files changed, 16 deletions(-)
diff --git a/Documentation/yahns-rackup.pod b/Documentation/yahns-rackup.pod
index 6172661..efdfb6d 100644
--- a/Documentation/yahns-rackup.pod
+++ b/Documentation/yahns-rackup.pod
@@ -159,16 +159,6 @@ The RACK_ENV variable is set by the aforementioned -E switch.
If RACK_ENV is already set, it will be used unless -E is used.
See rackup documentation for more details.
-=head1 CAVEATS
-
-yahns is strict about buggy, non-compliant Rack applications.
-Some existing servers work fine without "Content-Length" or
-"Transfer-Encoding: chunked" response headers enforced by Rack::Lint.
-Forgetting these headers with yahns causes clients to stall as they
-assume more data is coming. Loading the Rack::ContentLength and/or
-Rack::Chunked middlewares will set the necessary response headers
-and fix your app.
-
=head1 CONTACT
All feedback welcome via plain-text mail to L<mailto:yahns-public@yhbt.net>
diff --git a/examples/yahns_rack_basic.conf.rb b/examples/yahns_rack_basic.conf.rb
index 610a482..f3f8e6a 100644
--- a/examples/yahns_rack_basic.conf.rb
+++ b/examples/yahns_rack_basic.conf.rb
@@ -30,12 +30,6 @@
worker_threads 50
end
-# note: Rack requires responses set "Content-Length" or use
-# "Transfer-Encoding: chunked". Some Rack servers tolerate
-# the lack of these, yahns does not. Thus you should load
-# Rack::Chunked and/or Rack::ContentLength middleware in your
-# config.ru to ensure clients know when your application
-# responses terminate.
app(:rack, "config.ru", preload: false) do
listen 80
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] remove chunked/Content-Length requirement from apps
@ 2016-08-03 3:19 7% Eric Wong
2016-08-03 3:19 7% ` [PATCH 4/4] Revert "document Rack::Chunked/ContentLength semi-requirements" Eric Wong
0 siblings, 1 reply; 5+ results
From: Eric Wong @ 2016-08-03 3:19 UTC (permalink / raw)
To: yahns-public
This better aligns with behavior of other real-world Rack
servers such as puma and Thin. We will also now use kgio writev
functionality to speed up writing "Transfer-Encoding: chunked"
to avoid string copies or extra syscalls for other chunking
solutions.
See [PATCH 3/4] for a small informal benchmark.
4 changes
response: drop clients after HTTP responses of unknown length
response: reduce stack overhead for parameter passing
response: support auto-chunking for HTTP/1.1
Revert "document Rack::Chunked/ContentLength semi-requirements"
Documentation/yahns-rackup.pod | 10 -------
examples/yahns_rack_basic.conf.rb | 6 -----
lib/yahns/chunk_body.rb | 27 +++++++++++++++++++
lib/yahns/http_client.rb | 24 ++++++++---------
lib/yahns/http_response.rb | 47 +++++++++++++++++++++++---------
test/test_auto_chunk.rb | 56 +++++++++++++++++++++++++++++++++++++++
test/test_extras_exec_cgi.rb | 4 +--
7 files changed, 130 insertions(+), 44 deletions(-)
create mode 100644 lib/yahns/chunk_body.rb
create mode 100644 test/test_auto_chunk.rb
--
EW
^ permalink raw reply [relevance 7%]
* [ANN] yahns 1.12.4 -_- sleepy app server for Ruby
@ 2016-05-02 19:47 5% ` Eric Wong
0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2016-05-02 19:47 UTC (permalink / raw)
To: ruby-talk, yahns-public
A Free Software, multi-threaded, non-blocking network
application server designed for low _idle_ power consumption.
It is primarily optimized for applications with occasional users
which see little or no traffic. yahns currently hosts Rack/HTTP
applications, but may eventually support other application
types. Unlike some existing servers, yahns is extremely
sensitive to fatal bugs in the applications it hosts.
* git clone git://yhbt.net/yahns
* https://yahns.yhbt.net/README
* https://yahns.yhbt.net/NEWS.atom.xml
* we only accept plain-text email yahns-public@yhbt.net
* and archive all the mail we receive: https://yhbt.net/yahns-public/
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
Changes:
yahns 1.12.4 - rack.hijack and proxy_pass bugfixes
This release fixes some resource leaks in uncommonly used parts
of yahns as well as including some documentation improvements.
No need to upgrade unless you rely on rack.hijack for responses
or use the (currently-undocumented) proxy_pass module(*).
9 non-merge changes since 1.12.3:
proxy_pass: honor wbuf_persist when ending response
proxy_http_response: fix non-terminated fast responses, too
test_proxy_pass: test for auto chunking on 1.0 backends
wbuf: drop persistence if writing to client fails
proxy_http_response: cleanup: avoid redundant setting of "alive"
proxy_http_response: do not persist upstream on slow clients
proxy_pass: drop resources immediately on errors
document Rack::Chunked/ContentLength semi-requirements
extras/exec_cgi: document cgit example
Documentation/yahns-rackup.pod | 10 ++++++++++
GIT-VERSION-GEN | 2 +-
examples/yahns_rack_basic.conf.rb | 6 ++++++
extras/exec_cgi.rb | 8 ++++++++
lib/yahns/proxy_http_response.rb | 40 ++++++++++++++++++++++-----------------
lib/yahns/proxy_pass.rb | 5 +++--
lib/yahns/wbuf_common.rb | 1 +
test/test_proxy_pass.rb | 15 +++++++++++++++
8 files changed, 67 insertions(+), 20 deletions(-)
(*) 1.13.0 will include refactoring in proxy_pass and possibly
documenting it as stable-enough-for-public use:
https://yhbt.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/t/
Please note the disclaimer:
yahns is extremely sensitive to fatal bugs in the apps it hosts. There
is no (and never will be) any built-in "watchdog"-type feature to kill
stuck processes/threads. Each yahns process may be handling thousands
of clients; unexpectedly killing the process will abort _all_ of those
connections. Lives may be lost!
yahns hackers are not responsible for your application/library bugs.
Use an application server which is tolerant of buggy applications
if you cannot be bothered to fix all your fatal bugs.
^ permalink raw reply [relevance 5%]
* [PATCH] document Rack::Chunked/ContentLength semi-requirements
@ 2016-04-29 7:57 7% Eric Wong
0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2016-04-29 7:57 UTC (permalink / raw)
To: yahns-public
Ugh, it sucks that other servers are so tolerant of violations
of the Rack spec. Rainbows! had the same problem:
https://bogomips.org/rainbows-public/20140704195032.GA13152@dcvr.yhbt.net/
---
Comments on wording clarity? Asynchronous spaghetti messed me brain up :X
Documentation/yahns-rackup.pod | 10 ++++++++++
examples/yahns_rack_basic.conf.rb | 6 ++++++
2 files changed, 16 insertions(+)
diff --git a/Documentation/yahns-rackup.pod b/Documentation/yahns-rackup.pod
index efdfb6d..6172661 100644
--- a/Documentation/yahns-rackup.pod
+++ b/Documentation/yahns-rackup.pod
@@ -159,6 +159,16 @@ The RACK_ENV variable is set by the aforementioned -E switch.
If RACK_ENV is already set, it will be used unless -E is used.
See rackup documentation for more details.
+=head1 CAVEATS
+
+yahns is strict about buggy, non-compliant Rack applications.
+Some existing servers work fine without "Content-Length" or
+"Transfer-Encoding: chunked" response headers enforced by Rack::Lint.
+Forgetting these headers with yahns causes clients to stall as they
+assume more data is coming. Loading the Rack::ContentLength and/or
+Rack::Chunked middlewares will set the necessary response headers
+and fix your app.
+
=head1 CONTACT
All feedback welcome via plain-text mail to L<mailto:yahns-public@yhbt.net>
diff --git a/examples/yahns_rack_basic.conf.rb b/examples/yahns_rack_basic.conf.rb
index f3f8e6a..610a482 100644
--- a/examples/yahns_rack_basic.conf.rb
+++ b/examples/yahns_rack_basic.conf.rb
@@ -30,6 +30,12 @@
worker_threads 50
end
+# note: Rack requires responses set "Content-Length" or use
+# "Transfer-Encoding: chunked". Some Rack servers tolerate
+# the lack of these, yahns does not. Thus you should load
+# Rack::Chunked and/or Rack::ContentLength middleware in your
+# config.ru to ensure clients know when your application
+# responses terminate.
app(:rack, "config.ru", preload: false) do
listen 80
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-5 of 5 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-04-08 20:01 [ANN] yahns 1.12.3 -_- sleepy app server for Ruby Eric Wong
2016-05-02 19:47 5% ` [ANN] yahns 1.12.4 " Eric Wong
2016-04-29 7:57 7% [PATCH] document Rack::Chunked/ContentLength semi-requirements Eric Wong
2016-08-03 3:19 7% [PATCH 0/4] remove chunked/Content-Length requirement from apps Eric Wong
2016-08-03 3:19 7% ` [PATCH 4/4] Revert "document Rack::Chunked/ContentLength semi-requirements" Eric Wong
2016-08-05 7:44 5% [ANN] yahns 1.13.0 -_- sleepy app server for Ruby Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).