<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&#39;s making sense to me now! Thanks!
<div>&nbsp;</div>
<div>So basically, a request goes something like this:</div>
<div>&nbsp;</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>) -&gt; Perlbal -&gt; Apache -&gt; Mogilefsd -&gt; Apache (returns with something like serverA:
1234.fid) -&gt; Perlbal -&gt; client</div>
<div>&nbsp;</div>
<div>Is that correct?&nbsp; If so, wouldn&#39;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>&nbsp;</div>


<div>I&#39;m guessing though, that there&#39;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 -&gt; Perlbal -&gt; Apache.
<br>Apache says: &quot;Oh, this is something in MogileFS!&quot;<br>Apache connects to MogileFSd and asks about it.<br>MogileFSd returns the path where the item can be found internally.<br>Apache returns: &quot;Reproxy this!&nbsp; Available at $url.&quot;
<br>Perlbal then connects to mogstored and gets the item, reproxying it.<br><br>So yes, that&#39;s how it goes.&nbsp; It feels like a lot of steps, but it&#39;s actually quite fast if caching is working.&nbsp; The longest part will be actually reproxying the file to the user.
<br><br>Also, there are several layers of caching you can use.&nbsp; MogileFSd has path caching you can turn on to reduce load on the database it uses.&nbsp; Perlbal has reproxy caching you can turn which shortens the trip rather extremely, then requests go user -&gt; Perlbal -&gt; 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.&nbsp; (Although it doesn&#39;t show the mod_perl connecting to MogileFSd, but that&#39;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>