<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span class="q"></span>Ok it's making sense to me now! Thanks!
<div> </div>
<div>So basically, a request goes something like this:</div>
<div> </div>
<div>client (<a href="http://www.site.com/1.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.site.com/1.jpg</a>) -> Perlbal -> Apache -> Mogilefsd -> Apache (returns with something like serverA:
1234.fid) -> Perlbal -> client</div>
<div> </div>
<div>Is that correct? If so, wouldn't that lead to more load on the Apache, since it would have to dynamically translate <a href="http://www.site.com/1.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.site.com/1.jpg</a> to something Mogilefsd can understand and find in its database?
</div>
<div> </div>
<div>I'm guessing though, that there's some way for Perlbal to talk directly to Mogilefsd, so that it can completely bypass Apache?</div></blockquote><div><br></div>Initial HTTP request: Client -> Perlbal -> Apache.
<br>Apache says: "Oh, this is something in MogileFS!"<br>Apache connects to MogileFSd and asks about it.<br>MogileFSd returns the path where the item can be found internally.<br>Apache returns: "Reproxy this! Available at $url."
<br>Perlbal then connects to mogstored and gets the item, reproxying it.<br><br>So yes, that's how it goes. It feels like a lot of steps, but it's actually quite fast if caching is working. The longest part will be actually reproxying the file to the user.
<br><br>Also, there are several layers of caching you can use. MogileFSd has path caching you can turn on to reduce load on the database it uses. Perlbal has reproxy caching you can turn which shortens the trip rather extremely, then requests go user -> Perlbal -> mogstored and back.
<br><br>There are diagrams of this process available here:<br><br><a href="http://www.danga.com/words/2005_oscon/oscon-2005.pdf">http://www.danga.com/words/2005_oscon/oscon-2005.pdf</a><br><br>Slide 62 has the internal redirect process and its steps. (Although it doesn't show the mod_perl connecting to MogileFSd, but that's easy to imagine in there.)
<br><br></div><br>-- <br>Mark Smith / xb95<br><a href="mailto:smitty@gmail.com">smitty@gmail.com</a>