Rainbows! is a 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. For Rack applications not heavily bound by slow external network dependencies, consider Unicorn instead as it simpler and easier to debug.
Rainbows! is for the odd things Unicorn fails at:
* 3rd-party APIs (to services outside your control/LAN)
* OpenID consumers (to providers outside your control/LAN)
* Reverse proxy implementations with editing/censoring (to upstreams outside your control/LAN)
* BOSH (with slow clients)
* HTTP server push
* Long polling
* Reverse Ajax
Rainbows may also be used to service slow clients even with fast applications using the Rev concurrency model.
You may download the tarball from the Rainbows project page on Rubyforge and run setup.rb after unpacking it:
You may also install it via Rubygems on Rubyforge:
gem install rainbows
for Rack applications
In APP_ROOT (where config.ru is located), run:
Rainbows! will bind to all interfaces on TCP port 8080 by default.
Rainbows! will look for the config.ru file used by rackup in APP_ROOT.
For deployments, it can use a config file for Unicorn and Rainbows!-specific options specified by the --config-file/-c command-line switch. Rainbows! accepts all options found in Unicorn::Configurator as well as the “Rainbows!” block, so you can have the following in your config file:
Here are some key features of "Rainbows!":
· Designed for Rack, the standard for modern Ruby HTTP applications.
· Built on Unicorn, inheriting its process/socket management features such as transparent upgrades and Ruby configuration DSL.
· As with Unicorn, it is able to stream large request bodies off the socket to the application while the client is still uploading. Since Rainbows! can handle slow clients, this feature is more useful than it is with Unicorn.
· Combines heavyweight concurrency (worker processes) with lightweight concurrency (Actors or Threads), allowing CPU/memory/disk to be scaled independently of client connections. Alternative concurrency models (listed in the TODO) will be supported as we find time for them.
What's New in This Release: [ read full changelog ]
· This release adds hijacking support for Rack 1.5.x users. See Rack documentation for more information about hijacking. Lin Jen-Shin also provided the -N/--no-default-middleware option. Minor packaging cleanups and new HACKING document.
· There are also some corner-case bugfixes for *Epoll* users (sleepy_penguin, these bugs do not affect EM or Cool.io users) and test suite portability improvements.