You might consider hosting your static content on a separate subdomain.&nbsp; If you have enough hardware, you can have dedicated nginx boxes just for the images + swfs.<br><br><div class="gmail_quote">On Thu, May 1, 2008 at 7:28 AM, Igor Clark &lt;<a href="mailto:igor@pokelondon.com">igor@pokelondon.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi there,<br>
<br>
We&#39;re building a mainly Flash site which communicates with a PHP gateway via AMF over HTTP to get and set database information. The app&#39;s requests will be something like 50% flat files, and the other 50% will be PHP. At the beginning of the project we expect a lot of SWF requests as we&#39;ll be serving rich ads trafficked via some big portal sites.<br>

<br>
I&#39;m planning an nginx front-end which serves flat content and passes PHP requests to a PHP app server(s) on a local network over FastCGI. The database will reside on a separate host. The idea is obviously that if the app server struggles we can add more, and possibly extra nginx servers to help take the load of image/SWF serving if necessary.<br>

<br>
In the past, I&#39;ve only done this with nginx and PHP residing on the same host.<br>
<br>
Is FastCGI good to do this without introducing problems, or should I do something like:<br>
<br>
nginx &nbsp; &lt;--HTTP reverse proxy--&gt; &nbsp; &nbsp; &nbsp; &nbsp;(nginx+PHP)<br>
<br>
Intuitively it seems a bad idea to introduce extra processing, but we haven&#39;t done multi-box setups with FastCGI this way before, so I thought I&#39;d check if that or some other approach might be better.<br>
<br>
I&#39;d be grateful for any opinions!<br><font color="#888888">
Igor<br>
<br>
</font></blockquote></div><br>