unicorn 4.9.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Application_Timeouts +3 -3
- data/DESIGN +2 -4
- data/Documentation/unicorn.1.txt +8 -5
- data/Documentation/unicorn_rails.1.txt +2 -2
- data/FAQ +17 -8
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +6 -1
- data/ISSUES +20 -28
- data/KNOWN_ISSUES +9 -9
- data/Links +14 -17
- data/PHILOSOPHY +0 -6
- data/README +22 -17
- data/SIGNALS +1 -1
- data/Sandbox +4 -4
- data/TUNING +11 -8
- data/bin/unicorn +1 -1
- data/bin/unicorn_rails +1 -1
- data/examples/nginx.conf +10 -11
- data/examples/unicorn.conf.rb +1 -4
- data/ext/unicorn_http/extconf.rb +1 -0
- data/ext/unicorn_http/httpdate.c +1 -1
- data/ext/unicorn_http/unicorn_http.rl +89 -156
- data/lib/unicorn.rb +10 -18
- data/lib/unicorn/configurator.rb +17 -31
- data/lib/unicorn/const.rb +2 -25
- data/lib/unicorn/http_request.rb +22 -33
- data/lib/unicorn/http_response.rb +14 -32
- data/lib/unicorn/http_server.rb +129 -122
- data/lib/unicorn/socket_helper.rb +36 -72
- data/lib/unicorn/stream_input.rb +3 -3
- data/lib/unicorn/tmpio.rb +0 -5
- data/lib/unicorn/util.rb +2 -1
- data/lib/unicorn/worker.rb +3 -15
- data/t/hijack.ru +2 -1
- data/t/t0200-rack-hijack.sh +5 -2
- data/test/exec/test_exec.rb +52 -0
- data/test/test_helper.rb +3 -2
- data/test/unit/test_http_parser_ng.rb +16 -114
- data/test/unit/test_response.rb +19 -16
- data/test/unit/test_socket_helper.rb +1 -1
- data/unicorn.gemspec +10 -1
- metadata +10 -23
- data/examples/git.ru +0 -13
- data/lib/unicorn/app/exec_cgi.rb +0 -154
- data/lib/unicorn/app/inetd.rb +0 -109
- data/lib/unicorn/ssl_client.rb +0 -11
- data/lib/unicorn/ssl_configurator.rb +0 -104
- data/lib/unicorn/ssl_server.rb +0 -42
- data/t/t0016-trust-x-forwarded-false.sh +0 -30
- data/t/t0017-trust-x-forwarded-true.sh +0 -30
- data/test/unit/test_http_parser_xftrust.rb +0 -38
- data/test/unit/test_sni_hostnames.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0f63df97befc889520fdfd69aa7e8acc52e6a98
|
4
|
+
data.tar.gz: a09d9d5c31dffbb73b43675496545ab22a67af2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01bcc9ba08ff53c1649de5939d8c3b8ec96d6bfc6bf4b95c1e50d4017c316eaacfd332ddf90409c2225298e4540cbaddc167d12c96c960bf78934691978167cb
|
7
|
+
data.tar.gz: 9601aa0700f3597941f38740274fcba8cd7c5835741e64611dbace52609be533f78328f6336ce5813ed0e96a853f8946d19b55321880acd07bcdd3f5048b2d75
|
data/Application_Timeouts
CHANGED
@@ -4,10 +4,10 @@ This article focuses on _application_ setup for Rack applications, but
|
|
4
4
|
can be expanded to all applications that connect to external resources
|
5
5
|
and expect short response times.
|
6
6
|
|
7
|
-
This article is not specific to
|
7
|
+
This article is not specific to unicorn, but exists to discourage
|
8
8
|
the overuse of the built-in
|
9
9
|
{timeout}[link:Unicorn/Configurator.html#method-i-timeout] directive
|
10
|
-
in
|
10
|
+
in unicorn.
|
11
11
|
|
12
12
|
== ALL External Resources Are Considered Unreliable
|
13
13
|
|
@@ -71,7 +71,7 @@ handle network/server failures.
|
|
71
71
|
== The Last Line Of Defense
|
72
72
|
|
73
73
|
The {timeout}[link:Unicorn/Configurator.html#method-i-timeout] mechanism
|
74
|
-
in
|
74
|
+
in unicorn is an extreme solution that should be avoided whenever
|
75
75
|
possible. It will help catch bugs in your application where and when
|
76
76
|
your application forgets to use timeouts, but it is expensive as it
|
77
77
|
kills and respawns a worker process.
|
data/DESIGN
CHANGED
@@ -7,9 +7,7 @@
|
|
7
7
|
all clients down, just one. Only UNIX-like systems supporting
|
8
8
|
fork() and file descriptor inheritance are supported.
|
9
9
|
|
10
|
-
* The Ragel+C HTTP parser is taken from Mongrel.
|
11
|
-
only non-Ruby part and there are no plans to add any more
|
12
|
-
non-Ruby components.
|
10
|
+
* The Ragel+C HTTP parser is taken from Mongrel.
|
13
11
|
|
14
12
|
* All HTTP parsing and I/O is done much like Mongrel:
|
15
13
|
1. read/parse HTTP request headers in full
|
@@ -31,7 +29,7 @@
|
|
31
29
|
* One master process spawns and reaps worker processes. The
|
32
30
|
Rack application itself is called only within the worker process (but
|
33
31
|
can be loaded within the master). A copy-on-write friendly garbage
|
34
|
-
collector like the one found in Ruby 2.0.
|
32
|
+
collector like the one found in mainline Ruby 2.0.0 and later
|
35
33
|
can be used to minimize memory usage along with the "preload_app true"
|
36
34
|
directive (see Unicorn::Configurator).
|
37
35
|
|
data/Documentation/unicorn.1.txt
CHANGED
@@ -166,9 +166,12 @@ variable internally when doing transparent upgrades.
|
|
166
166
|
UNICORN_FD is a comma-delimited list of one or more file descriptors
|
167
167
|
used to implement USR2 upgrades. Init systems may bind listen sockets
|
168
168
|
itself and spawn unicorn with UNICORN_FD set to the file descriptor
|
169
|
-
numbers of the listen socket(s).
|
170
|
-
|
171
|
-
|
169
|
+
numbers of the listen socket(s).
|
170
|
+
|
171
|
+
As of unicorn 5.0, LISTEN_PID and LISTEN_FDS are used for socket
|
172
|
+
activation as documented in the sd_listen_fds(3) manpage. Users
|
173
|
+
relying on this feature do not need to specify a listen socket in
|
174
|
+
the unicorn config file.
|
172
175
|
|
173
176
|
# SEE ALSO
|
174
177
|
|
@@ -180,6 +183,6 @@ startup, otherwise the socket will be closed.
|
|
180
183
|
* [Rackup HowTo][3]
|
181
184
|
|
182
185
|
[1]: http://unicorn.bogomips.org/
|
183
|
-
[2]: http://
|
184
|
-
[3]:
|
186
|
+
[2]: http://www.rubydoc.info/github/rack/rack/
|
187
|
+
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
|
185
188
|
[4]: http://unicorn.bogomips.org/SIGNALS.html
|
@@ -170,6 +170,6 @@ used by Unicorn.
|
|
170
170
|
* [Rackup HowTo][3]
|
171
171
|
|
172
172
|
[1]: http://unicorn.bogomips.org/
|
173
|
-
[2]: http://
|
174
|
-
[3]:
|
173
|
+
[2]: http://www.rubydoc.info/github/rack/rack/
|
174
|
+
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
|
175
175
|
[4]: http://unicorn.bogomips.org/SIGNALS.html
|
data/FAQ
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
= Frequently Asked Questions about Unicorn
|
2
2
|
|
3
|
+
=== Why is nginx getting ECONNRESET as a reverse proxy?
|
4
|
+
|
5
|
+
Request body data (commonly from POST and PUT requests) may not be
|
6
|
+
drained entirely by the application. This may happen when request
|
7
|
+
bodies are gzipped, as unicorn reads request body data lazily to avoid
|
8
|
+
overhead from bad requests.
|
9
|
+
|
10
|
+
Ref: http://mid.gmane.org/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com
|
11
|
+
|
3
12
|
=== Why aren't my Rails log files rotated when I use SIGUSR1?
|
4
13
|
|
5
14
|
The Rails autoflush_log option must remain disabled with multiprocess
|
@@ -8,14 +17,6 @@ partially written and lead to corruption in the presence of multiple
|
|
8
17
|
processes. With reasonable amounts of logging, the performance impact
|
9
18
|
of autoflush_log should be negligible on Linux and other modern kernels.
|
10
19
|
|
11
|
-
=== I've installed Rack 1.1.x, why can't Unicorn load Rails (2.3.5)?
|
12
|
-
|
13
|
-
Rails 2.3.5 is not compatible with Rack 1.1.x. Unicorn is compatible
|
14
|
-
with both Rack 1.1.x and Rack 1.0.x, and RubyGems will load the latest
|
15
|
-
version of Rack installed on the system. Uninstalling the Rack 1.1.x
|
16
|
-
gem should solve gem loading issues with Rails 2.3.5. Rails 2.3.6
|
17
|
-
and later correctly support Rack 1.1.x.
|
18
|
-
|
19
20
|
=== Why are my redirects going to "http" URLs when my site uses https?
|
20
21
|
|
21
22
|
If your site is entirely behind https, then Rack applications that use
|
@@ -59,3 +60,11 @@ queue makes failover to a different machine more difficult.
|
|
59
60
|
|
60
61
|
See the TUNING and Unicorn::Configurator documents for more information
|
61
62
|
on :backlog-related topics.
|
63
|
+
|
64
|
+
=== I've installed Rack 1.1.x, why can't Unicorn load Rails (2.3.5)?
|
65
|
+
|
66
|
+
Rails 2.3.5 is not compatible with Rack 1.1.x. Unicorn is compatible
|
67
|
+
with both Rack 1.1.x and Rack 1.0.x, and RubyGems will load the latest
|
68
|
+
version of Rack installed on the system. Uninstalling the Rack 1.1.x
|
69
|
+
gem should solve gem loading issues with Rails 2.3.5. Rails 2.3.6
|
70
|
+
and later correctly support Rack 1.1.x.
|
data/GIT-VERSION-GEN
CHANGED
data/GNUmakefile
CHANGED
@@ -86,10 +86,14 @@ test-unit: $(wildcard test/unit/test_*.rb)
|
|
86
86
|
$(slow_tests): $(test_prefix)/.stamp
|
87
87
|
@$(MAKE) $(shell $(awk_slow) $@)
|
88
88
|
|
89
|
+
# ensure we can require just the HTTP parser without the rest of unicorn
|
90
|
+
test-require: $(ext)/unicorn_http.$(DLEXT)
|
91
|
+
$(RUBY) --disable-gems -I$(ext) -runicorn_http -e Unicorn
|
92
|
+
|
89
93
|
test-integration: $(test_prefix)/.stamp
|
90
94
|
$(MAKE) -C t
|
91
95
|
|
92
|
-
check: test test-integration
|
96
|
+
check: test-require test test-integration
|
93
97
|
test-all: check
|
94
98
|
|
95
99
|
TEST_OPTS = -v
|
@@ -174,6 +178,7 @@ doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
|
|
174
178
|
$(RDOC) -f oldweb
|
175
179
|
$(OLDDOC) merge
|
176
180
|
install -m644 COPYING doc/COPYING
|
181
|
+
install -m644 NEWS.atom.xml doc/NEWS.atom.xml
|
177
182
|
install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
|
178
183
|
install -m644 $(man1_paths) doc/
|
179
184
|
tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
|
data/ISSUES
CHANGED
@@ -9,7 +9,10 @@ submit patches and/or obtain support after you have searched the
|
|
9
9
|
* Cc: all participants in a thread or commit, as subscription is optional
|
10
10
|
* Do not {top post}[http://catb.org/jargon/html/T/top-post.html] in replies
|
11
11
|
* Quote as little as possible of the message you're replying to
|
12
|
-
* Do not send HTML mail, it will
|
12
|
+
* Do not send HTML mail or images, it will be flagged as spam
|
13
|
+
* Anonymous and pseudonymous messages will always be welcome.
|
14
|
+
* The email submission port (587) is enabled on the bogomips.org MX:
|
15
|
+
http://bogomips.org/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
|
13
16
|
|
14
17
|
If your issue is of a sensitive nature or you're just shy in public,
|
15
18
|
then feel free to email us privately at mailto:unicorn@bogomips.org
|
@@ -62,39 +65,28 @@ document distributed with git) on guidelines for patch submission.
|
|
62
65
|
|
63
66
|
* public: mailto:unicorn-public@bogomips.org
|
64
67
|
* private: mailto:unicorn@bogomips.org
|
68
|
+
* nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
69
|
+
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
|
70
|
+
* http://bogomips.org/unicorn-public/
|
65
71
|
|
66
72
|
We operate a {public-inbox}[http://public-inbox.org/] which
|
67
|
-
feeds the mailing list.
|
68
|
-
|
69
|
-
to mailto:unicorn-public+subscribe@bogomips.org
|
73
|
+
feeds the mailing list. Subscription is optional, so Cc:
|
74
|
+
all participants.
|
70
75
|
|
71
|
-
|
72
|
-
fashion to tools such as slrnpull, fetchmail, or getmail. ssoma
|
73
|
-
subscription instructions:
|
76
|
+
You can follow along via NNTP:
|
74
77
|
|
75
|
-
|
76
|
-
|
78
|
+
nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
|
79
|
+
nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
77
80
|
|
78
|
-
|
79
|
-
# ssoma will not touch existing messages)
|
80
|
-
# If you prefer mbox, use mbox:/path/to/mbox as the last argument
|
81
|
-
# You may also use imap://$MAILSERVER/INBOX for an IMAP account
|
82
|
-
# or imaps:// for an IMAPS account, as well.
|
83
|
-
ssoma add $LISTNAME $URL maildir:/path/to/maildir
|
81
|
+
Or Atom feeds:
|
84
82
|
|
85
|
-
|
86
|
-
mutt -f /path/to/maildir # (or /path/to/mbox)
|
83
|
+
http://bogomips.org/unicorn-public/new.atom
|
87
84
|
|
88
|
-
|
89
|
-
|
85
|
+
The HTML archives at http://bogomips.org/unicorn-public/
|
86
|
+
also has links to per-thread Atom feeds and downloadable
|
87
|
+
mboxes.
|
90
88
|
|
91
|
-
|
92
|
-
# this does not affect ssoma functionality at all
|
89
|
+
You may also subscribe via plain-text email:
|
93
90
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
# You may wish to sync in your cronjob
|
98
|
-
ssoma sync --cron
|
99
|
-
|
100
|
-
HTML archives are available here: http://bogomips.org/unicorn-public/
|
91
|
+
mailto:unicorn-public+subscribe@bogomips.org
|
92
|
+
(and confirming the auto-reply)
|
data/KNOWN_ISSUES
CHANGED
@@ -13,7 +13,7 @@ acceptable solution. Those issues are documented here.
|
|
13
13
|
|
14
14
|
* PRNGs (pseudo-random number generators) loaded before forking
|
15
15
|
(e.g. "preload_app true") may need to have their internal state
|
16
|
-
reset in the after_fork hook. Starting with
|
16
|
+
reset in the after_fork hook. Starting with unicorn 3.6.1, we
|
17
17
|
have builtin workarounds for Kernel#rand and OpenSSL::Random users,
|
18
18
|
but applications may use other PRNGs.
|
19
19
|
|
@@ -36,29 +36,29 @@ acceptable solution. Those issues are documented here.
|
|
36
36
|
|
37
37
|
* Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
|
38
38
|
after_fork hook to get correct random number generation. We have a builtin
|
39
|
-
workaround for this starting with
|
39
|
+
workaround for this starting with unicorn 3.6.1
|
40
40
|
|
41
|
-
See http://
|
41
|
+
See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/36450
|
42
42
|
|
43
43
|
* On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
|
44
44
|
stdio that causes failure for file uploads larger than 112K. Upgrade
|
45
|
-
your version of Ruby or continue using
|
45
|
+
your version of Ruby or continue using unicorn 1.x/3.4.x.
|
46
46
|
|
47
47
|
* Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will
|
48
48
|
segfault if called after forking. Upgrade to Ruby 1.9.2 or call
|
49
49
|
"Kernel.rand" in your after_fork hook to reinitialize the random
|
50
50
|
number generator.
|
51
51
|
|
52
|
-
See http://
|
52
|
+
See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/28655
|
53
53
|
|
54
54
|
* Rails 2.3.2 bundles its own version of Rack. This may cause subtle
|
55
55
|
bugs when simultaneously loaded with the system-wide Rack Rubygem
|
56
|
-
which
|
56
|
+
which unicorn depends on. Upgrading to Rails 2.3.4 (or later) is
|
57
57
|
strongly recommended for all Rails 2.3.x users for this (and security
|
58
58
|
reasons). Rails 2.2.x series (or before) did not bundle Rack and are
|
59
59
|
should be unnaffected. If there is any reason which forces your
|
60
60
|
application to use Rails 2.3.2 and you have no other choice, then
|
61
|
-
you may edit your
|
61
|
+
you may edit your unicorn gemspec and remove the Rack dependency.
|
62
62
|
|
63
63
|
ref: http://mid.gmane.org/20091014221552.GA30624@dcvr.yhbt.net
|
64
64
|
Note: the workaround described in the article above only made
|
@@ -71,9 +71,9 @@ acceptable solution. Those issues are documented here.
|
|
71
71
|
set :env, :production
|
72
72
|
set :run, false
|
73
73
|
Since this is no longer an issue with Sinatra 0.9.x apps, this will not be
|
74
|
-
fixed on our end. Since
|
74
|
+
fixed on our end. Since unicorn is itself the application launcher, the
|
75
75
|
at_exit handler used in old Sinatra always caused Mongrel to be launched
|
76
|
-
whenever a
|
76
|
+
whenever a unicorn worker was about to exit.
|
77
77
|
|
78
78
|
Also remember we're capable of replacing the running binary without dropping
|
79
79
|
any connections regardless of framework :)
|
data/Links
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
= Related Projects
|
2
2
|
|
3
|
-
If you're interested in
|
3
|
+
If you're interested in unicorn, you may be interested in some of the projects
|
4
4
|
listed below. If you have any links to add/change/remove, please tell us at
|
5
5
|
mailto:unicorn-public@bogomips.org!
|
6
6
|
|
7
7
|
== Disclaimer
|
8
8
|
|
9
|
-
The
|
10
|
-
Furthermore, the
|
9
|
+
The unicorn project is not responsible for the content in these links.
|
10
|
+
Furthermore, the unicorn project has never, does not and will never endorse:
|
11
11
|
|
12
12
|
* any for-profit entities or services
|
13
13
|
* any non-{Free Software}[http://www.gnu.org/philosophy/free-sw.html]
|
@@ -15,13 +15,13 @@ Furthermore, the \Unicorn project has never, does not and will never endorse:
|
|
15
15
|
The existence of these links does not imply endorsement of any entities
|
16
16
|
or services behind them.
|
17
17
|
|
18
|
-
=== For use with
|
18
|
+
=== For use with unicorn
|
19
19
|
|
20
20
|
* {Bluepill}[https://github.com/arya/bluepill] -
|
21
21
|
a simple process monitoring tool written in Ruby
|
22
22
|
|
23
23
|
* {golden_brindle}[https://github.com/simonoff/golden_brindle] - tool to
|
24
|
-
manage multiple
|
24
|
+
manage multiple unicorn instances/applications on a single server
|
25
25
|
|
26
26
|
* {raindrops}[http://raindrops.bogomips.org/] - real-time stats for
|
27
27
|
preforking Rack servers
|
@@ -29,26 +29,23 @@ or services behind them.
|
|
29
29
|
* {UnXF}[http://bogomips.org/unxf/] Un-X-Forward* the Rack environment,
|
30
30
|
useful since unicorn is designed to be deployed behind a reverse proxy.
|
31
31
|
|
32
|
-
===
|
32
|
+
=== unicorn is written to work with
|
33
33
|
|
34
34
|
* {Rack}[http://rack.github.io/] - a minimal interface between webservers
|
35
35
|
supporting Ruby and Ruby frameworks
|
36
36
|
|
37
|
-
* {Ruby}[
|
37
|
+
* {Ruby}[https://www.ruby-lang.org/en/] - the programming language of
|
38
|
+
Rack and unicorn
|
38
39
|
|
39
|
-
* {nginx}[http://nginx.org/]
|
40
|
-
|
41
|
-
* {kgio}[http://bogomips.org/kgio/] - the I/O library written for \Unicorn
|
40
|
+
* {nginx}[http://nginx.org/] (Free versions) -
|
41
|
+
the reverse proxy for use with unicorn
|
42
42
|
|
43
43
|
=== Derivatives
|
44
44
|
|
45
|
-
* {Green Unicorn}[http://gunicorn.org/] - a Python version of
|
46
|
-
|
47
|
-
* {Rainbows!}[http://rainbows.bogomips.org/] - \Unicorn for sleepy
|
48
|
-
apps and slow clients (historical).
|
45
|
+
* {Green Unicorn}[http://gunicorn.org/] - a Python version of unicorn
|
49
46
|
|
50
|
-
* {
|
51
|
-
|
47
|
+
* {Starman}[http://search.cpan.org/dist/Starman/] - Plack/PSGI version
|
48
|
+
of unicorn
|
52
49
|
|
53
50
|
=== Prior Work
|
54
51
|
|
@@ -56,4 +53,4 @@ or services behind them.
|
|
56
53
|
unicorn is based on
|
57
54
|
|
58
55
|
* {david}[http://bogomips.org/david.git] - a tool to explain why you need
|
59
|
-
nginx in front of
|
56
|
+
nginx in front of unicorn
|
data/PHILOSOPHY
CHANGED
@@ -137,9 +137,3 @@ unicorn is highly inefficient for Comet/reverse-HTTP/push applications
|
|
137
137
|
where the HTTP connection spends a large amount of time idle.
|
138
138
|
Nevertheless, the ease of troubleshooting, debugging, and management of
|
139
139
|
unicorn may still outweigh the drawbacks for these applications.
|
140
|
-
|
141
|
-
The {Rainbows!}[http://rainbows.bogomips.org/] aims to fill the gap for
|
142
|
-
odd corner cases where the nginx + unicorn combination is not enough.
|
143
|
-
While Rainbows! management/administration is largely identical to
|
144
|
-
unicorn, Rainbows! is far more ambitious and has seen little real-world
|
145
|
-
usage.
|
data/README
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
=
|
1
|
+
= unicorn: Rack HTTP server for fast clients and Unix
|
2
2
|
|
3
|
-
|
3
|
+
unicorn is an HTTP server for Rack applications designed to only serve
|
4
4
|
fast clients on low-latency, high-bandwidth connections and take
|
5
5
|
advantage of features in Unix/Unix-like kernels. Slow clients should
|
6
6
|
only be served by placing a reverse proxy capable of fully buffering
|
7
|
-
both the the request and response in between
|
7
|
+
both the the request and response in between unicorn and slow clients.
|
8
8
|
|
9
9
|
== Features
|
10
10
|
|
11
11
|
* Designed for Rack, Unix, fast clients, and ease-of-debugging. We
|
12
12
|
cut out everything that is better supported by the operating system,
|
13
|
-
{nginx}[http://nginx.
|
13
|
+
{nginx}[http://nginx.org/] or {Rack}[http://rack.github.io/].
|
14
14
|
|
15
15
|
* Compatible with Ruby 1.9.3 and later.
|
16
16
|
unicorn 4.8.x will remain supported for Ruby 1.8 users.
|
17
17
|
|
18
|
-
* Process management:
|
18
|
+
* Process management: unicorn will reap and restart workers that
|
19
19
|
die from broken apps. There is no need to manage multiple processes
|
20
|
-
or ports yourself.
|
20
|
+
or ports yourself. unicorn can spawn and manage any number of
|
21
21
|
worker processes you choose to scale to your backend.
|
22
22
|
|
23
23
|
* Load balancing is done entirely by the operating system kernel.
|
@@ -33,11 +33,11 @@ both the the request and response in between \Unicorn and slow clients.
|
|
33
33
|
* Builtin reopening of all log files in your application via
|
34
34
|
USR1 signal. This allows logrotate to rotate files atomically and
|
35
35
|
quickly via rename instead of the racy and slow copytruncate method.
|
36
|
-
|
36
|
+
unicorn also takes steps to ensure multi-line log entries from one
|
37
37
|
request all stay within the same file.
|
38
38
|
|
39
39
|
* nginx-style binary upgrades without losing connections.
|
40
|
-
You can upgrade
|
40
|
+
You can upgrade unicorn, your entire application, libraries
|
41
41
|
and even your Ruby interpreter without dropping clients.
|
42
42
|
|
43
43
|
* before_fork and after_fork hooks in case your application
|
@@ -60,15 +60,15 @@ both the the request and response in between \Unicorn and slow clients.
|
|
60
60
|
|
61
61
|
== License
|
62
62
|
|
63
|
-
|
63
|
+
unicorn is copyright 2009 by all contributors (see logs in git).
|
64
64
|
It is based on Mongrel 1.1.5.
|
65
65
|
Mongrel is copyright 2007 Zed A. Shaw and contributors.
|
66
66
|
|
67
|
-
|
67
|
+
unicorn is licensed under (your choice) of the GPLv2 or later
|
68
68
|
(GPLv3+ preferred), or Ruby (1.8)-specific terms.
|
69
69
|
See the included LICENSE file for details.
|
70
70
|
|
71
|
-
|
71
|
+
unicorn is 100% Free Software.
|
72
72
|
|
73
73
|
== Install
|
74
74
|
|
@@ -108,17 +108,17 @@ In RAILS_ROOT, run:
|
|
108
108
|
|
109
109
|
unicorn_rails
|
110
110
|
|
111
|
-
|
111
|
+
unicorn will bind to all interfaces on TCP port 8080 by default.
|
112
112
|
You may use the +--listen/-l+ switch to bind to a different
|
113
113
|
address:port or a UNIX socket.
|
114
114
|
|
115
115
|
=== Configuration File(s)
|
116
116
|
|
117
|
-
|
117
|
+
unicorn will look for the config.ru file used by rackup in APP_ROOT.
|
118
118
|
|
119
|
-
For deployments, it can use a config file for
|
119
|
+
For deployments, it can use a config file for unicorn-specific options
|
120
120
|
specified by the +--config-file/-c+ command-line switch. See
|
121
|
-
Unicorn::Configurator for the syntax of the
|
121
|
+
Unicorn::Configurator for the syntax of the unicorn-specific options.
|
122
122
|
The default settings are designed for maximum out-of-the-box
|
123
123
|
compatibility with existing applications.
|
124
124
|
|
@@ -130,7 +130,7 @@ supported. Run `unicorn -h` to see command-line options.
|
|
130
130
|
There is NO WARRANTY whatsoever if anything goes wrong, but
|
131
131
|
{let us know}[link:ISSUES.html] and we'll try our best to fix it.
|
132
132
|
|
133
|
-
|
133
|
+
unicorn is designed to only serve fast clients either on the local host
|
134
134
|
or a fast LAN. See the PHILOSOPHY and DESIGN documents for more details
|
135
135
|
regarding this.
|
136
136
|
|
@@ -140,6 +140,11 @@ All feedback (bug reports, user/development dicussion, patches, pull
|
|
140
140
|
requests) go to the mailing list/newsgroup. See the ISSUES document for
|
141
141
|
information on the {mailing list}[mailto:unicorn-public@bogomips.org].
|
142
142
|
|
143
|
-
|
143
|
+
The mailing list is archived at http://bogomips.org/unicorn-public/
|
144
|
+
Read-only NNTP access is available at:
|
145
|
+
nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn and
|
146
|
+
nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
147
|
+
|
148
|
+
For the latest on unicorn releases, you may also finger us at
|
144
149
|
unicorn@bogomips.org or check our NEWS page (and subscribe to our Atom
|
145
150
|
feed).
|