Files | Admin

Notes:

Release Name: 2.0.0

Notes:
Rainbows! is an HTTP server for sleepy Rack applications.  It is based on
Unicorn, but designed to handle applications that expect long
request/response times and/or slow clients.

* http://rainbows.rubyforge.org/
* rainbows-talk@rubyforge.org
* git://git.bogomips.org/rainbows.git

Changes:

This release is targeted at the minority of web applications
that deal heavily with uploads.

Thanks to Unicorn 3.x, we now support HTTP keepalive for
requests with bodies as long as the application consumes them.
Unicorn 3.x also allows disabling the rewindability requirement
of "rack.input" (in violation of the Rack 1.x spec).

The global client_body_max_size may also be applied per-endpoint
using the Rainbows::MaxBody middleware described in:

  http://rainbows.rubyforge.org/Rainbows/MaxBody.html



Changes: GIT-VERSION-GEN | 2 +- Rakefile | 10 +- lib/rainbows.rb | 1 - lib/rainbows/client.rb | 4 +- lib/rainbows/const.rb | 2 +- lib/rainbows/dev_fd_response.rb | 2 +- lib/rainbows/ev_core.rb | 7 +- lib/rainbows/event_machine.rb | 1 - lib/rainbows/fiber/base.rb | 13 -- lib/rainbows/fiber/body.rb | 2 +- lib/rainbows/fiber/io.rb | 51 ++++++--- lib/rainbows/fiber/io/methods.rb | 4 +- lib/rainbows/fiber/rev/methods.rb | 23 ++--- lib/rainbows/http_server.rb | 26 +++-- lib/rainbows/max_body.rb | 105 +++++++++--------- lib/rainbows/max_body/rewindable_wrapper.rb | 18 +++ lib/rainbows/max_body/wrapper.rb | 70 ++++++++++++ lib/rainbows/never_block.rb | 7 +- lib/rainbows/process_client.rb | 17 +-- lib/rainbows/rev/client.rb | 18 +++- lib/rainbows/rev/master.rb | 15 ++- lib/rainbows/rev/thread.rb | 1 - lib/rainbows/revactor.rb | 9 +- lib/rainbows/tee_input.rb | 18 --- lib/rainbows/{read_timeout.rb => timed_read.rb} | 16 +-- lib/rainbows/writer_thread_pool.rb | 4 + lib/rainbows/writer_thread_spawn.rb | 4 + rainbows.gemspec | 2 +- t/sha1-random-size.ru | 24 +++- t/t0013-reload-bad-config.sh | 8 +- t/t0014-config-conflict.sh | 8 +- t/t0018-reload-restore-settings.sh | 53 +++++++++ t/t0104-rack-input-limit-tiny.sh | 134 ++++++++++++++++++++++- t/t0105-rack-input-limit-bigger.sh | 2 + t/test-lib.sh | 25 ++++ t/test_isolate.rb | 4 +- 36 files changed, 511 insertions(+), 199 deletions(-) commit 90789761f0cc78d3726f3a2eda1c5fe95c015ac2 Author: Eric Wong Date: Fri Nov 19 19:09:59 2010 -0800 Rainbows! 2.0.0 - minority rules! This release is targeted at the minority of web applications that deal heavily with uploads. Thanks to Unicorn 3.x, we now support HTTP keepalive for requests with bodies as long as the application consumes them. Unicorn 3.x also allows disabling the rewindability requirement of "rack.input" (in violation of the Rack 1.x spec). The global client_body_max_size may also be applied per-endpoint using the Rainbows::MaxBody middleware described in: http://rainbows.rubyforge.org/Rainbows/MaxBody.html commit c33878ac0f9f990aaa2054f8f00674d61bf5c848 Author: Eric Wong Date: Sat Nov 20 03:10:09 2010 +0000 tests: depend on Unicorn 3.0.0 Unicorn 3.0.0 is final and released, so we will use it in our tests commit a5986295bfb7bd7c44c863e4670f16481097c7fc Author: Eric Wong Date: Fri Nov 19 18:55:06 2010 -0800 revactor: fix braindamaged commit/coding style Oops, last commit was rushed commit da9dfc1dece4fbcdf2a8e8ccdb4914ce4aa3a998 Author: Eric Wong Date: Fri Nov 19 18:39:02 2010 -0800 simpler keepalive check for synchronous models Unicorn 3.x includes HttpParser#next? which will reset the parser for keepalive requests without extra steps. commit c6ffae22748bc22d5ef88fea2a3ca67f480ee74b Author: Eric Wong Date: Fri Nov 19 10:19:45 2010 +0000 max_body: rewrite wrappers to be safer To avoid denial-of-service attacks, the wrappers need to intercept requests *before* they hit the memory allocator, so we need to reimplement the read(all) and gets cases to use smaller buffers whenever the application does not specify one. commit 3cee07d750f678af92318c14110c803be3f9b97f Author: Eric Wong Date: Fri Nov 19 10:19:44 2010 +0000 max_body: do not enable for RevThread* models Those already use CapInput, just like the rest of the evented Rainbows! world. commit 00b854e37391322c05cc16115b245d855b4970be Author: Eric Wong Date: Fri Nov 19 10:19:43 2010 +0000 upgrade to Kgio 2.x and Unicorn 3.x Kgio 2.0.0 has a superior API and less likely to conflict or blow up with other applications. Unicorn 3.x requires Kgio 2.x, too. commit 0f00424be24806791f2b253ddac6d35102842646 Author: Eric Wong Date: Wed Nov 17 10:06:45 2010 -0800 test_isolate: depend on newer Unicorn It allows disabling rewindable input and contains simpler code for upload processing. commit 31cf77e7aa2f2e6065e7ace44e55c3f042b51f1b Author: Eric Wong Date: Tue Nov 16 16:16:42 2010 -0800 reimplement client_max_body_size handlers This allows the client_max_body_size implementation to not rely on Unicorn::TeeInput internals, allowing it to be used with Unicorn::StreamInput (or any other (nearly) Rack::Lint-compatible input object). commit 42747db815ad668b20849afb2a9dcdd1319713ae Author: Eric Wong Date: Tue Nov 2 12:32:23 2010 -0700 avoid Errno::EAGAIN, harder Errno::EAGAIN is still a problem under Ruby 1.9.2, so try harder to avoid it and use kgio methods. Even when 1.9.3 is available, kgio will still be faster as exceptions are slower than normal return values. commit 427ef4a2953a4b2d34f7dd89566a0cb5ee6e734d Author: Eric Wong Date: Tue Nov 2 11:49:17 2010 -0700 avoid Kgio::WaitReadable/WaitWritable constants The underlying symbolic names are easier to type and recommended. commit ed3a30dcfb5489447dec9c3f73e8bec9dbf7713a Author: Eric Wong Date: Thu Nov 4 19:52:35 2010 -0700 process_client: fix attempted keepalive on HTTP 0.9 The long-term goal is to make the Unicorn API more terse when handling keepalive. commit 9f185041fb7af4cda21ba2d547fd4d16d9b2e453 Author: Eric Wong Date: Thu Oct 28 08:42:09 2010 +0000 Rainbows! 1.0.0 - internal cleanups This release is merely a milestone in our evolving internal API. Use of kgio may result in performance improvements under Ruby 1.9.2 with non-blocking I/O-intensive workloads. The only bugfix is that SIGHUP reloads restores defaults on unset settings. A similar fix is included in Unicorn 2.0.0 as well. commit 015635f877084cc05a9e6e4c1430c70279d0a04e Author: Eric Wong Date: Thu Oct 28 08:40:12 2010 +0000 tests: avoid race conditions on reload tests We need to ensure the old worker is really dead before sending requests after reloading. commit b06c6b3ac214bc598d499c994884113d5b106e90 Author: Eric Wong Date: Thu Oct 28 08:29:53 2010 +0000 t0018: wait for old worker to be reaped On busy machines, old workers may not shutdown quickly enough and may still be processing requests. commit f84f138233be0607b0151a5a28c3f9190ba336a2 Author: Eric Wong Date: Thu Oct 28 08:20:37 2010 +0000 rev+event_machine: small cleanups with new parser API These allow for small reductions in the amount of variables we have to manage, more changes coming with later Unicorns. commit c4579db76b9ed5b0286fad852e798e8a890f093c Author: Eric Wong Date: Thu Oct 28 02:17:25 2010 +0000 HUP reload restores defaults on unset settings For consistency, changed settings are reset back to their default values if they are removed or commented out from the config file. commit 83644e02068311c7ff9cdbc63efd4764d1518138 Author: Eric Wong Date: Wed Oct 27 23:52:28 2010 +0000 use Unicorn 2.0.0 final Unicorn 2.0.0 has CPU wakeup reductions. commit 2b9503566759678c9fbd7b01d1b5f487854208db Author: Eric Wong Date: Tue Oct 26 21:36:02 2010 +0000 Rakefile: updates for prereleases We do prereleases, now.