This release finally drops Ruby 1.8 support and requires Ruby 1.9.3 or later. The horrible "Status:" header in our HTTP response is finally gone, saving at least 16 precious bytes in every single HTTP response. Under Ruby 2.1 and later, the monotonic clock is used for timeout handling for better accuracy. Several experimental, unused and undocumented features are removed. There's also tiny, minor performance and memory improvements from dropping 1.8 compatibility, but probably nothing noticeable on a typical real-life (bloated) app. The biggest performance improvement we made was to our website by switching to olddoc. Depending on connection speed, latency, and renderer performance, it typically loads two to four times faster. Finally, for the billionth time: unicorn must never be exposed to slow clients, as it will never ever use new-fangled things like non-blocking socket I/O, threads, epoll or kqueue. unicorn must be used with a fully-buffering reverse proxy such as nginx for slow clients. I'll tag 5.0.0 final in a week or so if all goes well = gem install --pre unicorn = git clone git://bogomips.org/unicorn.git = http://unicorn.bogomips.org/ * ISSUES: update with mailing list subscription * GIT-VERSION-GEN: start 5.0.0 development * http: remove xftrust options * FAQ: add entry for Rails autoflush_log * dev: remove isolate dependency * unicorn.gemspec: depend on test-unit 3.0 * http_response: remove Status: header * remove RubyForge and Freecode references * remove mongrel.rubyforge.org references * http: remove the keepalive requests limit * http: reduce parser from 72 to 56 bytes on 64-bit * examples: add run_once to before_fork hook example * worker: remove old tmp accessor * http_server: save 450+ bytes of memory on x86-64 * t/t0002-parser-error.sh: relax test for rack 1.6.0 * remove SSL support * tmpio: drop the "size" method * switch docs + website to olddoc * README: clarify/reduce references to unicorn_rails * gemspec: fixup olddoc migration * use the monotonic clock under Ruby 2.1+ * http: -Wshorten-64-to-32 warnings on clang * remove old inetd+git examples and exec_cgi * http: standalone require + reduction in binary size * GNUmakefile: fix clean gem build + reduce build cruft * socket_helper: reduce constant lookups and caching * remove 1.8, <= 1.9.1 fallback for missing IO#autoclose= * favor IO#close_on_exec= over fcntl in 1.9+ * use require_relative to reduce syscalls at startup * doc: update support status for Ruby versions * fix uninstalled testing and reduce require paths * test_socket_helper: do not depend on SO_REUSEPORT * favor "a.b(&:c)" form over "a.b { |x| x.c }" * ISSUES: add section for bugs in other projects * http_server: favor ivars over constants * explain 11 byte magic number for self-pipe * const: drop constants used by Rainbows! * reduce and localize constant string use * Links: mark Rainbows! as historical, reference yahns * save about 200 bytes of memory on x86-64 * http: remove deprecated reset method * http: remove experimental dechunk! method * socket_helper: update comments * doc: document UNICORN_FD in manpage * doc: document Etc.nprocessors for worker_processes * favor more string literals for cold call sites * tee_input: support for Rack::TempfileReaper middleware * support TempfileReaper in deployment and development envs * favor kgio_wait_readable for single FD over select * Merge tag 'v4.9.0' * http_request: support rack.hijack by default * avoid extra allocation for hijack proc creation * FAQ: add note about ECONNRESET errors from bodies * process SIGWINCH unless stdin is a TTY * ISSUES: discourage HTML mail strongly, welcome nyms * http: use rb_hash_clear in Ruby 2.0+ * http_response: avoid special-casing for Rack < 1.5 * www: install NEWS.atom.xml properly * http_server: remove a few more accessors and constants * http_response: simplify regular expression * move the socket into Rack env for hijacking * http: move response_start_sent into the C ext * FAQ: reorder bit on Rack 1.1.x and Rails 2.3.x * ensure body is closed during hijack -- EW
Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request and response in between unicorn and slow clients. * http://unicorn.bogomips.org/ * public list: unicorn-public@bogomips.org * mail archives: http://bogomips.org/unicorn-public/ * git clone git://bogomips.org/unicorn.git * http://unicorn.bogomips.org/NEWS.atom.xml Changes: unicorn 4.9.0 - TempfileReaper support in Rack 1.6 This release supports the Rack::TempfileReaper middleware found in rack 1.6 for cleaning up disk space used by temporary files. We also use Rack::TempfileReaper for cleaning up large temporary files buffered with TeeInput. Users on rack 1.5 and earlier will see no changes. There's also a bunch of documentation/build system improvements. This is likely to be the last Ruby 1.8-compatible release, unicorn 5.x will require 1.9.3 or later as well as dropping lots of cruft (the stupid "Status:" header in responses being the most notable). 21 changes backported from master: ISSUES: update with mailing list subscription FAQ: add entry for Rails autoflush_log dev: remove isolate dependency unicorn.gemspec: depend on test-unit 3.0 remove RubyForge and Freecode references remove mongrel.rubyforge.org references examples: add run_once to before_fork hook example t/t0002-parser-error.sh: relax test for rack 1.6.0 switch docs + website to olddoc README: clarify/reduce references to unicorn_rails gemspec: fixup olddoc migration GNUmakefile: fix clean gem build + reduce build cruft doc: update support status for Ruby versions fix uninstalled testing and reduce require paths test_socket_helper: do not depend on SO_REUSEPORT ISSUES: add section for bugs in other projects explain 11 byte magic number for self-pipe Links: mark Rainbows! as historical, reference yahns doc: document UNICORN_FD in manpage tee_input: support for Rack::TempfileReaper middleware support TempfileReaper in deployment and development envs -- EW
Only backporting documentation + build/test system fixes, but I'll probably apply and push the TeeInput patch in: http://bogomips.org/unicorn-public/m/20150422183808.GA5277@dcvr.yhbt.net.txt The following changes since commit 7087bb7ed5a1b9d9f24069cb92707d086668b6dc: unicorn 4.8.3 - the end of an era (2014-05-07 07:49:19 +0000) are available in the git repository at: git://bogomips.org/unicorn 4.8.x-stable for you to fetch changes up to 548e1e67d314f6ebd17df37ece0ee20632462f6f: doc: document UNICORN_FD in manpage (2015-04-22 18:57:39 +0000) ---------------------------------------------------------------- Eric Wong (19): ISSUES: update with mailing list subscription FAQ: add entry for Rails autoflush_log dev: remove isolate dependency unicorn.gemspec: depend on test-unit 3.0 remove RubyForge and Freecode references remove mongrel.rubyforge.org references examples: add run_once to before_fork hook example t/t0002-parser-error.sh: relax test for rack 1.6.0 switch docs + website to olddoc README: clarify/reduce references to unicorn_rails gemspec: fixup olddoc migration GNUmakefile: fix clean gem build + reduce build cruft doc: update support status for Ruby versions fix uninstalled testing and reduce require paths test_socket_helper: do not depend on SO_REUSEPORT ISSUES: add section for bugs in other projects explain 11 byte magic number for self-pipe Links: mark Rainbows! as historical, reference yahns doc: document UNICORN_FD in manpage .document | 1 - .gitignore | 4 +- .wrongdoc.yml => .olddoc.yml | 6 ++- Documentation/unicorn.1.txt | 7 ++++ FAQ | 10 ++++- GNUmakefile | 71 +++++++++++++---------------------- HACKING | 31 ++++----------- ISSUES | 46 +++++++++++++++++++++-- KNOWN_ISSUES | 20 +++++----- Links | 5 ++- README | 10 ++--- Rakefile | 44 ---------------------- Sandbox | 2 +- examples/unicorn.conf.rb | 11 ++++++ lib/unicorn/configurator.rb | 2 - lib/unicorn/http_server.rb | 6 ++- local.mk.sample | 59 ----------------------------- script/isolate_for_tests | 31 --------------- t/GNUmakefile | 6 +-- t/README | 2 +- t/t0002-parser-error.sh | 6 +-- test/exec/test_exec.rb | 2 +- test/test_helper.rb | 4 +- test/unit/test_http_parser.rb | 6 +-- test/unit/test_http_parser_ng.rb | 2 +- test/unit/test_http_parser_xftrust.rb | 2 +- test/unit/test_request.rb | 2 +- test/unit/test_response.rb | 6 +-- test/unit/test_server.rb | 6 +-- test/unit/test_signals.rb | 2 +- test/unit/test_socket_helper.rb | 8 ++-- test/unit/test_upload.rb | 2 +- test/unit/test_util.rb | 2 +- unicorn.gemspec | 13 +++---- 34 files changed, 167 insertions(+), 270 deletions(-) rename .wrongdoc.yml => .olddoc.yml (85%) delete mode 100644 local.mk.sample delete mode 100755 script/isolate_for_tests
It seems unnecessary with current versions of RubyGems supporting development dependencies. --- GNUmakefile | 6 +----- script/isolate_for_tests | 31 ------------------------------- t/GNUmakefile | 6 +----- unicorn.gemspec | 1 - 4 files changed, 2 insertions(+), 42 deletions(-) delete mode 100755 script/isolate_for_tests diff --git a/GNUmakefile b/GNUmakefile index 00a6ace..50819fc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -23,11 +23,7 @@ endif RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))') -isolate_libs := tmp/isolate/$(RUBY_ENGINE)-$(RUBY_VERSION).mk -$(isolate_libs): script/isolate_for_tests - @$(RUBY) script/isolate_for_tests --include $(isolate_libs) -MYLIBS = $(RUBYLIB):$(ISOLATE_LIBS) +MYLIBS = $(RUBYLIB) # dunno how to implement this as concisely in Ruby, and hell, I love awk awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' 2>/dev/null diff --git a/script/isolate_for_tests b/script/isolate_for_tests deleted file mode 100755 index 6f5dced..0000000 --- a/script/isolate_for_tests +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env ruby -# scripts/Makefiles can read and eval the output of this script and -# use it as RUBYLIB -require 'rubygems' -require 'isolate' -fp = File.open(__FILE__, "rb") -fp.flock(File::LOCK_EX) - -ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' -opts = { - :system => false, - # we want "ruby-1.8.7" and not "ruby-1.8", so disable :multiruby - :multiruby => false, - :path => "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}", -} - -pid = fork do - Isolate.now!(opts) do - gem 'raindrops', '0.13.0' - gem 'kgio', '2.9.2' - gem 'rack', '1.5.2' - end -end -_, status = Process.waitpid2(pid) -status.success? or abort status.inspect -lib_paths = Dir["#{opts[:path]}/gems/*-*/lib"].map { |x| File.expand_path(x) } -dst = "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}.mk" -File.open("#{dst}.#$$", "w") do |fp| - fp.puts "ISOLATE_LIBS=#{lib_paths.join(':')}" -end -File.rename("#{dst}.#$$", dst) diff --git a/t/GNUmakefile b/t/GNUmakefile index 8f2668c..5f5d9bc 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -17,11 +17,7 @@ endif RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))') export RUBY_ENGINE -isolate_libs := ../tmp/isolate/$(RUBY_ENGINE)-$(RUBY_VERSION).mk -$(isolate_libs): ../script/isolate_for_tests - @cd .. && $(RUBY) script/isolate_for_tests --include $(isolate_libs) -MYLIBS := $(RUBYLIB):$(ISOLATE_LIBS) +MYLIBS := $(RUBYLIB) T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) diff --git a/unicorn.gemspec b/unicorn.gemspec index c0c8092..b24b1ac 100644 --- a/unicorn.gemspec +++ b/unicorn.gemspec @@ -37,7 +37,6 @@ Gem::Specification.new do |s| s.add_dependency(%q<kgio>, '~> 2.6') s.add_dependency(%q<raindrops>, '~> 0.7') - s.add_development_dependency('isolate', '~> 3.2') s.add_development_dependency('wrongdoc', '~> 1.8') s.licenses = ["GPLv2+", "Ruby 1.8"] -- EW
The only user-visible change would be the removal of the Status: header from the HTTP response, but I doubt anybody would even notice. Eric Wong (3): dev: remove isolate dependency unicorn.gemspec: depend on test-unit 3.0 http_response: remove Status: header