about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2011-03-15Rainbows! 3.2.0 - trying to send files to slow clients v3.2.0
We now use IO#trysendfile in the sendfile 1.1.0 to reduce the cost of generating backtraces for slow clients (from EAGAIN). Nothing new for people not serving static files (but more on the way). Existing "sendfile" gem users must upgrade to 1.1.0 or risk being left without sendfile support at all: http://bogomips.org/rainbows.git/patch?id=cd8a874d
2011-03-10switch from IO#sendfile_nonblock to IO#trysendfile
IO#trysendfile does not raise exceptions for common EAGAIN errors, making it far less expensive to use with the following concurrency models: * Coolio * CoolioFiberSpawn * Revactor * FiberSpawn * FiberPool This requires the new sendfile 1.1.0 RubyGem and removes support for the sendfile 1.0.0. All sendfile users must upgrade or be left without sendfile(2) support. IO#sendfile behaves the same if you're using a multi-threaded concurrency option, but we don't detect nor use it unless IO#trysendfile exists.
2011-02-28use IO#wait instead of IO.select for single readers
It's a simpler interface and avoids allocating an array which is nice.
2011-02-11Rainbows! 3.1.0 - minor updates v3.1.0
Small bug fixes that have been sitting around, not much but it's already been one month since our last release. * Unicorn dependency updated to 3.4.0, so we get IPv6 support and Kgio.autopush support for ":tcp_nopush => true" users. * Optional :pool_size argument is fixed for NeverBlock and CoolioThreadPool users. * Mostly minor internal code cleanups * Sunshowers support removed, it was out-of-date and unmaintained. Cramp remains supported for now. * X-Rainbows-* response headers support removed, nobody used it. There are severalnew features in this release not documented here. Consider any new features not mentioned in these release notes to be subject to removal/renaming in future releases.
2011-02-11reverse_proxy: document as "not ready for production"
Of course some folks believe nothing in Rainbows! is :.
2011-02-07fix optional "use" argument handling
Actually use the Rainbows::O constant for use [ew: rewritten commit message subject] Acked-by: Eric Wong <normalperson@yhbt.net>
2011-02-07doc: rdoc cleanups and fixes
Don't need to document things that aren't ready, yet.
2011-02-06minimize &block usage for yield
No need to allocate a proc every time when we can just yield much more efficiently.
2011-02-06kill some unnecessary &block usage
We were needlessly allocating objects even when using yield.
2011-02-05*epoll: refactor common loop code
acceptor thread pools could use some work, still
2011-02-05*epoll: consolidate re-run logic
There's a lot of code duplication here :<
2011-02-05writer_thread_pool: needless use of Array#map
Array#each will do..
2011-02-05less expensive QUIT processing
Avoid constantly nuking the method cache and raising repeated exceptions while our master process is shutting us down.
2011-02-05http_server: kill a warning
Ugh, I need to think of a way to clean this up...
2011-02-04bump required Unicorn dependency for Kgio
We want to use the singleton methods in Kgio to reduce conditionals.
2011-02-04rename XAcceptEpoll to XEpoll
It's too long especially since XEpollThreadPool is planned :>
2011-02-04test_isolate: use latest Unicorn
It supports IPv6 and pulls in a better Kgio. Since Unicorn defaults to ":tcp_nopush => true", we need to flip it back to false to be compatible with the types of apps Rainbows! is targetted as.
2011-02-04reverse_proxy: small reorganization
Put all of our constants in one place for easy reference
2011-02-04reverse_proxy: properly read IPv6 addreses in upstreams
Yes it's fugly
2011-02-04epoll: handle EINTR properly in Ruby-space
We can't work around it effectively in the C extension itself. This requires the latest sleepy_penguin gem.
2011-02-01preliminary reverse proxy Rack application
This can be a starting point for developing Cool.io or EventMachine-based reverse proxy applications on Rainbows! Eventually Rainbows! could replace nginx for Unicorn users! Just don't consider this code production ready, yet, at all, it doesn't handle any sort of failover and has no automated tests, yet.
2011-01-31coolio/client: on_write_complete triggers read
This allows us to more aggressively handle pipelining as well as trigger future Kgio autopush behavior.
2011-01-26epoll/client: avoid unnecessary Epoll#set calls
We should only attempt to modify the descriptor when we block, and not for subsequent events.
2011-01-24initial XAcceptEpoll concurrency model
Edge-triggered epoll concurrency model with blocking accept() in a (hopefully) native thread. This is recommended over Epoll for Ruby 1.9 users as it can workaround accept()-scalability issues on multicore machines.
2011-01-24epoll/client: thread-safety for write queuing
We're living on the EDGE and mixing epoll with threads :D
2011-01-24epoll: make Epoll.quit more reusable
We'll be using this more in the future
2011-01-24neverblock: fix app_call under 1.8.7
super doesn't seem to capture arguments inside a block under 1.8.7 :<
2011-01-24clear LISTENERS array on close
No reason to keep it around
2011-01-21epoll/client: minor optimization
We know @wr_queue is empty since we just initialized it and the first thing an HTTP client does is read.
2011-01-21ev_core: force input to be given to app_call
No need to setting an ivar for most requests
2011-01-21epoll/client: factor out on_close method
We'll override it, maybe...
2011-01-21epoll/client: remove unused client
We don't do Level-Triggered I/O around here
2011-01-21epoll: reduce expiration calls and Time objects
We'll lower our precision for keepalive timeouts a little and and reduce our Time object allocation rate.
2011-01-21ev_core: garbage reduction
We don't need to allocate new string objects for short-lived strings. We'll pay the price of a constant lookup instead.
2011-01-21epoll: use newer sleepy_penguin
We can eliminate the State module to simplify our code since 1.3.x keeps better track of things.
2011-01-21max_body: disable for epoll
It's almost just like Coolio
2011-01-21epoll: use sleepy_penguin default size for epoll_wait
It was based off the nginx window of 64 events. Not that any servers are really that busy...
2011-01-20epoll: close epoll descriptor on graceful shutdown
This allows us to gracefully shutdown more quickly.
2011-01-20remove support for Sunshowers
The WebSocket protocol is still undergoing changes and unused. We won't waste time supporting it until it's finalized and doesn't break HTTP.
2011-01-20epoll: ignore ECONNRESET errors
Nothing we can do about that from clients. Perhaps kgio should just return nil for those...
2011-01-20ev_core: simplify setup steps
ev_core is always loaded after forking, so eliminate the need for extra setup steps for each concurrency model that uses it
2011-01-20merge rack_input into process_client
It turns out to be less-used than previous anticipated, so there's no point in having yet another module.
2011-01-20ev_core: localize 413 error constant
It's the only place we ever use it
2011-01-20remove unused 416 error constants/exceptions
We handle that locally in rainbows/response now
2011-01-20dev_fd_response: garbage reduction
Constant strings mean the runtime won't have to allocate new objects all the time since GC is currently the biggest performance problem of Ruby 1.9.x in my experience.
2011-01-19dev_fd_response: do not send chunks to 1.0 clients
chunked Transfer-Encoding is only valid for HTTP/1.1
2011-01-19remove support for X-Rainbows-* headers
We guarantee the Rack env will exist for the duration of the request/response cycle, so we can just tweak "rainbows.autochunk".
2011-01-19initial edge-triggered epoll model
Coolio and EventMachine only use level-triggered epoll, but being Rainbows!, we live on the EDGE!
2011-01-17ev_core: reuse buffer to avoid GC thrashing
Single-threaded concurrency models can reuse a single buffer to avoid thrashing memory and causing unnecessary GC activity.
2011-01-11Rainbows! 3.0.0 - serving the fastest apps to slow clients faster! v3.0.0
There is one incompatible change: We no longer assume application authors are crazy and use strangely-cased headers for "Content-Length", "Transfer-Encoding", and "Range". This allows us to avoid the case-insensitivity of Rack::Utils::HeaderHash for a speed boost on the few apps that already serve thousands of requests/second per-worker. :Coolio got "async.callback" support like :EventMachine, but it currently lacks EM::Deferrables which would allow us to call "succeed"/"fail" callbacks. This means only one-shot response writes are supported. There are numerous internal code cleanups and several bugfixes for handling partial static file responses.