about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-12-29Rainbows! 2.1.0 - Cool.io, bugfixes and more! v2.1.0
Cool.io (new version of Rev) support is explicitly added (it always worked before). ":Coolio" may be used in place of ":Rev" anywhere in your Rainbows! config file. There is a new "keepalive_requests" config directive to limit the number of requests a single connection may make (default: 100, same as nginx). This may be useful for better load-balancing characteristics. The old "Rev" prefixes remain supported as long as Cool.io remains compatible with Rev (likely forever). Bug fixes: * Rainbows::ThreadTimeout middleware with multiple clients * large, pipelined upload errors with Revactor+Coolio(Rev) * high CPU usage for maintaining idle keepalive on *Fiber* * needless ThreadPool wakeups * request env prematurely cleared keepalive requests, breaking some middlewares such as Clogger. * "close" not called on body if wrapper and sendfile used together Various code cleanups, and our RDoc website is JavaScript-free. See the ChangeLog or git for all changes.
2010-12-28complete Rev => Coolio renaming
We use Cool.io internally everywhere now, but preserve Rev-based models for anybody using them.
2010-12-28several response body#close fixes
Some middlewares require the Rack env to be preserved all the way through to close, so we'll ensure all request models preserve it. We also need to better response body wrappers/proxies always get fired properly when returning. IO.copy_stream and "sendfile" gem users could hit cases where wrappers did not fire properly.
2010-12-28dev_fd_response: pass files straight through
No need to wrap regular files
2010-12-28enable the keepalive_requests config option
This will allow servers to limit the number of keepalive requests that can be made over a single connection to prevent denial-of-service and also to improve fairness in load-balancing.
2010-12-27coolio*: favor Coolio over Rev
We still use and define Rev internally, but that's mostly just manual labor of converting stuff over.
2010-12-27coolio_fiber_spawn: decrease CPU usage for keepalive
Blindly resuming fibers every second is a waste of cycles, we can use the ZZ hash in regular FiberSpawn to resume expired fibers on an as-needed basis. While we're at it, merge the keepalive-timeout class into the heartbeat, there's no reason to have separate timers and classes here.
2010-12-27t0019: add CPU usage test
This requires manual verification :<
2010-12-27test-lib: fix bug in setting worker_connections
We need to be able to set this with keepalive_timeout simultaneously.
2010-12-27t0015: even less racy fix
We need to ensure the first worker has started and is running before attempting to signal the reload.
2010-12-27doc: misc cleanups and additions for RDoc
This is also our website, so we need to document the new Cool.io-based concurrency options for users and point existing Rev* users to it.
2010-12-27t0015: increase reliability of test
The worker process may fork before the original process is killed during daemonization.
2010-12-27initial cool.io support
Cool.io is the new name for Rev. We'll continue to support Rev until Cool.io breaks backwards compatibility. Rev may not be supported if Cool.io is.
2010-12-27fiber/io: avoid allocating Range objects for slicing
It's slightly faster this way, but string slicing sucks anyways :<
2010-12-27fiber/*: more efficient keepalive_timeout expiry
We can use the same interface as Rainbows::Fiber.sleep to avoid blindly waking up readers at ever scheduler invocation.
2010-12-27fiber/base: use bare "select" where possible
Less visual noise
2010-12-27thread_pool: avoid needless wakeups from select
No point in waking up when our ticker runs in a separate thread.
2010-12-27thread_*: unindent
Hopefully this will make our code easier to follow.
2010-12-27introduce worker_yield method
This lets Rainbows! yield the current worker process when busy in the hopes another worker will pick up the slack. We can also override this for the single worker process case later if people care enough.
2010-12-27writer_thread_spawn: factor out Client.quit
Self-documenting code is easier to follow
2010-12-27writer_thread_*: split out classes into separate files
Use a consistent "Client" naming to reduce confusion
2010-12-27writer_thread_*: split out common socket_proxy code
Needless duplication sucks
2010-12-27writer_thread_*: unindent
2010-12-27revactor: split out tee_socket and use autoload
Some applications never need TeeSocket, and we don't have to worry about thread-safety with Revactor.
2010-12-26more :: prefix elimination
This should make things easier on the eyes.
2010-12-26fiber/queue: unindent
This also cleans up some constant resolution for the root Fiber class.
2010-12-26remove unnecessary "::" constant prefixing
It's ugly to look at.
2010-12-26never_block: simplify and split out code
alias_method is a mess, super is superb!
2010-12-26event_machine: split out server and client classes
This should make things easier to find
2010-12-26rev_thread_*: unindent and split out
This should make classes easier to find and hopefully make our code easier to follow.
2010-12-26rainbows/rev/* require/autoload cleanup
One line of code saved! We'll also avoid loading DeferredChunkResponse which is rarely needed (unlike DeferredResponse).
2010-12-26rename rev/thread => rev/thread_client
While we're at it, unindent
2010-12-26rev_thread_spawn: disable under Ruby 1.8
It still burns CPU at the first sign of doing anything interesting, so stop it. Ruby 1.9 is the future :P
2010-12-26GNUmakefile: fix packaging task
Oops
2010-12-26avoid HttpParser#keepalive? and HttpParser#reset
The HttpParser#next? method will come with keepalive protection for Rainbows!, which can prevent clients from monopolizing a server with excessive pipelining/keepalive requests.
2010-12-26bump Unicorn dependency
Unicorn 3.2.1 gives us an improved HttpParser#next? that preserves state until the next HttpParser#parse call.
2010-12-26rainbows/rev/*: uninident some more
This makes constant resolution more predictable, we hope.
2010-12-26rev: split out Rainbows::Rev::Server
One file per class/module should be easier for new hackers to find. Unindent rainbows/rev/core while we're at it, too.
2010-12-26rev: unindent, needless autoload
Deferred* classes will get loaded anyways since Rainbows::Rev::Client hit them in case statements.
2010-12-24doc: switch documentation generation to wrongdoc
It is a common base so we can share documentation tasks more easily with Unicorn and it ensures our RDoc no longer has JavaScript in it!
2010-12-20thread_timeout: fix bad comparison
This was causing unrelated requests to get killed every +timeout+ seconds, instead of only the ones that were running too long. Noticed-by: ghazel@gmail.com ref: http://mid.gmane.org/AANLkTi=7OhyTwkHsp_rXU7Gp1PokihiQ9bJigpO-BfN6@mail.gmail.com
2010-12-20thread_timeout: avoid a threading bug under 1.9
Because of the lack of GVL-releasing syscalls in this branch of the thread loop, we need Thread.pass to ensure other threads get scheduled appropriately under 1.9. This is likely a threading bug in 1.9 that warrants further investigation when we're in a better mood.
2010-12-14FAQ: add a note about config.threadsafe!
At least one user ran into it: http://mid.gmane.org/AANLkTikegPX2-6Q93++bz_aLt+9nLPJXjg+NkL8tDjeE@mail.gmail.com
2010-12-09respect client_body_buffer_size in Unicorn 3.1.0
This is only needed for concurrency options that do not use TeeInput, since TeeInput automatically handles this for us.
2010-12-09bump Unicorn dependency to 3.1.0
We'll be taking advantage of configurable client_buffer_body_size soon.
2010-12-09thread_timeout: de-Struct-ify
Avoid exposing internals, it's also slightly faster to access ivars directly rather than using method calls.
2010-12-08respect "rewindable_input false" in Unicorn config
This was completely overlooked for the Rainbows 2.0.x releases.
2010-12-08t/*.sh: indentation fixes
We use real tabs for indenting shell code since it is not Ruby.
2010-12-08rev+revactor: fix LARGE pipelined uploads
Large uploads behave differently with regard to buffering, and there were bugs in the way the Rev and Revactor backends handled uploads.
2010-12-03Rainbows! 2.0.1 - upload pipelining fixes v2.0.1
For HTTP clients living on the edge and pipelining uploads, we now fully support pipelined requests (as long as the application consumes each request in its entirety).