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?



Reply via email to