unicorn-shopify 4.8.2.5.25 → 5.2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.olddoc.yml +6 -3
- data/Application_Timeouts +3 -3
- data/DESIGN +2 -4
- data/Documentation/unicorn.1.txt +10 -8
- data/Documentation/unicorn_rails.1.txt +5 -5
- data/FAQ +17 -8
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +4 -3
- data/HACKING +1 -1
- data/ISSUES +22 -32
- data/KNOWN_ISSUES +11 -11
- data/Links +16 -19
- data/PHILOSOPHY +0 -6
- data/README +26 -33
- data/SIGNALS +2 -2
- data/Sandbox +10 -9
- data/TODO +0 -2
- data/TUNING +24 -6
- data/examples/big_app_gc.rb +1 -1
- data/examples/init.sh +36 -8
- data/examples/logrotate.conf +16 -1
- data/examples/nginx.conf +11 -12
- data/examples/unicorn.conf.minimal.rb +2 -2
- data/examples/unicorn.conf.rb +3 -6
- data/ext/unicorn_http/common_field_optimization.h +2 -2
- data/ext/unicorn_http/ext_help.h +0 -20
- data/ext/unicorn_http/extconf.rb +2 -1
- data/ext/unicorn_http/global_variables.h +2 -2
- data/ext/unicorn_http/httpdate.c +2 -2
- data/ext/unicorn_http/unicorn_http.rl +73 -22
- data/ext/unicorn_http/unicorn_http_common.rl +1 -1
- data/lib/unicorn.rb +33 -22
- data/lib/unicorn/configurator.rb +64 -19
- data/lib/unicorn/http_request.rb +19 -36
- data/lib/unicorn/http_response.rb +15 -28
- data/lib/unicorn/http_server.rb +72 -56
- data/lib/unicorn/oob_gc.rb +4 -4
- data/lib/unicorn/socket_helper.rb +3 -5
- data/lib/unicorn/stream_input.rb +3 -3
- data/lib/unicorn/tee_input.rb +1 -3
- data/lib/unicorn/util.rb +1 -1
- data/lib/unicorn/worker.rb +12 -5
- data/t/hijack.ru +2 -1
- data/t/t0011-active-unix-socket.sh +1 -1
- data/t/t0012-reload-empty-config.sh +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.rb +32 -0
- data/test/unit/test_http_parser_ng.rb +11 -0
- data/test/unit/test_response.rb +29 -11
- data/unicorn.gemspec +18 -9
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37d81e662817a33c7bc62cb22875b939d280a69f
|
4
|
+
data.tar.gz: 6a2cdb5e28411ef5b06020053cf16ea4e148da52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c55f4304517c649940c0508522dc9f74a46bf186ed1082951285ec8f10c521d6cb6b5a2fa4043ee6f3d71cf9e1431bc016b62641b3cc80d619c734b3f53ffd
|
7
|
+
data.tar.gz: 760fe017842bc73635a4412b19485aa47441d2eb9c6c09c7efd4be9c3e4f13c457edb30efe17d93c6498e37004d77e1e93f0aefb89a77e17d2c63ffd166c3ac3
|
data/.olddoc.yml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
---
|
2
|
-
cgit_url:
|
2
|
+
cgit_url: https://bogomips.org/unicorn.git
|
3
3
|
git_url: git://bogomips.org/unicorn.git
|
4
|
-
rdoc_url:
|
5
|
-
ml_url:
|
4
|
+
rdoc_url: https://bogomips.org/unicorn/
|
5
|
+
ml_url: https://bogomips.org/unicorn-public/
|
6
6
|
merge_html:
|
7
7
|
unicorn_1: Documentation/unicorn.1.html
|
8
8
|
unicorn_rails_1: Documentation/unicorn_rails.1.html
|
@@ -13,3 +13,6 @@ noindex:
|
|
13
13
|
- unicorn_rails_1
|
14
14
|
public_email: unicorn-public@bogomips.org
|
15
15
|
private_email: unicorn@bogomips.org
|
16
|
+
nntp_url:
|
17
|
+
- nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
|
18
|
+
- nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
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,20 +166,22 @@ 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
|
|
175
|
-
* unicorn_rails(1)
|
176
178
|
* *Rack::Builder* ri/RDoc
|
177
179
|
* *Unicorn::Configurator* ri/RDoc
|
178
180
|
* [Unicorn RDoc][1]
|
179
181
|
* [Rack RDoc][2]
|
180
182
|
* [Rackup HowTo][3]
|
181
183
|
|
182
|
-
[1]:
|
183
|
-
[2]: http://
|
184
|
-
[3]:
|
185
|
-
[4]:
|
184
|
+
[1]: https://bogomips.org/unicorn/
|
185
|
+
[2]: http://www.rubydoc.info/github/rack/rack/
|
186
|
+
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
|
187
|
+
[4]: https://bogomips.org/unicorn/SIGNALS.html
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# NAME
|
6
6
|
|
7
|
-
unicorn_rails -
|
7
|
+
unicorn_rails - unicorn launcher for Rails 1.x and 2.x users
|
8
8
|
|
9
9
|
# SYNOPSIS
|
10
10
|
|
@@ -169,7 +169,7 @@ used by Unicorn.
|
|
169
169
|
* [Rack RDoc][2]
|
170
170
|
* [Rackup HowTo][3]
|
171
171
|
|
172
|
-
[1]:
|
173
|
-
[2]: http://
|
174
|
-
[3]:
|
175
|
-
[4]:
|
172
|
+
[1]: https://bogomips.org/unicorn/
|
173
|
+
[2]: http://www.rubydoc.info/github/rack/rack/
|
174
|
+
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
|
175
|
+
[4]: https://bogomips.org/unicorn/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: https://bogomips.org/unicorn-public/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
@@ -178,17 +178,18 @@ doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
|
|
178
178
|
$(RDOC) -f oldweb
|
179
179
|
$(OLDDOC) merge
|
180
180
|
install -m644 COPYING doc/COPYING
|
181
|
+
install -m644 NEWS.atom.xml doc/NEWS.atom.xml
|
181
182
|
install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
|
182
183
|
install -m644 $(man1_paths) doc/
|
183
184
|
tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
|
184
185
|
|
185
|
-
# publishes docs to
|
186
|
+
# publishes docs to https://bogomips.org/unicorn/
|
186
187
|
publish_doc:
|
187
188
|
-git set-file-times
|
188
189
|
$(MAKE) doc
|
189
190
|
$(MAKE) doc_gz
|
190
191
|
chmod 644 $$(find doc -type f)
|
191
|
-
$(RSYNC) -av doc/
|
192
|
+
$(RSYNC) -av doc/ bogomips.org:/srv/bogomips/unicorn/
|
192
193
|
git ls-files | xargs touch
|
193
194
|
|
194
195
|
# Create gzip variants of the same timestamp as the original so nginx
|
@@ -218,7 +219,7 @@ fix-perms:
|
|
218
219
|
gem: $(pkggem)
|
219
220
|
|
220
221
|
install-gem: $(pkggem)
|
221
|
-
gem install $(CURDIR)/$<
|
222
|
+
gem install --local $(CURDIR)/$<
|
222
223
|
|
223
224
|
$(pkggem): .manifest fix-perms
|
224
225
|
gem build $(rfpackage).gemspec
|
data/HACKING
CHANGED
@@ -57,7 +57,7 @@ Please wrap documentation at 72 characters-per-line or less (long URLs
|
|
57
57
|
are exempt) so it is comfortably readable from terminals.
|
58
58
|
|
59
59
|
When referencing mailing list posts, use
|
60
|
-
|
60
|
+
<tt>https://bogomips.org/unicorn-public/$MESSAGE_ID/</tt> if possible
|
61
61
|
since the Message-ID remains searchable even if a particular site
|
62
62
|
becomes unavailable.
|
63
63
|
|
data/ISSUES
CHANGED
@@ -2,14 +2,17 @@
|
|
2
2
|
|
3
3
|
mailto:unicorn-public@bogomips.org is the best place to report bugs,
|
4
4
|
submit patches and/or obtain support after you have searched the
|
5
|
-
{email archives}[
|
6
|
-
{documentation}[
|
5
|
+
{email archives}[https://bogomips.org/unicorn-public/] and
|
6
|
+
{documentation}[https://bogomips.org/unicorn/].
|
7
7
|
|
8
|
-
* No subscription will ever be required to email
|
8
|
+
* No subscription will ever be required to email us
|
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
|
+
https://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,26 @@ 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
|
+
* https://bogomips.org/unicorn-public/
|
65
71
|
|
66
|
-
|
67
|
-
feeds the mailing list. You may subscribe either using
|
68
|
-
{ssoma}[http://ssoma.public-inbox.org/] or by sending a mail
|
69
|
-
to mailto:unicorn-public+subscribe@bogomips.org
|
72
|
+
Mailing list subscription is optional, so Cc: all participants.
|
70
73
|
|
71
|
-
|
72
|
-
fashion to tools such as slrnpull, fetchmail, or getmail. ssoma
|
73
|
-
subscription instructions:
|
74
|
+
You can follow along via NNTP:
|
74
75
|
|
75
|
-
|
76
|
-
|
76
|
+
nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
|
77
|
+
nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
77
78
|
|
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
|
79
|
+
Or Atom feeds:
|
84
80
|
|
85
|
-
|
86
|
-
mutt -f /path/to/maildir # (or /path/to/mbox)
|
81
|
+
https://bogomips.org/unicorn-public/new.atom
|
87
82
|
|
88
|
-
|
89
|
-
|
83
|
+
The HTML archives at https://bogomips.org/unicorn-public/
|
84
|
+
also has links to per-thread Atom feeds and downloadable
|
85
|
+
mboxes.
|
90
86
|
|
91
|
-
|
92
|
-
# this does not affect ssoma functionality at all
|
87
|
+
You may optionally subscribe via plain-text email:
|
93
88
|
|
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/
|
89
|
+
mailto:unicorn-public+subscribe@bogomips.org
|
90
|
+
(and confirming the auto-reply)
|
data/KNOWN_ISSUES
CHANGED
@@ -9,11 +9,11 @@ acceptable solution. Those issues are documented here.
|
|
9
9
|
handlers.
|
10
10
|
|
11
11
|
* Issues with FreeBSD jails can be worked around as documented by Tatsuya Ono:
|
12
|
-
|
12
|
+
https://bogomips.org/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
|
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,31 +36,31 @@ 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
|
-
ref:
|
63
|
+
ref: https://bogomips.org/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
|
64
64
|
Note: the workaround described in the article above only made
|
65
65
|
the issue more subtle and we didn't notice them immediately.
|
66
66
|
|
@@ -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,45 +15,42 @@ 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
|
28
28
|
|
29
|
-
* {UnXF}[
|
29
|
+
* {UnXF}[https://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
|
|
55
52
|
* {Mongrel}[http://rubygems.org/gems/mongrel] - the awesome webserver
|
56
53
|
unicorn is based on
|
57
54
|
|
58
|
-
* {david}[
|
59
|
-
nginx in front of
|
55
|
+
* {david}[https://bogomips.org/david.git] - a tool to explain why you need
|
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
|
-
unicorn 4.
|
16
|
+
unicorn 4.x remains 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.
|
@@ -27,17 +27,14 @@ both the the request and response in between \Unicorn and slow clients.
|
|
27
27
|
all run within their own isolated address space and only serve one
|
28
28
|
client at a time for maximum robustness.
|
29
29
|
|
30
|
-
* Supports all Rack applications, along with pre-Rack versions of
|
31
|
-
Ruby on Rails via a Rack wrapper.
|
32
|
-
|
33
30
|
* Builtin reopening of all log files in your application via
|
34
31
|
USR1 signal. This allows logrotate to rotate files atomically and
|
35
32
|
quickly via rename instead of the racy and slow copytruncate method.
|
36
|
-
|
33
|
+
unicorn also takes steps to ensure multi-line log entries from one
|
37
34
|
request all stay within the same file.
|
38
35
|
|
39
36
|
* nginx-style binary upgrades without losing connections.
|
40
|
-
You can upgrade
|
37
|
+
You can upgrade unicorn, your entire application, libraries
|
41
38
|
and even your Ruby interpreter without dropping clients.
|
42
39
|
|
43
40
|
* before_fork and after_fork hooks in case your application
|
@@ -54,21 +51,19 @@ both the the request and response in between \Unicorn and slow clients.
|
|
54
51
|
|
55
52
|
* Simple and easy Ruby DSL for configuration.
|
56
53
|
|
57
|
-
* Decodes chunked
|
58
|
-
notification to be implemented as well as being able to tunnel
|
59
|
-
arbitrary stream-based protocols over HTTP.
|
54
|
+
* Decodes chunked requests on-the-fly.
|
60
55
|
|
61
56
|
== License
|
62
57
|
|
63
|
-
|
58
|
+
unicorn is copyright 2009-2016 by all contributors (see logs in git).
|
64
59
|
It is based on Mongrel 1.1.5.
|
65
60
|
Mongrel is copyright 2007 Zed A. Shaw and contributors.
|
66
61
|
|
67
|
-
|
62
|
+
unicorn is licensed under (your choice) of the GPLv2 or later
|
68
63
|
(GPLv3+ preferred), or Ruby (1.8)-specific terms.
|
69
64
|
See the included LICENSE file for details.
|
70
65
|
|
71
|
-
|
66
|
+
unicorn is 100% Free Software (including all development tools used).
|
72
67
|
|
73
68
|
== Install
|
74
69
|
|
@@ -85,10 +80,9 @@ You can get the latest source via git from the following locations
|
|
85
80
|
git://bogomips.org/unicorn.git
|
86
81
|
git://repo.or.cz/unicorn.git (mirror)
|
87
82
|
|
88
|
-
You may browse the code from the web
|
89
|
-
tarballs here:
|
83
|
+
You may browse the code from the web:
|
90
84
|
|
91
|
-
*
|
85
|
+
* https://bogomips.org/unicorn.git
|
92
86
|
* http://repo.or.cz/w/unicorn.git (gitweb)
|
93
87
|
|
94
88
|
See the HACKING guide on how to contribute and build prerelease gems
|
@@ -102,23 +96,17 @@ In APP_ROOT, run:
|
|
102
96
|
|
103
97
|
unicorn
|
104
98
|
|
105
|
-
|
106
|
-
|
107
|
-
In RAILS_ROOT, run:
|
108
|
-
|
109
|
-
unicorn_rails
|
110
|
-
|
111
|
-
\Unicorn will bind to all interfaces on TCP port 8080 by default.
|
99
|
+
unicorn will bind to all interfaces on TCP port 8080 by default.
|
112
100
|
You may use the +--listen/-l+ switch to bind to a different
|
113
101
|
address:port or a UNIX socket.
|
114
102
|
|
115
103
|
=== Configuration File(s)
|
116
104
|
|
117
|
-
|
105
|
+
unicorn will look for the config.ru file used by rackup in APP_ROOT.
|
118
106
|
|
119
|
-
For deployments, it can use a config file for
|
107
|
+
For deployments, it can use a config file for unicorn-specific options
|
120
108
|
specified by the +--config-file/-c+ command-line switch. See
|
121
|
-
Unicorn::Configurator for the syntax of the
|
109
|
+
Unicorn::Configurator for the syntax of the unicorn-specific options.
|
122
110
|
The default settings are designed for maximum out-of-the-box
|
123
111
|
compatibility with existing applications.
|
124
112
|
|
@@ -130,7 +118,7 @@ supported. Run `unicorn -h` to see command-line options.
|
|
130
118
|
There is NO WARRANTY whatsoever if anything goes wrong, but
|
131
119
|
{let us know}[link:ISSUES.html] and we'll try our best to fix it.
|
132
120
|
|
133
|
-
|
121
|
+
unicorn is designed to only serve fast clients either on the local host
|
134
122
|
or a fast LAN. See the PHILOSOPHY and DESIGN documents for more details
|
135
123
|
regarding this.
|
136
124
|
|
@@ -140,6 +128,11 @@ All feedback (bug reports, user/development dicussion, patches, pull
|
|
140
128
|
requests) go to the mailing list/newsgroup. See the ISSUES document for
|
141
129
|
information on the {mailing list}[mailto:unicorn-public@bogomips.org].
|
142
130
|
|
143
|
-
|
131
|
+
The mailing list is archived at https://bogomips.org/unicorn-public/
|
132
|
+
Read-only NNTP access is available at:
|
133
|
+
nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn and
|
134
|
+
nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
135
|
+
|
136
|
+
For the latest on unicorn releases, you may also finger us at
|
144
137
|
unicorn@bogomips.org or check our NEWS page (and subscribe to our Atom
|
145
138
|
feed).
|