Unicorn is a Unix and LAN/localhost-optimized fork of the Mongrel HTTP server. It is takes full advantage of functionality exclusive to Unix-like operating systems. It will reap and restart workers that die from broken apps, and there is no need to manage multiple processes yourself. Load balancing is done entirely by the operating system kernel. Requests never pile up behind a busy worker. The server does not care if your application is thread-safe or not, as workers all run within their own isolated address space and only serve one client at a time. All Rack applications are supported along with pre-Rack versions of Ruby on Rails via a Rack wrapper. It also supports atomic log cycling, nginx-style binary re-execution without losing connections, before_fork and after_fork hooks, and optional copy-on-write-friendly memory management.
| Tags | Ruby HTTP Servers |
|---|---|
| Licenses | GPLv2 |
| Operating Systems | Linux Unix |
| Implementation | Ruby Ragel C |
Recent releases


Release Notes: This release fixes a bug in Unicorn::HttpParser#filter_body which affected some configurations of Rainbows! There is also a minor size reduction in the DSO.


Release Notes: Unicorn::Const::UNICORN_VERSION is now auto-generated from GIT-VERSION-GEN and always correct. There were minor cleanups for hijacking.


Release Notes: This pre-release adds hijacking support for Rack 1.5 users. See Rack documentation for more information about hijacking. There is also a new --no-default-middleware/-N option for the 'unicorn' command to ignore RACK_ENV within unicorn.


Release Notes: The new check_client_connection option allows unicorn to detect most disconnected local clients before potentially expensive application processing begins.


Release Notes: Non-regular files are no longer reopened on SIGUSR1. Listen sockets are now bound after loading the application for preload_app(true) users. This prevents load balancers from sending traffic to an application server while the application is still loading.