On 02/15/2011 05:09 PM, Joshua Tolley wrote:
A site I'm working with needs some fairly intelligent edge caching, and I've
been trying out traffic server to implement it. Enough has gone wrong that I'm
wondering if either I'm doing something very wrong, or traffic server really
isn't suited for the things I'm trying to do.

Hi Joshua,

sorry for the late reply, hopefully you're still looking for an answer to get going with Apache TS :).

For instance, I set up traffic server as a reverse proxy, in front of a local
apache instance. I tried using cache.config to cache all png files and no html
files, like this:

url_regex=localhost suffix=png ttl-in-cache=10m
url_regex=localhost suffix=html action=never-cache

I suspect this is a bug, it seems we do not honor / use the suffix "mod" properly. I've filed a bug (TS-674) to track this.


So then I started fiddling with some of the example plugins. I managed to
compile the add-header and output-headers plugins easily enough, and to
install them. But the add-header plugin didn't add any headers, and the
output-headers plugin didn't output any headers. I added some INKDebug() lines
to both plugins and recompiled them so I could be sure they were running, and
saw all kinds of output telling me, for instance, the add-header plugin was
running and trying to add a header. But no header showed up on the output.
Hmm, the "example" headers generally are intended as "examples" only, i.e. not for production use. As such, they ought to still use, but no one really is testing them afaik. I've made a slightly better example plugin for headers manipulation available on the SVN server, in

    http://svn.apache.org/repos/asf/trafficserver/plugins/header_filter/


Note that this plugin requires current trunk to compile as of a few days ago.

Finally, a more general question. The documentation says plugins can't modify
the cache directly. Some of our requirements are that we need to cache or not
cache objects based on headers, cookies, etc., but I'm not entirely sure
that's actually possible. I'd appreciate any comments you can give. Thanks in
advance.


You can't (easily) modify HTTP objects once they are in cache. But you can modify objects before they get in cache, or modify the responses so that they don't end up in cache etc. I hope that makes any sense?

Cheers,

-- leif

Reply via email to