about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-10-26Rainbows! 1.0.0pre1 - kinder, gentler I/O v1.0.0pre1
Mostly internal changes for kgio (and Unicorn) integration. There should be no (supported) user-visible changes from Rainbows! 0.97.0. kgio should improve performance for concurrency models that use non-blocking I/O internally, especially under Ruby 1.9.2
2010-10-26gemspec: bump development dependency of Isolate
Might as well go with the latest and greatest, it has saner defaults at least.
2010-10-26doc: RDoc updates
Once again we avoid documenting internals on the public website and use code comments for other developers.
2010-10-25reduce dependency on IO#write_nonblock
kgio_trywrite is superior if it is available.
2010-10-23http_request: remove this (sub)class
It does not appear to be needed, for now, since the parser and Unicorn::HttpRequest are one and the same.
2010-10-22unindent most files
This simplifies and disambiguates most constant resolution issues as well as lowering our identation level. Hopefully this makes code easier to understand.
2010-10-22local.mk.sample: remove testing under 1.9.1
Ruby 1.9.2 has been out for a while and is the stable release nowadays.
2010-10-22README: update copyright year
This project is over 1 year old!
2010-10-22dev_fd_response: do not wrap for Fiber-aware IOs
Applications may use wait_readable-aware methods directly to work with Rainbows!
2010-10-22fiber_{pool,spawn}: unindent
Reduces confusion for constant resolution/scoping rules and lowers LoC.
2010-10-22fiber_pool: no need for old Fiber::IO
Rainbows::Client takes care of the I/O wait/read-ability for us already.
2010-10-22code shuffling for kgio
Despite the large number of changes, most of it is code movement here.
2010-10-21unicorn 2.x updates + kgio
We get basic internal API changes from Unicorn, code simplifications coming next.
2010-10-21http_server: more descriptive error for debugging
Sometimes we have stupid syntax or constant resolution errors in our code.
2010-09-28start using kgio library
It removes the burden of byte slicing and setting file descriptor flags. In some cases, we can remove unnecessary peeraddr calls, too.
2010-09-17event_machine: remove unnecessary "return"
Noise is bad.
2010-08-28Rainbows! 0.97.0 v0.97.0
We now depend on Unicorn 1.1.3 to avoid race conditions during log cycling. This bug mainly affected folks using Rainbows! as a multithreaded static file server. "keepalive_timeout 0" now works as documented for all backends to completely disable keepalive. This was previously broken under EventMachine, Rev, and Revactor. There is a new Rainbows::ThreadTimeout Rack middleware which gives soft timeouts to apps running on multithreaded backends. There are several bugfixes for proxying IO objects and the usual round of small code cleanups and documentation updates. See the commits in git for all the details.
2010-08-28bump Unicorn dependency to 1.1.3
Unicorn 1.1.3 fixes potential race conditions during SIGUSR1 log reopening.
2010-08-28"keepalive_timeout 0" (really) disables keepalive
Although this behavior is mentioned on the documentation, this was broken under EventMachine, Rev*, and Revactor. Furthermore, we set the "Connection: close" header to allow the client to optimize is handling of non-keepalive connections.
2010-08-28t0016: disable Rack::Lint for speed
Rack::Lint uses String#inspect to generate assertion messages whether or not the assertions are triggered at all. Unfortunately String#inspect is hilariously slow under 1.9.2 when dealing with odd characters and large strings. The performance difference is huge: before: 1m4.386s after: 0m3.877s We already have Rack::Lint enabled everywhere else, so removing this where performance matters most shouldn't hurt us.
2010-08-28rev_thread_*: fix IO proxy failures w/pipelining
Proxying IO objects with threaded Rev concurrency models occasionally failed with pipelined requests (t0034). By deferring the on_write_complete callback until the next "tick" (similar to what we do in Rev::Client#write), we prevent clobbering responses during pipelining.
2010-08-27rainbows/rev/core: tiny cleanup
Remove an unused constant.
2010-08-27rainbows/rev/master: unindent
No constant resolution changes, avoid redefining modules needlessly since this is not meant to be used standalone.
2010-08-26split out accept() callers to acceptor module
Trying to avoid adding singleton methods since it's too easily accessible by the public and not needed by the general public. This also allows us (or just Zbatery) to more easily add support systems without FD_CLOEXEC or fcntl, and also to optimize away a fcntl call for systems that inherit FD_CLOEXEC.
2010-08-19add Rainbows::ThreadTimeout middleware
This allows for per-dispatch timeouts similar to (but not exactly) the way Mongrel (1.1.x) implemented them with threads.
2010-08-17avoid EBADF with certain middlewares when proxying
First off we use an FD_MAP to avoid creating redundant IO objects which map to the same FD. When that doesn't work, we'll fall back to trapping Errno::EBADF and IOError where appropriate.
2010-08-17rev/client: fix redundant close of client sockets
Our keep-alive timeout mechanism does not need to kick in and redundantly close when a client. Fortunately there is no danger of redundantly closing the same numeric file descriptors (and perhaps causing difficult-to-track-down errors).
2010-08-16FAQ: update SSL section, add Pound
Pound appears to work well in my limited testing with t/sha1.ru and "curl -T-"
2010-08-13dev_fd_response: weaken /dev/fd check for compatibility
/dev/fd/0 may not be stat()-able on some systems after dropping permissions from root to a regular user. So just check for "/dev/fd" which seems to work on RHEL 2.6.18 kernels. This also allow us to be used independently of Unicorn in case somebody ever feels the compelling need to /close/ stdin.
2010-08-10doc: it's always "Rainbows!" with a bang(!)
That is the official name of the project and we will not lead people to believe differently.
2010-08-09FAQ: update Rails requires for Ruby 1.9.2
Ruby 1.9.2 no longer includes '.' inside $LOAD_PATH by default, so those requires won't work unless we specify the full path. We prefer File.expand_path to prefixing './' since we want to be consistent with what Rails itself uses to prevent double-requires.
2010-08-03Rainbows! 0.96.0 - range support v0.96.0
For concurrency models that use sendfile or IO.copy_stream, HTTP Range requests are honored when serving static files. Due to the lack of known use cases, multipart range responses are not supported. When serving static files with sendfile and proxying pipe/socket bodies, responses bodies are always properly closed and we have more test cases for dealing with prematurely disconnecting clients. Concurrency model specific changes: EventMachine, NeverBlock - * keepalive is now supported when proxying pipes/sockets * pipelining works properly when using EM::FileStreamer * these remain the only concurrency models _without_ Range support (EM::FileStreamer doesn't support ranges) Rev, RevThreadSpawn, RevThreadPool - * keepalive is now supported when proxying pipes/sockets * pipelining works properly when using sendfile RevThreadPool - * no longer supported under 1.8, it pegs the CPU at 100%. Use RevThreadSpawn (or any other concurrency model) if you're on 1.8, or better yet, switch to 1.9. Revactor - * proxying pipes/sockets with DevFdResponse is much faster thanks to a new Actor-aware IO wrapper (used transparently with DevFdResponse) * sendfile support added, along with Range responses FiberSpawn, FiberPool, RevFiberSpawn - * Range responses supported when using sendfile ThreadPool, ThreadSpawn, WriterThreadPool, WriterThreadSpawn - * Range responses supported when using sendfile or IO.copy_stream. See the full git logs for a list of all changes.
2010-08-03t0500: avoid race condition with timestamps
Not sure what possessed me to clobber the original variable set in the parent, but the initial time for the subshell could be set too late in relation to the actual server time. So we need to stash the original time before any HTTP requests were made.
2010-08-03maint: publish Rubyforge news on release
I keep forgetting, so I'll force it on myself.
2010-08-03doc: hide internal Response416 error constant
It's an internal implementation detail and not for user consumption.
2010-08-03doc: update Static_Files documentation page
Things have change slightly since 0.95.1, which is ancient.
2010-08-02doc: update TODO
We've knocked out a few of these, so we're closer to being "done" :)
2010-08-02event_machine: protect IO#close from EBADF
EventMachine may close the underlying file descriptor on us if there are unrecoverable errors during write. So IO#closed? is a pointless check because EM does not invalidate the underlying file descriptor.
2010-08-02revactor: implement sendfile and range support
Due to the synchronous nature of Revactor, we can be certain sendfile won't overstep the userspace output buffering done by Rev.
2010-08-01t0015: cleanup after working directory test
Our test suite doesn't include facilities for dealing with temporary directories, yet.
2010-08-01tests: do not clobber existing RUBYLIB
We may want to try some external libraries for some tests via RUBYLIB/RUBYOPT while doing development.
2010-07-29fiber/io: reuse buffer in Rainbows::Fiber::IO#each
This makes life easier for the lazy GC when proxying large responses (and also improves memory locality).
2010-07-29revactor: Actor-aware dev_fd_response proxying
Proxying regular Ruby IO objects while Revactor is in use is highly suboptimal, so proxy it with an Actor-aware wrapper for better scheduling.
2010-07-28event_machine: better handling of staggered pipelines
Since TCP sockets stream, HTTP requests do not come in at well-defined boundaries and it's possible for pipelined requests to come in in a staggered form. We need to ensure our receive_data callback doesn't fire any actions at all while responding with a deferrable @body. We still need to be careful about buffering, since EM does not appear to allow temporarily disabling read events (without pausing writes), so we shutdown the read end of the socket if it reaches a maximum header size limit.
2010-07-27event_machine: prevent double close of client socket
Not sure where this is happening, but this can trigger Errno::EBADF under heavy load.
2010-07-27rev/client: workaround close ordering issue when proxying
When proxying pipes/sockets, it's possible for the Rev::IO#write to fail and close our connection. In that case we do not want our client to continue with the on_write_complete callback.
2010-07-27rev_thread_pool: stop supporting this under Ruby 1.8
It hits 100% CPU usage and Rev's 1.8 support when mixed with threads is currently suboptimal. Unfortunately our tests can not check for 100% CPU usage, so I had to *gasp* confirm it by actually starting an app :x This appears to be a fixable bug in Rev, however, and we'll try to fix it as soon as we have time.
2010-07-27t0020: speed up rate limited tests
They were taking long enough to be annoying :<
2010-07-27t00{2,3}1: beef tests up with more aborted requests
HTTP/1.1 and HTTP/1.0 code paths may vary significantly from the (highly uncommon) HTTP/0.9 ones in our concurrency models, so add extra tests for those.
2010-07-27event_machine: fix pipelining of static files
EM::FileStreamer writes may be intermingled with the headers in the subsequent response if we enable processing of the second pipelined response right away, so wait until the first response is complete before hitting the second one. This also avoids potential deep stack recursion in the unlikely case where too many requests are pipelined.