1 = unicorn: Rack HTTP server for fast clients and Unix
3 unicorn is an HTTP server for Rack applications designed to only serve
4 fast clients on low-latency, high-bandwidth connections and take
5 advantage of features in Unix/Unix-like kernels. Slow clients should
6 only be served by placing a reverse proxy capable of fully buffering
7 both the the request and response in between unicorn and slow clients.
11 * Designed for Rack, Unix, fast clients, and ease-of-debugging. We
12 cut out everything that is better supported by the operating system,
13 {nginx}[https://nginx.org/] or {Rack}[https://rack.github.io/].
15 * Compatible with Ruby 2.0.0 and later.
17 * Process management: unicorn will reap and restart workers that
18 die from broken apps. There is no need to manage multiple processes
19 or ports yourself. unicorn can spawn and manage any number of
20 worker processes you choose to scale to your backend.
22 * Load balancing is done entirely by the operating system kernel.
23 Requests never pile up behind a busy worker process.
25 * Does not care if your application is thread-safe or not, workers
26 all run within their own isolated address space and only serve one
27 client at a time for maximum robustness.
29 * Builtin reopening of all log files in your application via
30 USR1 signal. This allows logrotate to rotate files atomically and
31 quickly via rename instead of the racy and slow copytruncate method.
32 unicorn also takes steps to ensure multi-line log entries from one
33 request all stay within the same file.
35 * nginx-style binary upgrades without losing connections.
36 You can upgrade unicorn, your entire application, libraries
37 and even your Ruby interpreter without dropping clients.
39 * transparent upgrades using systemd socket activation is
40 supported since unicorn 5.0
42 * before_fork and after_fork hooks in case your application
43 has special needs when dealing with forked processes. These
44 should not be needed when the "preload_app" directive is
47 * Can be used with copy-on-write-friendly GC in Ruby 2.0+
48 to save memory (by setting "preload_app" to true).
50 * Able to listen on multiple interfaces including UNIX sockets,
51 each worker process can also bind to a private port via the
52 after_fork hook for easy debugging.
54 * Simple and easy Ruby DSL for configuration.
56 * Decodes chunked requests on-the-fly.
60 unicorn is copyright 2009-2018 by all contributors (see logs in git).
61 It is based on Mongrel 1.1.5.
62 Mongrel is copyright 2007 Zed A. Shaw and contributors.
64 unicorn is licensed under (your choice) of the GPLv2 or later
65 (GPLv3+ preferred), or Ruby (1.8)-specific terms.
66 See the included LICENSE file for details.
68 unicorn is 100% Free Software (including all development tools used).
72 The library consists of a C extension so you'll need a C compiler
73 and Ruby development libraries/headers.
75 You may install it via RubyGems on RubyGems.org:
79 You can get the latest source via git from the following locations
80 (these versions may not be stable):
82 https://yhbt.net/unicorn.git
83 https://repo.or.cz/unicorn.git (mirror)
85 You may browse the code from the web:
87 * https://yhbt.net/unicorn.git
88 * https://repo.or.cz/w/unicorn.git (gitweb)
90 See the HACKING guide on how to contribute and build prerelease gems
95 === Rack (including Rails 3+) applications
101 unicorn will bind to all interfaces on TCP port 8080 by default.
102 You may use the +--listen/-l+ switch to bind to a different
103 address:port or a UNIX socket.
105 === Configuration File(s)
107 unicorn will look for the config.ru file used by rackup in APP_ROOT.
109 For deployments, it can use a config file for unicorn-specific options
110 specified by the +--config-file/-c+ command-line switch. See
111 Unicorn::Configurator for the syntax of the unicorn-specific options.
112 The default settings are designed for maximum out-of-the-box
113 compatibility with existing applications.
115 Most command-line options for other Rack applications (above) are also
116 supported. Run `unicorn -h` to see command-line options.
120 There is NO WARRANTY whatsoever if anything goes wrong, but
121 {let us know}[link:ISSUES.html] and we'll try our best to fix it.
123 unicorn is designed to only serve fast clients either on the local host
124 or a fast LAN. See the PHILOSOPHY and DESIGN documents for more details
127 Due to its ability to tolerate crashes and isolate clients, unicorn
128 is unfortunately known to prolong the existence of bugs in applications
129 and libraries which run on top of it.
133 All feedback (bug reports, user/development dicussion, patches, pull
134 requests) go to the mailing list/newsgroup. See the ISSUES document for
135 information on the {mailing list}[mailto:unicorn-public@yhbt.net].
137 The mailing list is archived at https://yhbt.net/unicorn-public/
139 Read-only NNTP access is available at:
140 nntps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn and
141 nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
143 Read-only IMAP access is also available at:
144 imaps://;AUTH=ANONYMOUS@yhbt.net/inbox.comp.lang.ruby.unicorn.0 and
145 imap://;AUTH=ANONYMOUS@7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn.0
147 Archives are also available over POP3, instructions at:
148 https://yhbt.net/unicorn-public/_/text/help/#pop3
150 For the latest on unicorn releases, you may also finger us at
151 unicorn@yhbt.net or check our NEWS page (and subscribe to our Atom