1 = Unicorn: UNIX + LAN/localhost-only fork of Mongrel
3 Only run this behind a full-HTTP-request-buffering reverse proxy if
4 you're serving slow clients. That said, nginx is the only reverse
5 proxy we know of that meets this requirement.
9 * process management: Unicorn will reap and restart workers that
10 die because of broken apps and there is no need to manage
11 multiple processes yourself.
13 * does not care if your application is thread-safe or not, workers
14 all run within their own isolated address space and only serve one
17 * able to listen on multiple interfaces, including UNIX sockets,
18 each worker process can also bind to a private port via the
19 after_fork hook for easy debugging.
21 * supports all Rack applications
23 * nginx-style binary re-execution without losing connections.
24 You can upgrade unicorn, your entire application, libraries
25 and even your Ruby interpreter as long as unicorn is
26 installed in the same path.
28 * before_fork and after_fork hooks in case your application
29 has special needs when dealing with forked processes.
31 * builtin log rotation via USR1 signal
33 * Ruby 1.9-compatible (at least the test cases all pass :>)
37 Unicorn is copyright 2009 Eric Wong and contributors.
38 It is based on Mongrel and carries the same license:
40 Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
41 under the Ruby license and the GPL2. See the include LICENSE file for
46 The library consists of a C extension so you'll need a C compiler or at
47 least a friend who can build it for you.
49 You may download the tarball from the Mongrel project page on Rubyforge
50 and run setup.rb after unpacking it:
52 http://rubyforge.org/frs/?group_id=1306
54 You may also install it via Rubygems on Rubyforge:
58 You can get the latest source via git from the following locations
59 (these versions may not be stable):
61 git://git.bogomips.org/unicorn.git
62 http://git.bogomips.org/unicorn.git
63 git://repo.or.cz/unicorn.git (mirror)
64 http://repo.or.cz/r/unicorn.git (mirror)
66 If you have web browser software for the World Wide Web
67 (on the Information Superhighway), you may browse the code from
68 your web browser and download the latest snapshot tarballs here:
70 * http://git.bogomips.org/cgit/unicorn.git (this server runs Unicorn!)
71 * http://repo.or.cz/w/unicorn.git (gitweb mirror)
75 === non-Rails Rack applications
77 Unicorn will look for the config.ru file used by rackup in APP_ROOT.
78 Optionally, it can use a config file for unicorn-specific options
79 specified by the --config-file/-c command-line switch. See
80 Unicorn::Configurator for the syntax of the unicorn-specific
83 In APP_ROOT, just run:
87 Unicorn should be capable of running most Rack applications. Since this
88 is a preforking webserver, you do not have to worry about thread-safety
89 of your application or libraries. However, your Rack application may use
90 threads internally (and should even be able to continue running threads
91 after the request is complete).
93 === Rack-enabled versions of Rails (v2.3.2+)
99 Most command-line options for other Rack applications (above) are also
100 supported. The unicorn_rails launcher attempts to combine the best
101 features of the Rails-bundled "script/server" with the "rackup"-like
102 functionality of the `unicorn' launcher.
106 There are only a few instances of Unicorn deployed anywhere in the
107 world. The only public site known to run Unicorn at this time is
108 http://git.bogomips.org/cgit which runs Unicorn::App::ExecCgi to
111 Be one of the first brave guinea pigs to run it on your production site!
112 Of course there is NO WARRANTY whatsoever if anything goes wrong, but
113 let us know and we'll try our best to fix it. Unicorn is still in the
114 early stages and testing + feedback would be *greatly* appreciated;
115 maybe you'll get Rainbows as a reward!
119 * WONTFIX: code reloading with Sinatra 0.3.2 (and likely older
120 versions) apps is broken. The workaround is to force production
121 mode to disable code reloading in your Sinatra application:
122 set :env, :production
123 Since this is no longer an issue with Sinatra 0.9.x apps and only
124 affected non-production instances, this will not be fixed on our end.
125 Also remember we're capable of replacing the running binary without
126 dropping any connections regardless of framework :)
130 Newsgroup and mailing list maybe coming...
131 Email Eric Wong at normalperson@yhbt.net for now.