about summary refs log tree commit homepage
path: root/lib/rainbows.rb
DateCommit message (Collapse)
2020-01-09doc: switch bogomips.org to yhbt.net
bogomips.org is due to expire, soon, and I'm not willing to pay extortionists at Ethos Capital/PIR/ICANN to keep a .org. So it's at yhbt.net, for now... Identity is overrated. Tor users can use .onions and kick ICANN to the curb: torsocks w3m http://rainbows.ou63pmih66umazou.onion/ torsocks git clone http://ou63pmih66umazou.onion/rainbows.git/ torsocks w3m http://ou63pmih66umazou.onion/rainbows-public/ While we're at it, switch news.gmane.org => news.gmane.io (but I suspect that'll need to be resynched since our mail "List-Id:" header is changing).
2017-04-02workaround for unicorn 5.3.0
unicorn 5.3.0 introduced a new Unicorn::TCPSrv and Unicorn::TCPClient constants to distinguish TCP sockets from Unix ones from its check_client_connection feature. These classes screw up our direct inheritance of Kgio::Socket from the Rainbows::Client class. Since we do not support check_client_connection, we do not need these new classes in unicorn. Removing Unicorn::TCPSrv and aliasing it as Kgio::TCPServer is sufficient for now. In the future, removing all kgio dependencies from Rainbows! will be prioritized. Thanks to Claudio Poli for reporting the bug: https://bogomips.org/rainbows-public/9267B33C-D13C-47E1-8892-4777B96DDCD1@gmail.com/
2016-10-31doc: move homepage and update URLs to HTTPS
Let's Encrypt is working well for us and having fewer domains reduces subjectAltName bloat to speed up connection establishment HTTP will remain working indefinitely since some old systems do not have modern TLS stacks.
2015-11-24fix Rainbows.now definition for old Rubies
Oops, blind substitution :x
2015-11-21Ruby 1.9.3+-only cleanups
unicorn 5 will only support Ruby 1.9.3 and later, so remove some checks for Hash#compare_by_identity and IO.copy_stream which we know exist in Ruby 1.9. Favor &:sym proc dispatch to avoid unnecessary captures and bytecode size increases, too. Finally, ensure we fail fast by converting some literal hashes to use non-arrow syntax for symbolic keys.
2015-11-21bump to unicorn 5.0.1, use monotonic clock
The timeout (mis)feature in unicorn uses the monotonic clock if available. We must follow suit to avoid having our timeout functionality completely broken.
2015-10-15speed up QUIT for users of the unicorn worker_loop
WriterThreadPool, WriterThreadSpawn, Base, and potentially other rarely-used concurrency options experienced slow shutdowns due to the destruction of a listener socket failing to wake up a thread in IO.select. Send ourselves a signal to interrupt the IO.select call in the main thread to force the wakeup.
2014-01-17switch homepage to http://rainbows.bogomips.org/
RubyForge is going away, so we must migrate the homepage. The mailing list will be migrated, soon.
2014-01-17unicorn 4.8 compatibility + test version bumps
Internal reworking of unicorn 4.8.0 completely broke us(!). This commit fixes things, but it means we no longer support unicorn <= 4.7. Sorry about that.
2011-08-05Remove deprecated Rainbows::HttpResponse
Acked-by: Eric Wong <normalperson@yhbt.net>
2011-07-21remove tcp_nodelay/tcp_nopush tweaking
Unicorn 4.x already defaults match those of Rainbows! to favor lower latency instead of lowered bandwidth usage.
2011-07-21remove unnecessary io/wait require
kgio 2.5 added kgio_wait_*able methods
2011-06-22Unicorn 4.x resync for ticker
This removes the extra per-process file descriptor and replaces it with Raindrops.
2011-06-11remove Rainbows.run method
We can get away with a single stack frame reduction. Unicorn itself has more stack reductions, but Rainbows! is further behind in this area.
2011-06-09stream_response_epoll: our most "special" concurrency option yet
This doesn't use Rainbows::Base so we have no keepalive support at all. This could eventually be an option for streaming applications.
2011-05-16doc: cleanup rdoc for Rainbows module
The only supported method is Rainbows.sleep in here
2011-05-16more reliable shutdown for epoll concurrency models
Just close the epoll descriptor, since the sleepy_penguin epoll_wait wrapper may not return EINTR in the future.
2011-05-10configurator: move validation logic over
There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays.
2011-05-09split out pool_size module
coolio_thread_pool, neverblock both use it, and xepoll_thread_pool will support it next, too.
2011-05-09add XEpollThreadPool concurrency option
This is probably friendlier on server resources in the worst case than XEpollThreadSpawn but may perform worse in the client client-visible way, too.
2011-05-06ensure some requires get loaded in master
More sharing, faster startups, and most importantly, better error reporting if some things are missing.
2011-05-03Rainbows! defaults more DRY
We won't forget to reset defaults on SIGHUP anymore.
2011-05-03s/max_bytes/client_max_body_size/ for consistency
Too confusing otherwise...
2011-05-03add client_header_buffer_size tuning parameter
We're changing our default to 1K buffers to save memory. This should reduce memory usage of idle clients and lower pressure on the MRI GC. Rails applications using session cookies (the default) may want to up this to 2K or more.
2011-05-02rainbows: get rid of MODEL_WORKER_CONNECTIONS constant
Just use regular autoload, now. Less guesswork.
2011-04-29xepoll_thread_spawn: initial implementation
Whee! This is going to be awesome.
2011-04-25make all concurrency options use 50 by default
This may change again in the future, but it paves the way for simplifying this code...
2011-03-21simplify LISTENERS closing
No need to obfuscate what it's doing
2011-02-05*epoll: refactor common loop code
acceptor thread pools could use some work, still
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-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-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-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-24clear LISTENERS array on close
No reason to keep it around
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-20remove unused 416 error constants/exceptions
We handle that locally in rainbows/response now
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-06minor cleanups following state cleanups
We noticed a few more things that could be cleaned up after the last commit.
2011-01-06eliminate G constant and just use the Rainbows! module
Code organization is hard :<
2011-01-06rainbows.rb: unindent
2011-01-06eliminate timed_read module
No need to split it out when there's only a single class using it.
2011-01-06simplify keepalive_timeout accounting
Easier just to use an instance variable
2011-01-05disable Nagle's algorithm by default
Nagle's algorithm is harmful with the write-write-read sequence during keepalive, so we disable it performance for users using keepalive. We always write headers with a separate write because Rack response bodies may not always be ready for writing when headers are. This requires Unicorn 3.3.0
2011-01-05simplify Rainbows.max_bytes implementation
Yes, I'm still learning Ruby.
2011-01-04globally refactor Range handling for responses
Rack::Utils::HeaderHash is still very expensive in Rack 1.2, especially for simple things that we want to run as fast as possible with minimal interference. HeaderHash is unnecessary for most requests that do not send Content-Range in responses.
2011-01-04simplify per-client keepalive state checks
This lets us simplify repetitive checks worry less about properly maintaining/closing client connections for each concurrency model we support.
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-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.