Tried and tested method to...
dormando
dormando at rydia.net
Sat Jul 7 19:57:42 UTC 2007
"BEST" totally depends on your application, and your setup :)
There're several example layers which help. Presently gaiaonline.com is
using the memcached approach, but we will be allowing perlbal to cache
paths as well.
The idea is simple:
- Store file into mogilefs.
- On fetch, use a very thin php/perl/whatever layer to check memcached
for available paths first. Then update the paths later.
- You can let perlbal know to cache paths on its own as well. I don't
know the config for this off the top of my head. For very popular images
that can have a significant performance impact.
The downside is as the nodes switch around, files could become
unavailable, or nodes could go missing. For this case you always want to
pass all of the available paths back to perlbal to try to serve to the
client. If one path is unavailable, perlbal will keep trying until it
finds one that works.
It should be possible (either now, or sometime in the near future) to
hook into mogilefs to update your caches for you. I haven't done this
myself yet, but that would be more ideal. Should clear even more hits
off of your trackers.
Also, if you don't care _that_ much, you can pass the no_verify=1 (sorry
if I'm missquoting all these, I'm way too lazy to look it up right now
;) to the tracker get_paths command, which will make the tracker
immediately return the paths. Otherwise the tracker will only return
paths it confirms to be alive after testing, which adds extra load to
the setup.
-Dormando
Ashish Padave wrote:
> Hello,
>
> Could you please tell me what is the BEST method to reduce hits to the
> MogileFS tracker? I have read about using memcached. how does it measure
> up to any other available alternatives.
>
> Thanks
>
> Ashish
More information about the mogilefs
mailing list