How does Perlbal translate URLs?

dormando dormando at
Sun Aug 19 19:51:36 UTC 2007

drpr0ctologist at wrote:
>     Perlbal doesn't translate it, your application does.
>     User requests hi.jpg
>     Perlbal forwards request to application
>     Application returns X-REPROXY-URL: 2342342.fid
>     Perlbal requests 2342342.fid and returns it to the user
> Suppose I go directly to 2342342.fid in my browser (not using Perlbal).  
> Would this lead to the image showing up? 
> Also, do I need to use Perlbal in order to use MogileFS?

You could, but... why not just use perlbal? Mogstored is already a 
perlbal. Just go all the way :) Perlbal does return request buffering, 
upload buffering, header caching...

After seeing a bunch of your questions to the list, I'd highly recommend 
just installing an instance of this guy locally and playing with it for 
a few hours.

Set up a DB, mogilefs tracker, storage, perlbal, and apache+language on 
localhost somewhere. Have perlbal talk to apache, then fiddle with small 
application scripts until you get it right.

(and to answer your question, just think: If you request hi.jpg and your 
application looks it up via key in mogilefs, what will happen if you 
request a 135921352135.fid through your application? :)

fid's are also ephemeral! If you replace a file it gets a new fid. Not a 
good thing to use as a permalink anywhere.


More information about the perlbal mailing list