socket_sendfile and socket_accept_filter

Eric Hodel | Fri, 24 Mar 2006 01:19:00 GMT

Posted in , ,

These are two packages that I use to speed up WEBrick image serving now freshly released. Unfortunately I haven’t tested them on any platform other than FreeBSD so please file bugs if they don’t work for you.

$ sudo gem install socket_sendfile
$ sudo gem install socket_accept_filter

socket_sendfile adds sendfile(2) to Socket and forms the cornerstone of our WEBrick image serving.

socket_accept_filter makes it easy to set the SO_ACCEPTFILTER socket option so you can enable the accf_http(9) and accf_data(9) accept filters. Accept filters delay the return from accept(2) until enough data has arrived on the socket for processing.

Shortly I’ll have enough software released to do a full write-up of high-volume image serving with WEBrick.

2 comments

Comments RSS FEED

Are there any posts explaining the benefits of using Webrick over Apache or Lighttpd for serving images? Obviously there must be, but I don’t understand what those are.

J. Weir said about 15 hours later

Not yet, but Real Soon Now. I have one more chunk of functionality to extract.

Eric Hodel said about 17 hours later

Comments are disabled