about summary refs log tree commit homepage
DateCommit message (Collapse)
2011-06-27unicorn 4.0.0 - for mythical hardware! v4.0.0
A single Unicorn instance may manage more than 1024 workers without needing privileges to modify resource limits. As a result of this, the "raindrops"[1] gem/library is now a required dependency. TCP socket defaults now favor low latency to mimic UNIX domain socket behavior (tcp_nodelay: true, tcp_nopush: false). This hurts throughput, users who want to favor throughput should specify "tcp_nodelay: false, tcp_nopush: true" in the listen directive. Error logging is more consistent and all lines should be formatted correctly in backtraces. This may break the behavior of some log parsers. The call stack is smaller and thus easier to examine backtraces when debugging Rack applications. There are some internal API changes and cleanups, but none that affect applications designed for Rack. See "git log v3.7.0.." for details. For users who cannot install kgio[2] or raindrops, Unicorn 1.1.x remains supported indefinitely. Unicorn 3.x will remain supported if there is demand. We expect raindrops to introduce fewer portability problems than kgio did, however. [1] http://raindrops.bogomips.org/ [2] http://bogomips.org/kgio/
2011-06-27slightly faster worker process spawning
It's still O(n) since we don't maintain a reverse mapping of spawned processes, but at least we avoid the extra overhead of creating an array every time.
2011-06-25reenable heartbeat checking for idle workers
Some applications/libraries may launch background threads which can lock up the process. So we can't disable heartbeat checking just because the main thread is sleeping. This also has the side effect of reducing master process wakeups when all workers are idle.
2011-06-24test with latest kgio and rack versions
We'll continue to support older versions, but make sure things on the latest ones work.
2011-06-24allow multiline comments in config.ru
This matches the latest Rack behavior. We can't just use Rack::Builder.parse_file because our option parser logic is slightly different and incompatible. ref: rack commit d31cf2b7c0c77c04510c08d95776315ceb24ba54
2011-06-23http_server: avoid race conditions on SIGQUIT
We don't want the Worker#tick= assignment to trigger after we accept a client, since we'd drop that request when we raise the exception that breaks us out of the worker loop. Also, we don't want to enter IO.select with an empty LISTENERS array so we can fail with IOError or Errno::EBADF.
2011-06-22http_server: remove unused variable
A leftover from the fchmod() days
2011-06-22gemspec: fix raindrops dependency
Oops, I suck at Ruby :x
2011-06-22TODO: remove scalability to >= 1024 workers item
We can do it!
2011-06-17test_http_parser: fix for URI too long errors (#3)
The random garbage generator may occasionally generate URIs that are too long and cause the URI-specific error to be raised instead of the generic parser error we recently introduced. Follow-up-to: commit 742c4d77f179a757dbcb1fa350f9d75b757acfc7
2011-06-17error logging is more consistent
Backtraces are now formatted properly (with timestamps) and exceptions will be logged more consistently and similar to Logger defaults: "#{exc.message} (#{e.class})" backtrace.each { |line| ... } This may break some existing monitoring scripts, but errors will be more standardized and easier to check moving forward.
2011-06-17add broken app test from Rainbows!
"app error" is more correct, and consistent with Rainbows!
2011-06-17ensure at_exit handlers run on graceful shutdown
rescuing from SystemExit and exit()-ing again is ugly, but changes made to lower stack depth positively affect _everyone_ so we'll tolerate some ugliness here. We'll need to disable graceful exit for some tests, too...
2011-06-16replace fchmod()-based heartbeat with raindrops
This means we no longer waste an extra file descriptor per worker process in the master. Now there's no need to set a higher file descriptor limit for systems running >= 1024 workers.
2011-06-16add heartbeat timeout test from Rainbows!
Just in case we break anything
2011-06-15memory reductions in worker process
There's absolutely no need to keep the OptionParser around in worker processes.
2011-06-15test_http_parser: fix for URI too long errors (again)
The random garbage generator may occasionally generate URIs that are too long and cause the URI-specific error to be raised instead of the generic parser error we recently introduced. Follow-up-to: commit 742c4d77f179a757dbcb1fa350f9d75b757acfc7
2011-06-15http_server: kill another stack frame off
We always know we have zero workers at startup, so we don't need to check before hand. SIGHUP users may suffer a small performance decrease as a result, but there's not much we can do about it.
2011-06-15http_server: factor out inherit_listeners! method
This should be easier to understand and reduces garbage on stack, too.
2011-06-15test_response: httpdate is low resolution
It may return the previous second
2011-06-15remove BasicSocket.do_not_reverse_lookup setting
kgio never does reverse lookup
2011-06-15http: delay CoW string invalidations in filter_body
Not all invocations of filter_body will trigger CoW on the given destination string. We can also avoid an unnecessary rb_str_set_len() in the non-chunked path, too.
2011-06-15http: remove tainting flag
Needless line noise, kgio doesn't support tainting anyways.
2011-06-15http_server: get rid of EINTR checks
Ruby IO.select never raises that, actually
2011-06-15test_http_parser: fix for URI too long errors
The random garbage generator may occasionally generate URIs that are too long and cause the URI-specific error to be raised instead of the generic parser error we recently introduced.
2011-06-15http_server: further reduce stack usage for app.call
By avoid Array#each
2011-06-14http_server: small cleanups for attr assignments
ivar references using @ are slightly faster than calling attribute methods.
2011-06-14http_server: do not rescue from proper exits
Oops, it messes logging up badly.
2011-06-14http: fix documentation for dechunk!
chunk_ready! was my original name for it, but I'm indecisive when it comes to naming things.
2011-06-13http: dechunk! method to enter dechunk mode
This allows one to enter the dechunker without parsing HTTP headers beforehand. Since we skipped header parsing, trailer parsing is not supported since we don't know what trailers might be (to our knowledge, nobody uses trailers anyways)
2011-06-13http: document reasoning for memcpy in filter_body
copy-on-write behavior doesn't help you if your common use case triggers copies.
2011-06-13http: rename variables in filter_body implementation
Makes things easier-to-understand since it's based on memcpy()
2011-06-13change TCP defaults to favor low latency
These TCP settings are a closer match to the behavior of Unix domain sockets and what users expect for fast streaming responses even if nginx can't provide them just now...
2011-06-13gemspec: bump kgio dependency to ~> 2.4
kgio 2.4.1 portability should be better than 2.3, so less user confusion and push them towards 2.4
2011-06-11runtime stack size reductions
This reduces the size of `caller` by 5 frames, which should make backtraces easier-to-read, raising exceptions less expensive, and reduce GC runtime.
2011-06-10test/benchmark/stack.ru: app for measuring stack depth
Stack depth affects Ruby GC performance, so lowering it makes sense
2011-06-09unicorn 3.7.0 - minor feature update v3.7.0
* miscellaneous documentation improvements * return 414 (instead of 400) for Request-URI Too Long * strip leading and trailing linear whitespace in header values User-visible improvements meant for Rainbows! users: * add :ipv6only "listen" option (same as nginx)
2011-06-07configurator: add :ipv6only directive
Enabling this flag for an IPv6 TCP listener allows users to specify IPv6-only listeners regardless of the OS default. This should be interest to Rainbows! users.
2011-06-07build: ensure gem and tgz targets build manpages
Original patch by Hongli Lai <hongli@phusion.nl>: > >From bfefc2cf0efb0913a42862886363b3140dcdbb2a Mon Sep 17 00:00:00 2001 > From: Hongli Lai (Phusion) <hongli@phusion.nl> > Date: Mon, 6 Jun 2011 13:39:00 +0200 > Subject: [PATCH] Ensure that 'make gem' builds the documentation too. > > If autogenerated documentation files, like man pages, don't exist then > 'make gem' will fail, complaining that some files are not found. By > depending the 'gem' target on the 'doc' target we ensure that 'make gem' > always works. > > Signed-off-by: Hongli Lai (Phusion) <hongli@phusion.nl> ref: http://mid.gmane.org/4DED0EE2.7040400@phusion.nl
2011-06-07examples/nginx.conf: better wording for ipv6only comment
Oops.
2011-06-06examples/nginx.conf: add ipv6only comment
IPv4-mapped-IPv6 addresses are fugly.
2011-06-06Documentation: remove --sanitize-html for pandoc
pandoc 1.8 no longer has this.
2011-06-06Document the method for building the Unicorn gem.
Signed-off-by: Hongli Lai (Phusion) <hongli@phusion.nl>
2011-05-23isolate_for_tests: use rake 0.8.7
Rails 3.0.0 can't use Rake 0.9.0 it seems.
2011-05-23gemspec: use latest Isolate (3.1)
It's required for RubyGems 1.8.x
2011-05-23http: call rb_str_modify before rb_str_resize
Ruby 1.9.3dev (trunk) requires it if the string size is unchanged.
2011-05-23strip trailing and leading linear whitespace in headers
RFC 2616, section 4.2: > The field-content does not include any leading or trailing LWS: > linear white space occurring before the first non-whitespace > character of the field-value or after the last non-whitespace > character of the field-value. Such leading or trailing LWS MAY be > removed without changing the semantics of the field value. Any LWS > that occurs between field-content MAY be replaced with a single SP > before interpreting the field value or forwarding the message > downstream.
2011-05-23doc: add Links page to help folks find relevant info
Older announcements on our mailing list could be harder to find.
2011-05-23GNUmakefile: locale-independent grep invocation
Otherwise it could casefold and we don't want that.
2011-05-08doc: PHILOSOPHY: formatting fixes
No need to list things inside preformatted text