You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by jonathan vanasco <jv...@mastersofbranding.com> on 2005/03/16 01:32:57 UTC
[OT] Performance Question
I'm marking this questions OT because its not entirely mod_perl, but
not entirely not-mod_perl...
I'm going to serve a potentially large amount of images , so have
decided to use directory hashing to store them, along with either
sequential numbering or a 32char hex identifier -- so abcdefg.jpg is in
the directory gf/ed/abcdefg.jpg
here's where mp2 comes in -- instead of writing out the hashed
directory path, i was thinking about just writing the image name and
hosting it off a location directive that would hash file requests
transparently
essentially this would be the tradeoff:
apache a : dynamic server
apache b : static server
scenario 1
apache a (mp2) : prints hashed image location
extra , though tiny, function call to create location
potentially larger bandwidth (though chained compression can
mitigate this)
apache b (vanilla) : serves hashed image location as-is
scenario 2
apache a (mp2) : prints image location
no call to hash image
slightly obfuscates backend data storage
apache b:
either:
(mod_rewrite) rewrites requests on the fly
(mp2) rewrites requests on the fly
does anyone think this is worthwhile to benchmark -- or would the extra
load on the static server be an obviously drastic increase to seasoned
users?
Re: [OT] Performance Question
Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2005-03-15 at 19:32 -0500, jonathan vanasco wrote:
> here's where mp2 comes in -- instead of writing out the hashed
> directory path, i was thinking about just writing the image name and
> hosting it off a location directive that would hash file requests
> transparently
Just use mod_rewrite for this on the server that serves up the images.
It's much more efficient.
- Perrin