
Thousands of range requests for a very large object in the traffic server cache
are likely to increase system load averages due to I/O wait as objects are stored
on a single stripe or disk drive.

This plugin allows you to remap individual range requests so that they are stored
as individual objects in the ATS cache when subsequent range requests are likely
to use the same range.  This spreads range requests over multiple stripes thereby
reducing I/O wait and system load averages.

This plugin reads the range request header byte range value and then creates a
new cache key url using the original request url with the range value appended
to it.  The range header is removed where appropriate from the requests and the
origin server response code is changed from a 206 to a 200 to insure that the
object is written to cache using the new cache key url.  The response code sent 
to the client will be changed back to a 206 and all requests to the origin server 
will contain the range header so that the correct response is received.

Installation:

    make
    sudo make install

If you don't have the traffic server binaries in your path, then you will need
to specify the path to tsxs manually:

    make TSXS=/opt/trafficserver/bin/tsxs
    sudo make TSXS=/opt/trafficserver/bin/tsxs install

Configuration:

    Add @plugin=cache_range_requests.so to your remap.config rules.

    Or for a global plugin where all range requests are processed,
    Add cache_range_requests.so to the plugin.config

