Date | Commit message (Collapse) |
|
But allows small optimizations to be made to avoid
constant/instance variable lookups later :)
|
|
No need to preserve the response tuplet if we're just
going to unpack it eventually.
|
|
|
|
This will allow Rainbows! to set :tcp_nodelay=>true
and possibly other things in the future.
|
|
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.
|
|
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.
|
|
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)
|
|
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!
|
|
We can just use a begin block at startup, this also makes life
easier on RDoc.
|
|
An unconfigured Rainbows! (e.g. Rainbows! { use :Base }) already
does keepalive and supports only a single client per-process.
|
|
This is the most important part of Unicorn documentation
for end users.
|
|
More config bloat, sadly this is necessary for Rainbows! :<
|
|
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
|
|
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.
|
|
This has been broken since 2.0.x
Internal cleanups sometimes have unintended consequences :<
|
|
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.
|
|
...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.
|
|
It screws up keepalive for Rainbows! requests with a body.
|
|
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.
|
|
There's no difference because of the \A anchor, but sub!
is doesn't loop so it's simpler.
|
|
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.
|
|
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.
|
|
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.
|
|
"Unicorn" is no longer in the default constant resolution
namespace.
|
|
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"
|
|
We may get "rack.input" objects that are not rewindable
in the future, so be prepared for those and do no harm.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Here are major, incompatible internal API changes.
|
|
Not that anybody uses trailers extensively, but it's
good to know it's there.
|
|
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.
|
|
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.
|
|
It's less ambiguous since this is a network server after all.
|
|
No point in using a Struct for (1.8) space-efficiency
if there's only one of them.
|
|
To reduce CPU wakeups and save power during off hours,
we can precalculate a safe amount to sleep before killing
off idle workers.
|
|
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.
|
|
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.
|
|
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!...
|
|
Internal changes/cleanups for Rainbows!
|
|
This should be easier for Rainbows! to use
|
|
We clobber the accessor methods.
|
|
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.
|
|
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.
|
|
This provides the kgio_read! method which is like readpartial,
only significantly cheaper when a client disconnects on us.
|
|
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.
|
|
This is for compatibility with Ruby implementations such as
Rubinius that use "IO.new" internally inside "IO.open"
|
|
This hopefully makes things easier to read and follow.
|
|
This is slightly shorter and hopefully easier to find.
|