Date | Commit message (Collapse) |
|
Keeping I/O out of unicorn.rb
|
|
I'll be removing signal handling from worker processes...
|
|
We're not using them and they don't seem useful in any
shape or form...
|
|
This allows us to avoid the overhead of allocating a new buffer
each and every time we call sysread (even when just parsing
headers for GET requests).
|
|
Unicorn is only designed for fast internal networks (and
loopback); so avoid wasting time with userspace I/O buffering.
This should not significantly affect userspace threading on 1.8
in case your application itself is running threads for some
(masochistic) reason as long as the clients you're serving
directly with Unicorn are fast.
|
|
Instead of ".#{$$}" as the suffix. This makes it clearer that
it's a temporary name and also so we can use per-process sockets
to make debugging easier.
|
|
We're not currently using them; and I don't see the need to
ever use either...
|
|
Note: since we've stripped everything down to hell, we're Ruby
1.9 compatible at the moment. Also remove references to that
new school stuff like JRuby and threads.
|
|
Running Rake is too slow for me to do builds on, and
I don't have net access to install the Echoe gem at
the moment for Ruby 1.9...
|
|
While we'll support anything that exposes a Rack-like interface
(a very good one IMHO), we shouldn't have a hard dependency on
Rack to simplify testing.
While we're at it, I'm not using Daemons anymore, either,
since that does too many things behind our back as far as
daemonization goes.
As a result of not depending on Rubygems, either, I've sped
up my "make -j" test ~1.5 seconds
|
|
Keep this somewhat consistent with the HttpParser API
which also exposes #reset instead of #reset!
|
|
Just stuff what little logic we had for it into HttpResponse
since Rack takes care of the rest for us.
Put the HTTP_STATUS_HEADERS hash in HttpResponse since we're the
only user of it. Also, change HttpResponse.send to
HttpResponse.write to avoid overriding the default method.
|
|
Use select(2) to multiplex non-blocking accept(2) calls between
them. Additionally, aggressively make a bet after accepting
clients where we'll try to do a non-blocking accept(2) against
the full set of descriptors. This is based on the assumption
that if we just accepted connections, we're probably reasonably
busy.
This should lead to lower latency under high load; but some
wasted cycles when requests come in intermitently. By this same
logic, we don't really care for the thundering herd problem,
either; since it is only noticeable with many (hundreds) of
processes when most of them are idle.
|
|
Additionally, provide Socket#unicorn_addr which makes it
easy to determine whether a given Socket matches one in
the config.
|
|
Shared objects on my platform (Linux) do not belong in
revision control...
|
|
We'll be supporting UNIX domain sockets soon... Get rid of
tcphack since it was overriding a default method and just
manually call Socket.new, bind, listen ourselves. Additionaly,
use SO_REUSEADDR when binding since it is convenient for
restarts.
|
|
This will help prevent TMPDIR from becoming bloated when
handling thousands of large uploads a day. This is a problem in
many UNIX filesystems (including ext3): names of entries never
expire even after files are gone and the only way to clear it is
to get rid of the directory itself.
|
|
It's pointless...
|
|
read_body can be a long-running loop; so avoid wasting CPU
cycles by repeatedly performing a hash lookup to get to
a temporary buffer.
|
|
The previous API was very flexible, but I don't think many
people really cared for it... We now repeatedly use the
same HeaderOut in each process since I completely don't
care for multithreading.
|
|
|
|
Regenerating headers constantly is a waste of time.
|
|
It's more GC-friendly to just use an array than to repeatedly
append short strings on top of each other. I also find StringIO
confusing...
|
|
It's really pointless to allow stdio or something
similar to do any sort of buffering on a TCP socket
on a Linux box where syscalls are cheap and we have
TCP_CORK.
|
|
All tests for threading and semaphores have been removed. One
test was changed because it depended on a shared variable.
Tests will be replaced with tests to do process management
instead.
|
|
Avoid conflicting with existing Mongrel libraries since
we'll be incompatible and break things w/o disrupting
Mongrel installations.
|
|
Supporting corporate enterprise platforms isn't my style :P
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
Some of the tests here are horrifically slow due to sleeps,
allow using gmake to run these tests in parallel. My Core2 Duo
runs "make -j" over 10s faster than "rake".
|
|
|
|
|
|
* 'master' of git@github.com:fauna/mongrel:
Clean up some logging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 'master' of git@github.com:fauna/mongrel:
Cleanup.
Cleanup.
|
|
|
|
|