On 11/24/2009 12:23 AM, Eric Balsa wrote:
Hi Tin,
   I can't speak to whether Y! plans to open source the cookie remap
plugin but I was author of that plugin at Y! and can give some generic
pointers. The plugin itself is is a bit Y! specific, so there may be

Yeah, we will opensource it, but it'll take a little while to get all that cleared up. I'm working on fixing the regex code in this plugin, it's, ehm, b0rken... ;).

   With any remap plugin you are essentially changing the way TS
behaves when it receives a request, moving from a static mapping of
url A->  origin B to a dynamic choice of origin based on some aspect(s)
of the request. In this case, the goal is to change which origin
server will handle the request based on the request cookies from the
client. There are many useful possibilities for a plugin like this.
One example might be sending the request to a "static" origin server
if the request appears to not require personalized content (iow, valid
session cookie(s) are not present). Another example might be "sticky"
sessions where a hash of the cookie string always sends you to the
same origin server. There are many possibilities. Imagine someone
wanting a combination of both of these.

Cool, great stuff Eric. I'm working on a total rewrite of the remap plugin APIs, once I've wrapped my noodle around what I want, I'll post something here for reviews and comments. We're also working on some other internal changes to make remapping via remap.config more flexible, and long term, I think we really want remap.config to be much more like the virtual hosts in Apache HTTPD.

As for plugins we'll opensource, I think we'll get these out in the near future:

regex_remap - Remap rules on PCRE regexes, with group expansions etc. (kinda similar to mod_rewrite)
   cookie_remap - As described by Eric.
header_rewrite - A "generic" InkAPI plugin that can hook into various stages, and perform conditional request / response rewrites.

Not 100% positive, but hopefully we can also release

url_remap - A remap plugin that takes an incoming URL, cryptographically signed, and rewrites the request from that URL. ramcache - A replacement cache, which implements a very efficient RAM-only cache. stale_while_revalidate - Implements the conditional 'serve stale' content feature that Squid has.


Cheers,

-- leif

Reply via email to