diff options
author | Eric Wong <e@80x24.org> | 2013-10-25 19:27:05 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-25 20:00:37 +0000 |
commit | 7c125886b5862bf20711bae22e6697ad46141434 (patch) | |
tree | 17e08b48ff591ab43a369067a3c23c6e0dbcb3c3 /lib/unicorn/configurator.rb | |
parent | 1dc099228ee0f59c13385a3e7346a2cb37d85153 (diff) | |
download | unicorn-7c125886b5862bf20711bae22e6697ad46141434.tar.gz |
This allows users to start an independent instance of unicorn on a the same port as a running unicorn (as long as both instances use :reuseport). ref: https://lwn.net/Articles/542629/
Diffstat (limited to 'lib/unicorn/configurator.rb')
-rw-r--r-- | lib/unicorn/configurator.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 0d0eac7..fc3405a 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -319,6 +319,25 @@ class Unicorn::Configurator # # Default: Operating-system dependent # + # [:reuseport => true or false] + # + # This enables multiple, independently-started unicorn instances to + # bind to the same port (as long as all the processes enable this). + # + # This option must be used when unicorn first binds the listen socket. + # It cannot be enabled when a socket is inherited via SIGUSR2 + # (but it will remain on if inherited), and it cannot be enabled + # directly via SIGHUP. + # + # Note: there is a chance of connections being dropped if + # one of the unicorn instances is stopped while using this. + # + # This is supported on *BSD systems and Linux 3.9 or later. + # + # ref: https://lwn.net/Articles/542629/ + # + # Default: false (unset) + # # [:tries => Integer] # # Times to retry binding a socket if it is already in use |