filename - hashkey
smitty at gmail.com
Thu Jan 3 17:14:37 UTC 2008
> any chance that i could name them
> /dev1/0/000/000/0000000011_5e2bc.jpg for example.
> so i prevent that user could browse through the server and get all files.
> and i would also need to rewrite
It's not really designed to allow you to expose your file servers
directly to the Internet. By doing this you lose a lot of the
advantages of the MogileFS system, such as the ability to gracefully
handle disk/machine failures. If you give the end-user a URL that
points directly at one of your storage nodes, then you have to hope
that node/disk never goes away.
> Intern (servers) should still use this, though to deliver the files
> outside i would love to change the url to:
> http://fs1.files.domain.com/0/000/000/0000000011.fid (those request will
> be handled by normal http server (apache,lighttpd, ...))
> (furthermore resulting in:
> i do know that i could rewrite the domain and port in my scripts (php in
> this case).
> Though i don't want to give any logic to the Website.
> (still looking forward that anyone gets the FUSE up and running)
The web site should have some logic here. If you use Perlbal in front
then the amount of logic you have to write is vanishingly small. Look
it up, return it. Then configure Perlbal to do reproxying and caching
and you don't really have to worry about anything.
By doing it this way, you address your iteration concern as well,
since presumably your files are stored in MogileFS by the appropriate
filename so looking them up is easy.
You also don't have to worry about nodes going down or becoming
unavailable. It's really just a better design pattern all around, for
both you and your users.
If you -really- insist on doing it the way you're proposing, you will
have to hack on MogileFS to get it to save files as you are
suggesting. I really think it will be more work than just
implementing the "proper" logic in your application.
Mark Smith / xb95
smitty at gmail.com
More information about the mogilefs