unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
$ git log --pretty=format:'%h %s (%cs)%d' v0.2.1 --
5ce8e94 unicorn v0.2.1, fix the Manifest (2009-03-18)
	(tag: v0.2.1)
45d2b9b unicorn 0.2.0 (2009-03-18)
	(tag: v0.2.0)
66180ed Documentation updates, prepare for 0.2.0 (2009-03-18)
6ffb863 Add unicorn_rails script for Rails 2.3.2 (2009-03-18)
f55db91 Add signal queueing for test reliability (2009-03-18)
29c6af9 gracefully die if working dir is invalid at fork (2009-03-18)
2373b66 tests: do not trust (our correct use of) 1.9 encodings (2009-03-18)
ec8972d Allow binding to UNIX sockets relative to "~" (2009-03-17)
de6ebc4 Start _Known Issues_ section in README (2009-03-16)
ca4265e HttpRequest: update comment regarding short writes (2009-03-10)
	(tag: v0.1.0)
...

$ git cat-file blob v0.2.1:README
= Unicorn: UNIX + LAN/localhost-only fork of Mongrel

Only run this behind a full-HTTP-request-buffering reverse proxy if
you're serving slow clients.  That said, nginx is the only reverse
proxy we know of that meets this requirement.

== Features

* process management: Unicorn will reap and restart workers that
  die because of broken apps and there is no need to manage
  multiple processes yourself.

* does not care if your application is thread-safe or not, workers
  all run within their own isolated address space and only serve one
  client at a time...

* able to listen on multiple interfaces, including UNIX sockets,
  each worker process can also bind to a private port via the
  after_fork hook for easy debugging.

* supports all Rack applications

* nginx-style binary re-execution without losing connections.
  You can upgrade unicorn, your entire application, libraries
  and even your Ruby interpreter as long as unicorn is
  installed in the same path.

* before_fork and after_fork hooks in case your application
  has special needs when dealing with forked processes.

* builtin log rotation via USR1 signal

* Ruby 1.9-compatible (at least the test cases all pass :>)

== License

Unicorn is copyright 2009 Eric Wong and contributors.
It is based on Mongrel and carries the same license:

Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
under the Ruby license and the GPL2. See the include LICENSE file for
details.

== Install

The library consists of a C extension so you'll need a C compiler or at
least a friend who can build it for you.

You may download the tarball from the Mongrel project page on Rubyforge
and run setup.rb after unpacking it:

  http://rubyforge.org/frs/?group_id=1306

You may also install it via Rubygems on Rubyforge:

  gem install unicorn

You can get the latest source via git from the following locations
(these versions may not be stable):

  git://git.bogomips.org/unicorn.git
  http://git.bogomips.org/unicorn.git
  git://repo.or.cz/unicorn.git (mirror)
  http://repo.or.cz/r/unicorn.git (mirror)

If you have web browser software for the World Wide Web
(on the Information Superhighway), you may browse the code from
your web browser and download the latest snapshot tarballs here:

* http://git.bogomips.org/cgit/unicorn.git
* http://repo.or.cz/w/unicorn.git (gitweb mirror)

== Usage

=== non-Rails Rack applications

Unicorn will look for the config.ru file used by rackup in APP_ROOT.
Optionally, it can use a config file for unicorn-specific options
specified by the --config-file/-c command-line switch.  See
Unicorn::Configurator for the syntax of the unicorn-specific
config options.

In APP_ROOT, just run:

  unicorn

Unicorn should be capable of running most Rack applications.  Since this
is a preforking webserver, you do not have to worry about thread-safety
of your application or libraries. However, your Rack application may use
threads internally (and should even be able to continue running threads
after the request is complete).

=== Rack-enabled versions of Rails (v2.3.2+)

In RAILS_ROOT, run:

  unicorn_rails

Most command-line options for other Rack applications (above) are also
supported.  The unicorn_rails launcher attempts to combine the best
features of the Rails-bundled "script/server" with the "rackup"-like
functionality of the `unicorn' launcher.

== Disclaimer

There are no known production instances of unicorn deployed
anywhere in the world.  The original author of unicorn only has
one, internal, low-traffic Sinatra application deployed with it.
Maybe you'll be the first guinea pig to test it in production.
Of course there is NO WARRANTY whatsoever if anything goes wrong,
but let us know and we'll try our best to fix it.

== Known Issues

* WONTFIX: code reloading with Sinatra 0.3.2 (and likely older
  versions) apps is broken.  The workaround is to force production
  mode to disable code reloading in your Sinatra application:
    set :env, :production
  Since this is no longer an issue with Sinatra 0.9.x apps and only
  affected non-production instances, this will not be fixed on our end.
  Also remember we're capable of replacing the running binary without
  dropping any connections regardless of framework :)

== Contact

Newsgroup and mailing list maybe coming...
Email Eric Wong at normalperson@yhbt.net for now.

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       t/lib.perl: fix Perl integration tests w/o installation (2024-04-15)
  pico         ext: switch filter_body to picohttpparser (2021-10-25)
  v6-wip       Merge remote-tracking branch 'origin/master' into v6-wip (2021-03-15)
  gperf        http: gperf 3.0.3 compatibility (2019-07-05)
  no-kgio-wip  remove kgio from all read(2) and write(2) wrappers (2019-05-26)
  5.4-stable   unicorn 5.4.1 (2018-07-23)
  5.3-stable   unicorn 5.3.1 (2017-10-03)
  ccc-tcp-v3   test_ccc: use a pipe to synchronize test (2017-03-22)
  worker_exec  Don't pass a block for fork when forking workers (2017-03-13)
  doc-5.3.0    doc: add version annotations for new features (2017-03-08)
...

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v6.1.0       unicorn 6.1.0 (2021-12-25) tar.gz
v6.0.0       unicorn 6.0.0 - no more recycling Rack env (2021-03-17) tar.gz
v5.8.0       unicorn 5.8.0 - rack.after_reply support (2020-12-24) tar.gz
v5.7.0       unicorn 5.7.0 (2020-09-08) tar.gz
v5.6.0       unicorn 5.6.0 - early_hints support (2020-07-26) tar.gz
v5.5.5       unicorn 5.5.5 (2020-04-27) tar.gz
v5.5.4       unicorn 5.5.4 (2020-03-24) tar.gz
v5.5.3       unicorn 5.5.3 (2020-01-31) tar.gz
v5.5.2       unicorn 5.5.2 (2019-12-20) tar.gz
v5.5.1       unicorn 5.5.1 (2019-05-06) tar.gz
...

# associated public inboxes:
# (number on the left is used for dev purposes)
            https://yhbt.net/unicorn-public

git clone https://yhbt.net/unicorn.git