about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2011-01-06unicorn 3.3.1 - one minor, esoteric bugfix v3.3.1
We now close the client socket after closing the response body. This does not affect most applications that run under Unicorn, in fact, it may not affect any. There is also a new v1.1.6 release for users who do not use kgio.
2011-01-05close client socket after closing response body
Response bodies may capture the block passed to each and save it for body.close, so don't close the socket before we have a chance to call body.close
2011-01-05unicorn 3.3.0 - minor optimizations v3.3.0
Certain applications that already serve hundreds/thousands of requests a second should experience performance improvements due to Time.now.httpdate usage being removed and reimplemented in C. There are also minor internal changes and cleanups for Rainbows!
2011-01-05http_parser: add clear method, deprecate reset
But allows small optimizations to be made to avoid constant/instance variable lookups later :)
2011-01-05http_response: simplify the status == 100 comparison
No need to preserve the response tuplet if we're just going to unpack it eventually.
2011-01-05http_server: remove unnecessary 'nil'
2011-01-05socket_helper: expose more defaults in DEFAULTS hash
This will allow Rainbows! to set :tcp_nodelay=>true and possibly other things in the future.
2011-01-04http_response: implement httpdate in C
This can return a static string and be significantly faster as it reduces object allocations and Ruby method calls for the fastest websites that serve thousands of requests a second. It assumes the Ruby runtime is single-threaded, but that is the case of Ruby 1.8 and 1.9 and also what Unicorn is all about. This change is safe for Rainbows! under 1.8 and 1.9.
2010-12-30http_response: do not account for $, being set
It's a minor garbage reduction, but nobody uses "$,", and if they did, they'd break things in the Ruby standard library as well as Rack, so let anybody who uses "$," shoot themselves in the foot.
2010-12-26unicorn 3.2.1 - parser improvements for Rainbows! v3.2.1
There are numerous improvements in the HTTP parser for Rainbows!, none of which affect Unicorn-only users. The kgio dependency is incremented to 2.1: this should avoid ENOSYS errors for folks building binaries on newer Linux kernels and then deploying to older ones. There are also minor documentation improvements, the website is now JavaScript-free! (Ignore the 3.2.0 release, I fat-fingered some packaging things)
2010-12-26unicorn 3.2.0 - parser improvements for Rainbows! v3.2.0
There are numerous improvements in the HTTP parser for Rainbows!, none of which affect Unicorn-only users. The kgio dependency is incremented to 2.1: this should avoid ENOSYS errors for folks building binaries on newer Linux kernels and then deploying to older ones. There are also minor documentation improvements, the website is now JavaScript-free!
2010-12-26http_server: remove needless lambda
We can just use a begin block at startup, this also makes life easier on RDoc.
2010-12-26http_response: remove TODO item
An unconfigured Rainbows! (e.g. Rainbows! { use :Base }) already does keepalive and supports only a single client per-process.
2010-12-21configurator: RDoc cleanups and improvements
This is the most important part of Unicorn documentation for end users.
2010-12-21http: hook up "trust_x_forwarded" to configurator
More config bloat, sadly this is necessary for Rainbows! :<
2010-12-10unicorn 3.1.0 - client_buffer_body_size tuning v3.1.0
This release enables tuning the client_buffer_body_size to raise or lower the threshold for buffering request bodies to disk. This only applies to users who have not disabled rewindable input. There is also a TeeInput bugfix for uncommon usage patterns and Configurator examples in the FAQ should be fixed
2010-12-09allow client_buffer_body_size to be tuned
Since modern machines have more memory these days and clients are sending more data, avoiding potentially slow filesystem operations for larger uploads can be useful for some applications.
2010-12-09configurator: ensure examples in FAQ still work
This has been broken since 2.0.x Internal cleanups sometimes have unintended consequences :<
2010-12-09tee_input: fix accounting error on corked requests
In case a request sends the header and buffer as one packet, TeeInput relying on accounting info from StreamInput is harmful as StreamInput will buffer in memory outside of TeeInput's control. This bug is triggered by calling env["rack.input"].size or env["rack.input"].rewind before to read.
2010-12-03unicorn 3.0.1 - one bugfix for Rainbows! v3.0.1
...and only Rainbows! This release fixes HTTP pipelining for requests with bodies for users of synchronous Rainbows! concurrency models. Since Unicorn itself does not support keepalive nor pipelining, Unicorn-only users need not upgrade.
2010-12-02stream_input: avoid trailer parsing on unchunked requests
It screws up keepalive for Rainbows! requests with a body.
2010-11-20unicorn 3.0.0 - disable rewindable input! v3.0.0
Rewindable "rack.input" may be disabled via the "rewindable_input false" directive in the configuration file. This will violate Rack::Lint for Rack 1.x applications, but can reduce I/O for applications that do not need a rewindable input. This release updates us to the Kgio 2.x series which should play more nicely with other libraries and applications. There are also internal cleanups and improvements for future versions of Rainbows! The Unicorn 3.x series supercedes the 2.x series while the 1.x series will remain supported indefinitely.
2010-11-20stream_input: use String#sub! instead of gsub!
There's no difference because of the \A anchor, but sub! is doesn't loop so it's simpler.
2010-11-20stream_input: small cleanups and fixes
No need to accept any number of args, that could hide bugs in applications that could give three or more arguments. We also raise ArgumentError when given a negative length argument to read.
2010-11-19unicorn 3.0.0pre2 - less bad than 2.x or 3.0.0pre1! v3.0.0pre2
This release updates us to the Kgio 2.x series which should play more nicely with other applications. There are also bugfixes from the 2.0.1 release and a small bugfix to the new StreamInput class. The Unicorn 3.x series will supercede the 2.x series while the 1.x series will remain supported indefinitely.
2010-11-18stream_input: read with zero length returns ''
Any calls to read with an explicit zero length now returns an empty string. While not explicitly specified by Rack::Lint, this is for compatibility with StringIO and IO methods which are common in other web servers.
2010-11-17http_server: fix HttpParserError constant resolution
"Unicorn" is no longer in the default constant resolution namespace.
2010-11-16unicorn 3.0.0pre1 v3.0.0pre1
Rewindable "rack.input" may be disabled via the "rewindable_input false" directive in the configuration file. This will violate Rack::Lint for Rack 1.x applications, but can reduce I/O for applications that do not need it. There are also internal cleanups and enhancements for future versions of Rainbows! Eric Wong (11): t0012: fix race condition in reload enable HTTP keepalive support for all methods http_parser: add HttpParser#next? method tee_input: switch to simpler API for parsing trailers switch versions to 3.0.0pre add stream_input class and build tee_input on it configurator: enable "rewindable_input" directive http_parser: ensure keepalive is disabled when reset *_input: make life easier for subclasses/modules tee_input: restore read position after #size preread_input: no-op for non-rewindable "rack.input"
2010-11-16preread_input: no-op for non-rewindable "rack.input"
We may get "rack.input" objects that are not rewindable in the future, so be prepared for those and do no harm.
2010-11-13tee_input: restore read position after #size
It's possible for an application to call size after it has read a few bytes/lines, so do not screw up a user's read offset when consuming input.
2010-11-12*_input: make life easier for subclasses/modules
Avoid having specific knowledge of internals in TeeInput and instead move that to StreamInput when dealing with byte counts. This makes things easier for Rainbows! which will need to extends these classes.
2010-11-11configurator: enable "rewindable_input" directive
This allows users to override the current Rack spec and disable the rewindable input requirement. This can allow applications to use less I/O to minimize the performance impact when processing uploads.
2010-11-11add stream_input class and build tee_input on it
We will eventually expose a Unicorn::StreamInput object as "rack.input" for Rack 2.x applications. StreamInput allows applications to avoid buffering input to disk, removing the (potentially expensive) rewindability requirement of Rack 1.x. TeeInput is also rewritten to build off StreamInput for simplicity. The only regression is that TeeInput#rewind forces us to consume an unconsumed stream before returning, a negligible price to pay for decreased complexity.
2010-11-11switch versions to 3.0.0pre
Here are major, incompatible internal API changes.
2010-11-07tee_input: switch to simpler API for parsing trailers
Not that anybody uses trailers extensively, but it's good to know it's there.
2010-10-27unicorn 2.0.0 - mostly internal cleanups v2.0.0
Despite the version number, this release mostly features internal cleanups for future versions of Rainbows!. User visible changes include reductions in CPU wakeups on idle sites using high timeouts. Barring possible portability issues due to the introduction of the kgio library, this release should be ready for all to use. However, 1.1.x (and possibly 1.0.x) will continue to be maintained. Unicorn 1.1.5 and 1.0.2 have also been released with bugfixes found during development of 2.0.0.
2010-10-27configurator: reloading with unset values restores default
If a configuration directive is set at startup and later unset, it correctly restores the original default value as if it had never been set in the first place. This applies to the majority of the configuration values with a few exceptions: * This only applies to stderr_path and stdout_path when daemonized (the usual case, they'll be redirected to "/dev/null"). When NOT daemonized, we cannot easily redirect back to the original stdout/stderr destinations. * Unsetting working_directory does not restore the original working directory where Unicorn was started. As far as we can tell unsetting this after setting it is rarely desirable and greatly increases the probability of user error.
2010-10-27configurator: use "__send__" instead of "send"
It's less ambiguous since this is a network server after all.
2010-10-27configurator: switch to normal class
No point in using a Struct for (1.8) space-efficiency if there's only one of them.
2010-10-27reduce master process wakeups
To reduce CPU wakeups and save power during off hours, we can precalculate a safe amount to sleep before killing off idle workers.
2010-10-26master: remove limit on queued signals
If a moronic sysadmin is sending too many signals, just let them do it. It's likely something is terribly wrong when the server is overloaded with signals, so don't try to protect users from it. This will also help in case where TTOU signals are sent too quickly during shutdown, although sleeping between kill(2) syscalls is always a good idea because of how non-real-time signals are delivered.
2010-10-09unicorn 2.0.0pre3 - more small fixes v2.0.0pre3
There is a new Unicorn::PrereadInput middleware to which allows input bodies to be drained off the socket and buffered to disk (or memory) before dispatching the application. HTTP Pipelining behavior is fixed for Rainbows! There are some small Kgio fixes and updates for Rainbows! users as well.
2010-10-09add PrereadInput middleware to get around TeeInput
This may be useful for some apps that wish to drain the body before acquiring an app-wide lock. Maybe it's more useful with Rainbows!...
2010-10-07unicorn 2.0.0pre2 - releases are cheap v2.0.0pre2
Internal changes/cleanups for Rainbows!
2010-10-07start using more compact parser API
This should be easier for Rainbows! to use
2010-10-07http_server: avoid method redefinition warnings
We clobber the accessor methods.
2010-10-06unicorn 2.0.0pre1 - a boring "major" release v2.0.0pre1
Mostly internal cleanups for future versions of Rainbows! and people trying out Rubinius. There are tiny performance improvements for Ruby 1.9.2 users which may only be noticeable with Rainbows! Unicorn 1.1.x users are NOT required to upgrade.
2010-10-06various cleanups and reduce indentation
This also affects some constant scoping rules, but hopefully makes things easier to follow. Accessing ivars (not via accessor methods) are also slightly faster, so use them in the criticial process_client code path.
2010-10-05upgrade to kgio 1.2.0
This provides the kgio_read! method which is like readpartial, only significantly cheaper when a client disconnects on us.
2010-10-05tee_input: use kgio to avoid stack traces on EOF
TeeInput methods may be invoked deep in the stack, so avoid giving them more work to do if a client disconnects due to a bad upload.