range requests and multipart responses

Eric Wong normalperson at yhbt.net
Tue Jul 20 14:54:59 EDT 2010

James Tucker <jftucker at gmail.com> wrote:
> On 20 Jul 2010, at 07:18, Eric Wong wrote:
> > [1] - For the performance-minded, it's also tough to implement multipart
> >      responses efficiently using any sendfile() implementation.
> >      Our TCP_CORK support is far from optimal under Linux right now,
> >      and not using TCP_CORK would be even less efficient with extra
> >      multipart headers.  AFAIK, sendfilev() isn't available outside of
> >      Solaris, either.
> Does cork even help in real world use cases?

Heh, good question :)

I've only seen it help in microbenchmarks and analyzing tcpdump output.
I've never bothered checking in Ruby apps (never though it'd be worth my
time, even), but I don't expect it to be worth the effort.  Maybe
somebody else will care enough...

However, I've seen corking hurt badly for things like chat apps and
anything with bidirectional small messages.  It's impossible for the
server to reliably tell what type of traffic to expect without the app
stepping in to tell it to uncork at certain points.

Eric Wong

More information about the rainbows-talk mailing list