Caching on the filesystem

David Snopek dsnopek at
Tue Mar 6 18:25:55 UTC 2007


Please forgive me for being so ignorant of how Perlbal works, but I've
just started playing with it.  I am looking for any pointers on where
to look or how to start ...

We have a very complicated image generation system.  I want to use a
pool of servers to generate the images.  I was able to get this going
easily with a service set as "role = reverse_proxy".  However, I want
to cache the result on the server running Perlbal so that it can
simply be sent if it exists.  We already have a mechanism that knows
when the cached image is invalid and can call to the server and
request that the cached image be deleted.

Is possible, with some series of hooks, to combine the roles
"reverse_proxy" and "web_server" to get this done?  Here's what I'm
thinking:  The web_server service will check if the image exists and
simply serve it if it exists.  If it doesn't, it "reproxys" to the
reverse_proxy.  The reverse_proxy will write the image to disk as it
serves it to the client.  How would I accomplish such a thing?  Or is
there a better way to do it?

Thanks in advance!
David Snopek.

More information about the perlbal mailing list