Date | Commit message (Collapse) |
|
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/
|
|
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.
|
|
Oops, blind substitution :x
|
|
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.
|
|
The timeout (mis)feature in unicorn uses the monotonic clock
if available. We must follow suit to avoid having our timeout
functionality completely broken.
|
|
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.
|
|
RubyForge is going away, so we must migrate the homepage.
The mailing list will be migrated, soon.
|
|
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.
|
|
Acked-by: Eric Wong <normalperson@yhbt.net>
|
|
Unicorn 4.x already defaults match those of Rainbows!
to favor lower latency instead of lowered bandwidth
usage.
|
|
kgio 2.5 added kgio_wait_*able methods
|
|
This removes the extra per-process file descriptor and
replaces it with Raindrops.
|
|
We can get away with a single stack frame reduction. Unicorn
itself has more stack reductions, but Rainbows! is further
behind in this area.
|
|
This doesn't use Rainbows::Base so we have no keepalive support
at all. This could eventually be an option for streaming
applications.
|
|
The only supported method is Rainbows.sleep in here
|
|
Just close the epoll descriptor, since the sleepy_penguin
epoll_wait wrapper may not return EINTR in the future.
|
|
There's actually no reason we can't have these methods
in Rainbows::Configurator where it's easier to document
nowadays.
|
|
coolio_thread_pool, neverblock both use it, and
xepoll_thread_pool will support it next, too.
|
|
This is probably friendlier on server resources in the worst
case than XEpollThreadSpawn but may perform worse in the client
client-visible way, too.
|
|
More sharing, faster startups, and most importantly,
better error reporting if some things are missing.
|
|
We won't forget to reset defaults on SIGHUP anymore.
|
|
Too confusing otherwise...
|
|
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.
|
|
Just use regular autoload, now. Less guesswork.
|
|
Whee! This is going to be awesome.
|
|
This may change again in the future, but it
paves the way for simplifying this code...
|
|
No need to obfuscate what it's doing
|
|
acceptor thread pools could use some work, still
|
|
Avoid constantly nuking the method cache and raising
repeated exceptions while our master process is shutting
us down.
|
|
It's too long especially since XEpollThreadPool is planned :>
|
|
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.
|
|
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.
|
|
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.
|
|
No reason to keep it around
|
|
It turns out to be less-used than previous anticipated,
so there's no point in having yet another module.
|
|
We handle that locally in rainbows/response now
|
|
Coolio and EventMachine only use level-triggered epoll,
but being Rainbows!, we live on the EDGE!
|
|
We noticed a few more things that could be cleaned
up after the last commit.
|
|
Code organization is hard :<
|
|
|
|
No need to split it out when there's only a single
class using it.
|
|
Easier just to use an instance variable
|
|
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
|
|
Yes, I'm still learning Ruby.
|
|
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.
|
|
This lets us simplify repetitive checks worry less about
properly maintaining/closing client connections for each
concurrency model we support.
|
|
We use Cool.io internally everywhere now, but preserve
Rev-based models for anybody using them.
|
|
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.
|
|
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.
|
|
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.
|