Files | Admin

Notes:

Release Name: 3.1.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://bogomips.org/rainbows.git

Changes:

Small bug fixes that have been sitting around, not much but
it's already been one month since our last release.

* Unicorn dependency updated to 3.4.0, so we get IPv6 support
  and Kgio.autopush support for ":tcp_nopush => true" users.

* Optional :pool_size argument is fixed for NeverBlock and
  CoolioThreadPool users.

* Mostly minor internal code cleanups

* Sunshowers support removed, it was out-of-date and
  unmaintained.  Cramp remains supported for now.

* X-Rainbows-* response headers support removed, nobody used it.

There are severalnew features in this release not documented
here.  Consider any new features not mentioned in these release
notes to be subject to removal/renaming in future releases.



Changes: .wrongdoc.yml | 4 +- Documentation/comparison.haml | 12 +- GIT-VERSION-GEN | 2 +- GNUmakefile | 144 ++----------- README | 5 +- Rakefile | 6 +- examples/reverse_proxy.ru | 9 + lib/rainbows.rb | 20 ++- lib/rainbows/base.rb | 1 - lib/rainbows/const.rb | 11 +- lib/rainbows/coolio/client.rb | 12 +- lib/rainbows/coolio/core.rb | 3 - lib/rainbows/coolio/thread_client.rb | 4 +- lib/rainbows/coolio_fiber_spawn.rb | 12 +- lib/rainbows/dev_fd_response.rb | 25 ++- lib/rainbows/epoll.rb | 43 ++++ lib/rainbows/epoll/client.rb | 232 +++++++++++++++++++++ lib/rainbows/epoll/response_chunk_pipe.rb | 18 ++ lib/rainbows/epoll/response_pipe.rb | 32 +++ lib/rainbows/epoll/server.rb | 31 +++ lib/rainbows/error.rb | 10 +- lib/rainbows/ev_core.rb | 24 +- lib/rainbows/ev_core/cap_input.rb | 2 +- lib/rainbows/event_machine.rb | 6 - lib/rainbows/event_machine/client.rb | 6 +- lib/rainbows/event_machine/response_chunk_pipe.rb | 12 +- lib/rainbows/event_machine/response_pipe.rb | 15 +- lib/rainbows/fiber/base.rb | 4 +- lib/rainbows/fiber/io.rb | 84 ++------ lib/rainbows/fiber/io/methods.rb | 2 +- lib/rainbows/http_server.rb | 8 +- lib/rainbows/join_threads.rb | 18 ++ lib/rainbows/max_body.rb | 3 +- lib/rainbows/max_body/wrapper.rb | 2 +- lib/rainbows/never_block/event_machine.rb | 4 +- lib/rainbows/process_client.rb | 10 +- lib/rainbows/queue_pool.rb | 4 +- lib/rainbows/rack_input.rb | 17 -- lib/rainbows/response.rb | 2 +- lib/rainbows/rev_fiber_spawn.rb | 8 +- lib/rainbows/revactor/client.rb | 9 +- lib/rainbows/revactor/proxy.rb | 2 +- lib/rainbows/reverse_proxy.rb | 189 +++++++++++++++++ lib/rainbows/reverse_proxy/coolio.rb | 61 ++++++ lib/rainbows/reverse_proxy/ev_client.rb | 39 ++++ lib/rainbows/reverse_proxy/event_machine.rb | 46 ++++ lib/rainbows/reverse_proxy/multi_thread.rb | 7 + lib/rainbows/reverse_proxy/synchronous.rb | 21 ++ lib/rainbows/sendfile.rb | 2 +- lib/rainbows/sync_close.rb | 4 +- lib/rainbows/thread_pool.rb | 2 +- lib/rainbows/writer_thread_pool.rb | 2 +- lib/rainbows/xepoll.rb | 24 ++ lib/rainbows/xepoll/client.rb | 45 ++++ pkg.mk | 171 +++++++++++++++ rainbows.gemspec | 6 +- t/GNUmakefile | 4 + t/bin/content-md5-put | 1 + t/kgio-pipe-response.ru | 10 +- t/rack-fiber_pool/app.ru | 7 +- t/simple-http_Epoll.ru | 9 + t/simple-http_XEpoll.ru | 9 + t/t0014-config-conflict.sh | 8 +- t/t0023-sendfile-byte-range.sh | 8 +- t/t0034-pipelined-pipe-response.sh | 3 +- t/t0035-kgio-pipe-response.sh | 7 - t/t0041-optional-pool-size.sh | 51 +++++ t/t0050-response-body-close-has-env.sh | 3 +- t/t0104-rack-input-limit-tiny.sh | 10 +- t/t0105-rack-input-limit-bigger.sh | 10 +- t/t0106-rack-input-keepalive.sh | 2 + t/t0107-rack-input-limit-zero.sh | 60 ++++++ t/t0113-rewindable-input-false.sh | 1 + t/t0114-rewindable-input-true.sh | 1 + t/t0202-async-response-one-oh.sh | 56 +++++ t/test_isolate.rb | 7 +- 76 files changed, 1389 insertions(+), 375 deletions(-) commit 061cb38ee10c431a015276c2cf3db37e5e3e66ef Author: Eric Wong Date: Fri Feb 11 10:49:56 2011 +0000 Rainbows! 3.1.0 - minor updates Small bug fixes that have been sitting around, not much but it's already been one month since our last release. * Unicorn dependency updated to 3.4.0, so we get IPv6 support and Kgio.autopush support for ":tcp_nopush => true" users. * Optional :pool_size argument is fixed for NeverBlock and CoolioThreadPool users. * Mostly minor internal code cleanups * Sunshowers support removed, it was out-of-date and unmaintained. Cramp remains supported for now. * X-Rainbows-* response headers support removed, nobody used it. There are severalnew features in this release not documented here. Consider any new features not mentioned in these release notes to be subject to removal/renaming in future releases. commit 93625a24f0b20a89f4ab732c92f76640e387c1a0 Author: Eric Wong Date: Fri Feb 11 11:12:17 2011 +0000 pkg.mk: update to the latest * Fixes Ruby 1.9.3dev deprecation warnings * Fixes some documentation dependency issues commit 3b3047f2f60a5f9c4f526fe8fcfc0d7897422abb Author: Eric Wong Date: Fri Feb 11 10:49:07 2011 +0000 reverse_proxy: document as "not ready for production" Of course some folks believe nothing in Rainbows! is :. commit 04b8de2cf6c3037c45e60d3720472b09dd23efd5 Author: Eric Wong Date: Mon Feb 7 19:48:46 2011 -0800 Revert t/bin/unused_listen simplification This conflicts with ports clients may automatically use in the ephemeral range. This reverts commit c9a7560bb684bbdadb641ebc7597303f38c37d4f. commit 662a146457689110c83bfd18987938475966f454 Author: Eric Wong Date: Mon Feb 7 19:26:04 2011 -0800 new test for optional :pool_size handling This will help prevent us from breaking :pool_size in the future. commit a34b1048d05397f72ad579fcef72cbb1a9e9d8bc Author: Graham Hughes Date: Mon Feb 7 16:49:31 2011 -0800 fix optional "use" argument handling Actually use the Rainbows::O constant for use [ew: rewritten commit message subject] Acked-by: Eric Wong commit b7d974960b58d732149d5fabf870b2332b6877f7 Author: Eric Wong Date: Mon Feb 7 18:52:51 2011 -0800 gemspec: remove unnecessary statements No need for these commit 40871775044a88662b9593d86a631755ca516bab Author: Eric Wong Date: Mon Feb 7 18:51:50 2011 -0800 doc: rdoc cleanups and fixes Don't need to document things that aren't ready, yet. commit 53bac4f65d9430495c8043b239cc936012ea7a8d Author: Eric Wong Date: Sun Feb 6 06:19:09 2011 +0000 minimize &block usage for yield No need to allocate a proc every time when we can just yield much more efficiently. commit 44eb53f5a5f1ea2e5aee93d0caf995f42b3179f7 Author: Eric Wong Date: Sun Feb 6 01:42:31 2011 +0000 kill some unnecessary &block usage We were needlessly allocating objects even when using yield. commit 90a86c9822238f01e8d60c9303b9a0da64351c7f Author: Eric Wong Date: Sat Feb 5 10:44:52 2011 +0000 *epoll: refactor common loop code acceptor thread pools could use some work, still commit c9ca82c76f1eb0e06b0aa204a243d00f382579c5 Author: Eric Wong Date: Sat Feb 5 10:11:56 2011 +0000 *epoll: consolidate re-run logic There's a lot of code duplication here :< commit d8e3edadd128a2ee5712b87a6b660295de2df6be Author: Eric Wong Date: Sat Feb 5 09:22:05 2011 +0000 writer_thread_pool: needless use of Array#map Array#each will do.. commit fa7a282502c253ad3203f28bb10eede8b3a3cd3e Author: Eric Wong Date: Sat Feb 5 09:06:37 2011 +0000 less expensive QUIT processing Avoid constantly nuking the method cache and raising repeated exceptions while our master process is shutting us down. commit 723ca7b440b1cf161d999aedcfadba8498adaa7c Author: Eric Wong Date: Sat Feb 5 08:46:40 2011 +0000 http_server: kill a warning Ugh, I need to think of a way to clean this up... commit 7246d2f2d1601dbb5486ce7f9ddbebd1bb975b58 Author: Eric Wong Date: Fri Feb 4 20:39:41 2011 -0800 bump required Unicorn dependency for Kgio We want to use the singleton methods in Kgio to reduce conditionals. commit e00c2e8c53ad5b47baa5bc6a8765b7c3c92296b9 Author: Eric Wong Date: Fri Feb 4 18:59:18 2011 -0800 bump wrongdoc development dependency 1.5 is nicer than older versions commit 8e2e8adda8adbadee8ab31cde700b7e486b1154c Author: Eric Wong Date: Fri Feb 4 18:58:26 2011 -0800 rename XAcceptEpoll to XEpoll It's too long especially since XEpollThreadPool is planned :> commit 0f4f015737297ac5245d0be9ee83553770ade0a9 Author: Eric Wong Date: Fri Feb 4 15:05:25 2011 -0800 test_isolate: use latest Unicorn It supports IPv6 and pulls in a better Kgio. Since Unicorn defaults to ":tcp_nopush => true", we need to flip it back to false to be compatible with the types of apps Rainbows! is targetted as. commit f015a843fcfa120286628ec75829575ee2391380 Author: Eric Wong Date: Fri Feb 4 17:48:34 2011 -0800 tests: replace several sed invocations with ed ed can do in-place editing portably, unlike sed. commit 82579a5f20531e69eb40e6a58a931b6c5f77d548 Author: Eric Wong Date: Fri Feb 4 15:06:23 2011 -0800 reverse_proxy: small reorganization Put all of our constants in one place for easy reference commit d20bb75518669444ad65fffe4c6e5d2654436193 Author: Eric Wong Date: Fri Feb 4 15:01:03 2011 -0800 reverse_proxy: properly read IPv6 addreses in upstreams Yes it's fugly commit ba9a22b6926db058199d44a626b923376c8a850f Author: Eric Wong Date: Fri Feb 4 22:38:31 2011 +0000 epoll: handle EINTR properly in Ruby-space We can't work around it effectively in the C extension itself. This requires the latest sleepy_penguin gem. commit da93ad1c07ff9deb4d3a2e765b26f87ccf68aa23 Author: Eric Wong Date: Fri Feb 4 05:41:14 2011 +0000 test_isolate: only load sleepy_penguin under Linux It's Linux-only, after all commit c9a7560bb684bbdadb641ebc7597303f38c37d4f Author: Eric Wong Date: Fri Feb 4 04:20:15 2011 +0000 t/bin/unused_listen: simplify this Binding to a random port is much easier this way commit 130d086666ccd825fcb13cf02fcf941b8fe661af Author: Eric Wong Date: Tue Feb 1 15:05:52 2011 -0800 preliminary reverse proxy Rack application This can be a starting point for developing Cool.io or EventMachine-based reverse proxy applications on Rainbows! Eventually Rainbows! could replace nginx for Unicorn users! Just don't consider this code production ready, yet, at all, it doesn't handle any sort of failover and has no automated tests, yet. commit 9bf406655a84090426a62ab60677df529e408f17 Author: Eric Wong Date: Mon Jan 31 14:21:18 2011 -0800 coolio/client: on_write_complete triggers read This allows us to more aggressively handle pipelining as well as trigger future Kgio autopush behavior. commit 5cbe276ef1e797aef77e7401593f4a7827c37fe3 Author: Eric Wong Date: Thu Jan 27 12:52:15 2011 -0800 test for client_max_body_size being zero Some users never, ever accept uploads, so we should test for it. commit 7d623489dd51667e0a2eec9d44aec57cb4c5ba44 Author: Eric Wong Date: Wed Jan 26 17:42:55 2011 +0000 epoll/client: avoid unnecessary Epoll#set calls We should only attempt to modify the descriptor when we block, and not for subsequent events. commit bc8a71ea4fee6e4ed35dad245511508ac0b7bf4b Author: Eric Wong Date: Wed Jan 26 17:40:01 2011 +0000 GNUmakefile: only enable epoll-based models in Linux epoll is Linux-only right now. kqueue probably isn't worth supporting directly (and even direct epoll support is debatable given the current GVL situation) commit 667b05819b85165061c445fb2c75ef161a5de5b6 Author: Eric Wong Date: Mon Jan 24 20:04:20 2011 -0800 initial XAcceptEpoll concurrency model Edge-triggered epoll concurrency model with blocking accept() in a (hopefully) native thread. This is recommended over Epoll for Ruby 1.9 users as it can workaround accept()-scalability issues on multicore machines. commit 9f7f497dc21d904a1af20465318d85811daf0652 Author: Eric Wong Date: Mon Jan 24 17:13:14 2011 -0800 epoll/client: thread-safety for write queuing We're living on the EDGE and mixing epoll with threads :D commit 04b8649b3750a0002094e90a62f7566059c8a4e9 Author: Eric Wong Date: Mon Jan 24 17:00:51 2011 -0800 epoll: make Epoll.quit more reusable We'll be using this more in the future commit 85ccfbc75abc78f977583db6303e3fb270fd2ec9 Author: Eric Wong Date: Mon Jan 24 13:20:23 2011 -0800 neverblock: fix app_call under 1.8.7 super doesn't seem to capture arguments inside a block under 1.8.7 :< commit 9e146021e17056976e61d824d228922bf81a4f24 Author: Eric Wong Date: Mon Jan 24 11:47:43 2011 -0800 clear LISTENERS array on close No reason to keep it around commit 6f6a95b6e3b4f76278cd19b787c8487453dae4d4 Author: Eric Wong Date: Fri Jan 21 22:56:29 2011 -0800 epoll/client: minor optimization We know @wr_queue is empty since we just initialized it and the first thing an HTTP client does is read. commit 01fbc4a7f2fd5b751b9183d11aa74aadaffd145b Author: Eric Wong Date: Fri Jan 21 17:34:21 2011 -0800 ev_core: force input to be given to app_call No need to setting an ivar for most requests commit 9719da13b8aabeabbf2eebc37f127e88550c3121 Author: Eric Wong Date: Fri Jan 21 17:27:25 2011 -0800 epoll/client: factor out on_close method We'll override it, maybe... commit 97d8f9b49e3f4637c7c573a971cdbc54b5698dce Author: Eric Wong Date: Fri Jan 21 17:10:00 2011 -0800 epoll/client: remove unused client We don't do Level-Triggered I/O around here commit cc08315b7821cf7178d233451fd6bbe84eb90dcc Author: Eric Wong Date: Fri Jan 21 15:34:15 2011 -0800 extract common tasks to pkg.mk to simplify our makefile commit fb24ca8f30edbf5086dbe288d4dd4fa213684236 Author: Eric Wong Date: Fri Jan 21 15:11:16 2011 -0800 epoll: reduce expiration calls and Time objects We'll lower our precision for keepalive timeouts a little and and reduce our Time object allocation rate. commit 43d6ec33c3dd7497e27127adfffeb94722fd4b8d Author: Eric Wong Date: Fri Jan 21 15:08:07 2011 -0800 ev_core: garbage reduction We don't need to allocate new string objects for short-lived strings. We'll pay the price of a constant lookup instead. commit 247ce76b4aabfa42157b9cbf9ebae824819cfff6 Author: Eric Wong Date: Fri Jan 21 13:21:07 2011 -0800 epoll: use newer sleepy_penguin We can eliminate the State module to simplify our code since 1.3.x keeps better track of things. commit b33ab73a984660ab2d741b32725ab21d7860bef3 Author: Eric Wong Date: Fri Jan 21 13:50:12 2011 -0800 max_body: disable for epoll It's almost just like Coolio commit 6750d3b50a9d4e66cbdb3b3ce295a1f16a54c678 Author: Eric Wong Date: Fri Jan 21 12:35:05 2011 -0800 doc: git.bogomips.org => bogomips.org bogomips.org is slimming down and losing URL weight :) commit 805f0eba4f63d0c9020708e1122f64776933c06f Author: Eric Wong Date: Fri Jan 21 00:16:57 2011 -0800 epoll: use sleepy_penguin default size for epoll_wait It was based off the nginx window of 64 events. Not that any servers are really that busy... commit 1b024d48169442a5498d490699ea1eee41563587 Author: Eric Wong Date: Thu Jan 20 15:27:46 2011 -0800 epoll: close epoll descriptor on graceful shutdown This allows us to gracefully shutdown more quickly. commit ea4a01df8b1fa29e2088816f4734bb0073eb9380 Author: Eric Wong Date: Thu Jan 20 22:15:12 2011 +0000 remove support for Sunshowers The WebSocket protocol is still undergoing changes and unused. We won't waste time supporting it until it's finalized and doesn't break HTTP. commit 7ec2e407206036a993aadbcd39b13a2d86b7a288 Author: Eric Wong Date: Thu Jan 20 13:26:59 2011 -0800 epoll: ignore ECONNRESET errors Nothing we can do about that from clients. Perhaps kgio should just return nil for those... commit 7ad4e300c29b06fd53aca9f9bad18f97f9a34633 Author: Eric Wong Date: Thu Jan 20 20:32:24 2011 +0000 ev_core: simplify setup steps ev_core is always loaded after forking, so eliminate the need for extra setup steps for each concurrency model that uses it commit 72cbecfe01b8c4b2c7bb7e362401805374036dc2 Author: Eric Wong Date: Thu Jan 20 02:28:12 2011 -0800 merge rack_input into process_client It turns out to be less-used than previous anticipated, so there's no point in having yet another module. commit ed33b9c0d060806b41e952a50e0ab65a0f5fe21a Author: Eric Wong Date: Thu Jan 20 02:20:19 2011 -0800 ev_core: localize 413 error constant It's the only place we ever use it commit e0ad4353f0c0f8ae27301df3e694384f687a4264 Author: Eric Wong Date: Thu Jan 20 02:16:04 2011 -0800 remove unused 416 error constants/exceptions We handle that locally in rainbows/response now commit fa0b3774dd9cd73331e83b3517c37964ab265074 Author: Eric Wong Date: Thu Jan 20 02:13:38 2011 -0800 dev_fd_response: garbage reduction Constant strings mean the runtime won't have to allocate new objects all the time since GC is currently the biggest performance problem of Ruby 1.9.x in my experience. commit fc355db99bdbe72644e4691a7a107b6a29c77be6 Author: Eric Wong Date: Wed Jan 19 18:07:13 2011 -0800 dev_fd_response: do not send chunks to 1.0 clients chunked Transfer-Encoding is only valid for HTTP/1.1 commit d59ea817d624478176212f27bb79976c371a9c6f Author: Eric Wong Date: Wed Jan 19 17:47:37 2011 -0800 t0035: kgio-pipe-response works everywhere Or at least it should :) commit 5d5d31e7ed12a232e405a8456d08e974ac74299a Author: Eric Wong Date: Wed Jan 19 17:46:52 2011 -0800 t0023: use skip_models helper we need to get in the habit of using this more commit 1a449c8abafbb17f9e7c2d68363957c80dc1ab86 Author: Eric Wong Date: Wed Jan 19 16:23:54 2011 -0800 remove support for X-Rainbows-* headers We guarantee the Rack env will exist for the duration of the request/response cycle, so we can just tweak "rainbows.autochunk". commit 9424b13255a238dfa44952ebeb07bea3acee999c Author: Eric Wong Date: Wed Jan 19 15:06:10 2011 -0800 initial edge-triggered epoll model Coolio and EventMachine only use level-triggered epoll, but being Rainbows!, we live on the EDGE! commit 7a04133c1ab57923cac8a9de04b00bfe89bcce2d Author: Eric Wong Date: Wed Jan 19 02:58:43 2011 +0000 tests: content-md5 tests shut down connection This makes content-md5 tests much faster since we no longer wait for the server to to timeout. commit 810701d939114a5fcdacc55ec383de112c5e3fa4 Author: Eric Wong Date: Mon Jan 17 03:42:33 2011 +0000 ev_core: reuse buffer to avoid GC thrashing Single-threaded concurrency models can reuse a single buffer to avoid thrashing memory and causing unnecessary GC activity. commit c7f4ade8edcfa7422d41c4272250b292b141b427 Author: Eric Wong Date: Fri Jan 14 18:51:54 2011 +0000 t0050: improve test reliability normal signals can get lost easily :< commit 18db44fe89b8ba61f21b92f6efece37baa8bd6c7 Author: Eric Wong Date: Fri Jan 14 18:49:58 2011 +0000 tests: bump rack-fiber_pool version to 0.9.1 We always try to track the latest and greatest. We've also updated the test to actually test concurrency since rack-fiber_pool reuses recent fibers now.