Table of Contents - Unicorn: Rack HTTP server for fast clients and Unix
Pages
Application_Timeouts
Application Timeouts
ALL External Resources Are Considered Unreliable
Rolling Your Own Socket Code
Timeout module in the Ruby standard library
A Note About Filesystems
The Last Line Of Defense
ChangeLog
ChangeLog
DESIGN
Design
FAQ
Frequently Asked Questions about Unicorn
I've installed Rack 1.1.x, why can't Unicorn load Rails (2.3.5)?
Why are my redirects going to “http” URLs when my site uses https?
Why are log messages from Unicorn are unformatted when using Rails?
Why am I getting “connection refused”/502 errors under high load?
HACKING
Unicorn Hacker's Guide
Polyglot Infrastructure
Tests
HttpServer
Documentation
Ruby/C Compatibility
Ragel Compatibility
Contributing
Submitting Patches
Building a Gem
Running Development Versions
ISSUES
Issues
Submitting Patches
Contact Info
KNOWN_ISSUES
Known Issues
Known Issues (Old)
LATEST
unicorn 4.8.3 - the end of an era / 2014-05-07 07:50 UTC
LICENSE
Ruby 1.8-specific terms (if you're not using the GPL)
Links
Related Projects
Disclaimer
For use with Unicorn
Unicorn is written to work with
Derivatives
Prior Work
NEWS
unicorn 4.8.3 - the end of an era / 2014-05-07 07:50 UTC
unicorn 4.8.2 - avoid race condition during worker startup / 2014-02-05 18:24 UTC
unicorn 4.8.1 / 2014-01-29 08:48 UTC
unicorn 4.8.0 - big internal changes, but compatible / 2014-01-11 07:34 UTC
unicorn 4.8.0pre1 / 2013-12-09 09:51 UTC
unicorn 4.7.0 - minor updates, license tweak / 2013-11-04 06:59 UTC
unicorn 4.6.3 - fix –no-default-middleware option / 2013-06-21 08:01 UTC
unicorn 4.6.2 - HTTP parser fix for Rainbows! / 2013-02-26 02:59 UTC
unicorn 4.6.1 - minor cleanups / 2013-02-21 08:38 UTC
unicorn 4.6.0 - hijacking support / 2013-02-06 11:23 UTC
unicorn 4.6.0pre1 - hijacking support / 2013-01-29 21:05 UTC
unicorn 4.5.0 - check_client_connection option / 2012-12-07 22:59 UTC
unicorn 4.5.0pre1 - check_client_connection option / 2012-11-29 23:48 UTC
unicorn 4.4.0 - minor updates / 2012-10-11 09:11 UTC
unicorn 4.3.1 - shutdown() fixes / 2012-04-29 07:04 UTC
unicorn 4.3.0 - minor fixes and updates / 2012-04-17 21:51 UTC
unicorn 4.2.1 - minor fix and doc updates / 2012-03-26 21:39 UTC
unicorn 4.2.0 / 2012-01-28 09:18 UTC
unicorn 4.1.1 - fix last-resort timeout accuracy / 2011-08-25 21:30 UTC
unicorn 4.1.0 - small updates and fixes / 2011-08-20 00:33 UTC
unicorn 4.0.1 - regression bugfixes / 2011-06-29 18:59 UTC
unicorn 4.0.0 - for mythical hardware! / 2011-06-27 09:05 UTC
unicorn 3.7.0 - minor feature update / 2011-06-09 20:51 UTC
unicorn 3.6.2 - fix Unicorn::OobGC module / 2011-04-30 06:40 UTC
unicorn 1.1.7 - major fixes to minor components / 2011-04-30 06:33 UTC
unicorn 3.6.1 - fix OpenSSL PRNG workaround / 2011-04-26 23:06 UTC
unicorn 3.6.0 - small fixes, PRNG workarounds / 2011-04-21 06:46 UTC
unicorn 3.5.0 - very minor improvements / 2011-03-15 12:27 UTC
unicorn 3.4.0 - for people with very big LANs / 2011-02-04 21:23 UTC
unicorn 3.3.1 - one minor, esoteric bugfix / 2011-01-06 23:48 UTC
unicorn 1.1.6 - one minor, esoteric bugfix / 2011-01-06 23:46 UTC
unicorn 3.3.0 - minor optimizations / 2011-01-05 23:43 UTC
unicorn 3.2.1 - parser improvements for Rainbows! / 2010-12-26 08:04 UTC
unicorn 3.2.0 - parser improvements for Rainbows! / 2010-12-26 07:50 UTC
unicorn 3.1.0 - client_buffer_body_size tuning / 2010-12-09 22:28 UTC
unicorn 3.0.1 - one bugfix for Rainbows! / 2010-12-03 00:34 UTC
unicorn 3.0.0 - disable rewindable input! / 2010-11-20 02:41 UTC
unicorn 3.0.0pre2 - less bad than 2.x or 3.0.0pre1! / 2010-11-19 00:07 UTC
unicorn 2.0.1 - fix errors in error handling / 2010-11-17 23:48 UTC
unicorn 3.0.0pre1 / 2010-11-17 00:04 UTC
unicorn 2.0.0 - mostly internal cleanups / 2010-10-27 23:44 UTC
unicorn 1.1.5 / 2010-10-27 23:30 UTC
unicorn 1.0.2 / 2010-10-27 23:12 UTC
unicorn 2.0.0pre3 - more small fixes / 2010-10-09 00:06 UTC
unicorn 2.0.0pre2 - releases are cheap / 2010-10-07 07:23 UTC
unicorn 2.0.0pre1 - a boring “major” release / 2010-10-06 01:17 UTC
unicorn 1.1.4 - small bug fix and doc updates / 2010-10-04 20:32 UTC
unicorn 1.1.3 - small bug fixes / 2010-08-28 19:27 UTC
unicorn 1.1.2 - fixing upgrade rollbacks / 2010-07-13 20:04 UTC
unicorn 1.0.1 - bugfixes only / 2010-07-13 20:01 UTC
unicorn 1.1.1 - fixing cleanups gone bad :x / 2010-07-11 02:13 UTC
unicorn 1.1.0 - small changes and cleanups / 2010-07-08 07:57 UTC
unicorn 1.0.0 - yes, this is a real project / 2010-06-17 09:18 UTC
unicorn 0.991.0 - startup improvements / 2010-06-11 02:18 UTC
unicorn 0.990.0 - inching towards 1.0 / 2010-06-08 09:41 UTC
unicorn 0.99.0 - simplicity wins / 2010-05-06 19:32 UTC
unicorn 0.98.0 / 2010-05-05 00:53 UTC
unicorn 0.97.1 - fix HTTP parser for Rainbows!/Zbatery / 2010-04-19 21:00 UTC
unicorn 0.97.0 - polishing and cleaning up / 2010-03-01 18:26 UTC
unicorn 0.96.1 - fix leak in Rainbows!/Zbatery / 2010-02-13 08:35 UTC
unicorn 0.96.0 - Rack 1.1 bump / 2010-01-08 05:18 UTC
unicorn 0.95.3 / 2009-12-21 21:51 UTC
unicorn 0.95.2 / 2009-12-07 09:52 UTC
unicorn 0.95.1 / 2009-11-21 21:13 UTC
unicorn 0.95.0 / 2009-11-15 22:21 UTC
unicorn 0.94.0 / 2009-11-05 09:52 UTC
unicorn 0.93.5 / 2009-10-29 21:41 UTC
unicorn 0.93.4 / 2009-10-27 07:57 UTC
unicorn 0.93.3 / 2009-10-09 22:50 UTC
unicorn 0.93.2 / 2009-10-07 08:45 UTC
unicorn 0.93.1 / 2009-10-03 01:17 UTC
unicorn 0.93.0 / 2009-10-02 21:04 UTC
unicorn 0.92.0 / 2009-09-18 21:40 UTC
unicorn 0.10.3r / 2009-09-09 00:09 UTC
unicorn 0.91.0 / 2009-09-04 19:04 UTC
unicorn v0.10.2r –rainbows / 2009-08-18 22:28 UTC
unicorn 0.10.1r –rainbows / 2009-08-18 22:01 UTC
unicorn 0.10.0r – rainbows! / 2009-08-18 21:41 UTC
unicorn 0.90.0 / 2009-08-17 00:24 UTC
unicorn 0.8.4 / 2009-08-06 22:48 UTC
unicorn 0.9.2 / 2009-07-20 01:29 UTC
unicorn 0.8.3 / 2009-07-20 01:26 UTC
unicorn 0.8.2 / 2009-07-09 08:59 UTC
unicorn 0.9.1 / 2009-07-09 08:49 UTC
unicorn 0.9.0 / 2009-07-01 22:24 UTC
unicorn 0.8.1 / 2009-05-28 21:45 UTC
unicorn 0.8.0 / 2009-05-26 22:59 UTC
unicorn 0.7.1 / 2009-05-22 09:06 UTC
unicorn 0.7.0 / 2009-04-25 18:59 UTC
unicorn 0.6.0 / 2009-04-24 21:47 UTC
unicorn 0.5.4 / 2009-04-24 01:41 UTC
unicorn 0.5.3 / 2009-04-17 05:32 UTC
unicorn 0.5.2 / 2009-04-16 23:32 UTC
unicorn 0.5.1 / 2009-04-13 21:24 UTC
unicorn 0.5.0 / 2009-04-13 19:08 UTC
unicorn 0.4.2 / 2009-04-02 19:14 UTC
unicorn v0.4.1 / 2009-04-01 10:52 UTC
unicorn v0.2.3 / 2009-03-25 23:31 UTC
unicorn v0.2.2 / 2009-03-22 23:45 UTC
unicorn v0.2.1 / 2009-03-19 03:20 UTC
unicorn v0.2.0 / 2009-03-19 03:16 UTC
unicorn v0.1.0 / 2009-03-11 01:50 UTC
PHILOSOPHY
The Philosophy Behind unicorn
Avoid Complexity
Threads and Events Are Hard
Slow Clients Are Problematic
Application Concurrency != Network Concurrency
Improved Performance Through Reverse Proxying
Worse Is Better
Just Worse in Some Cases
README
Unicorn: Rack HTTP server for fast clients and Unix
Features
License
Install
Usage
non-Rails Rack applications
for Rails applications (should work for all 1.2 or later versions)
Configuration File(s)
Disclaimer
Contact
SIGNALS
Signal handling
Master Process
Worker Processes
Procedure to replace a running unicorn executable
Sandbox
Tips for using Unicorn with Sandbox installation tools
General deployment
Bundler
Running
RUBYOPT pollution from SIGUSR2 upgrades
BUNDLE_GEMFILE for Capistrano users
Other ENV pollution issues
Ruby 2.0.0 close-on-exec and SIGUSR2 incompatibility
Isolate
Running
RUBYOPT pollution from SIGUSR2 upgrades
TODO
TUNING
Tuning Unicorn
Unicorn Configuration
Unicorn::Configurator#worker_processes
Unicorn::Configurator#listen Options
Other Unicorn settings
Kernel Parameters (Linux sysctl)
Classes/Modules
Unicorn::App::ExecCgi
Unicorn::App::ExecCgi::Body
Unicorn::App::Inetd
Unicorn::App::Inetd::CatBody
Unicorn::App::OldRails::Static
Unicorn::ClientShutdown
Unicorn::Configurator
Unicorn::Const
Unicorn::HttpParser
Unicorn::HttpParser::Rack
Unicorn::HttpResponse
Unicorn::HttpResponse::Rack
Unicorn::HttpServer
Unicorn::Launcher
Unicorn::OobGC
Unicorn::PrereadInput
Unicorn::SSLClient
Unicorn::SSLConfigurator
Unicorn::SSLServer
Unicorn::SocketHelper
Unicorn::StreamInput
Unicorn::TeeInput
Unicorn::TmpIO
Unicorn::Util
Unicorn::Worker
Methods
::client_body_buffer_size — Unicorn::TeeInput
::client_body_buffer_size= — Unicorn::TeeInput
::daemonize! — Unicorn::Launcher
::new — Unicorn::TeeInput
::new — Unicorn::TmpIO
::new — Unicorn::App::ExecCgi
::new — Unicorn::OobGC
::new — Unicorn::App::OldRails::Static
::new — Unicorn::App::Inetd
::new — Unicorn::StreamInput
::new — Unicorn::App::Inetd::CatBody
::reopen_logs — Unicorn::Util
::sock_name — Unicorn::SocketHelper
::tcp_name — Unicorn::SocketHelper
#accf_arg — Unicorn::SocketHelper
#after_fork — Unicorn::Configurator
#before_exec — Unicorn::Configurator
#before_fork — Unicorn::Configurator
#bind_listen — Unicorn::SocketHelper
#body_offset= — Unicorn::App::ExecCgi::Body
#call — Unicorn::App::ExecCgi
#call — Unicorn::App::OldRails::Static
#call — Unicorn::App::Inetd
#canonicalize_tcp — Unicorn::Configurator
#check_client_connection — Unicorn::Configurator
#client_body_buffer_size — Unicorn::Configurator
#close — Unicorn::App::Inetd::CatBody
#consume! — Unicorn::TeeInput
#each — Unicorn::App::ExecCgi::Body
#each — Unicorn::App::Inetd::CatBody
#each — Unicorn::StreamInput
#eof! — Unicorn::StreamInput
#eof? — Unicorn::StreamInput
#err_response — Unicorn::HttpResponse
#filter_body — Unicorn::StreamInput
#force_file_input — Unicorn::App::ExecCgi
#gets — Unicorn::StreamInput
#gets — Unicorn::TeeInput
#hijack_prepare — Unicorn::HttpResponse
#hijack_setup — Unicorn::HttpParser
#hijacked? — Unicorn::HttpParser
#http_response_write — Unicorn::HttpResponse
#listen — Unicorn::Configurator
#log_buffer_sizes — Unicorn::SocketHelper
#logger — Unicorn::Configurator
#new_tcp_server — Unicorn::SocketHelper
#parse_output! — Unicorn::App::ExecCgi
#pid — Unicorn::Configurator
#preload_app — Unicorn::Configurator
#prevent_autoclose — Unicorn::SocketHelper
#read — Unicorn::HttpParser
#read — Unicorn::TeeInput
#read — Unicorn::StreamInput
#read_all — Unicorn::StreamInput
#rewind — Unicorn::TeeInput
#rewindable_input — Unicorn::Configurator
#run_child — Unicorn::App::ExecCgi
#server_cast — Unicorn::SocketHelper
#set_server_sockopt — Unicorn::SocketHelper
#set_tcp_sockopt — Unicorn::SocketHelper
#shutdown — Unicorn::SSLClient
#size — Unicorn::TeeInput
#size — Unicorn::TmpIO
#sock_name — Unicorn::SocketHelper
#ssl — Unicorn::SSLConfigurator
#ssl_certificate — Unicorn::SSLConfigurator
#ssl_certificate_key — Unicorn::SSLConfigurator
#ssl_ciphers — Unicorn::SSLConfigurator
#ssl_client_certificate — Unicorn::SSLConfigurator
#ssl_compression — Unicorn::SSLConfigurator
#ssl_crl — Unicorn::SSLConfigurator
#ssl_dhparam — Unicorn::SSLConfigurator
#ssl_enable! — Unicorn::SSLServer
#ssl_engine — Unicorn::SSLConfigurator
#ssl_prefer_server_ciphers — Unicorn::SSLConfigurator
#ssl_protocols — Unicorn::SSLConfigurator
#ssl_session_timeout — Unicorn::SSLConfigurator
#ssl_verify_client — Unicorn::SSLConfigurator
#ssl_verify_depth — Unicorn::SSLConfigurator
#stderr_path — Unicorn::Configurator
#stdout_path — Unicorn::Configurator
#tcp_name — Unicorn::SocketHelper
#tee — Unicorn::TeeInput
#timeout — Unicorn::Configurator
#user — Unicorn::Worker
#user — Unicorn::Configurator
#worker_processes — Unicorn::Configurator
#working_directory — Unicorn::Configurator
#write_errors — Unicorn::App::ExecCgi