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)
* Comet
* 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.
Installation:
You may download the tarball from the Rainbows project page on Rubyforge and run setup.rb after unpacking it:
rubyforge.org/frs/?group_id=8977
You may also install it via Rubygems on Rubyforge:
gem install rainbows
Usage:
for Rack applications
In APP_ROOT (where config.ru is located), run:
rainbows
Rainbows! will bind to all interfaces on TCP port 8080 by default.
Configuration File(s)
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:
Rainbows! do
use :Revactor
worker_connections 400
end
Product's homepage
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.
Requirements:
· Ruby
What's New in This Release: [ read full changelog ]
· This release fixes a potential reentrancy deadlock when using the default logger from the Ruby standard library.