<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ah, so that new static content servers don't need to be contacted through the front-end nginx. Thanks, that's a good suggestion. It may have some implications for the Flash "security" model, but most likely nothing that can't easily be worked out.<div><br></div><div>Any thoughts about the FastCGI aspect welcome too!</div><div><br></div><div>Bests</div><div>i</div><div><br></div><div><div><div>On 1 May 2008, at 18:43, Roger Hoover wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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>> 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're building a mainly Flash site which communicates with a PHP gateway via AMF over HTTP to get and set database information. The app'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'll be serving rich ads trafficked via some big portal sites.<br> <br> I'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'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--> &nbsp; &nbsp; &nbsp; &nbsp;(nginx+PHP)<br> <br> Intuitively it seems a bad idea to introduce extra processing, but we haven't done multi-box setups with FastCGI this way before, so I thought I'd check if that or some other approach might be better.<br> <br> I'd be grateful for any opinions!<br><font color="#888888"> Igor<br> <br> </font></blockquote></div><br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Igor Clark • POKE • 10 Redchurch Street • E2 7DD • +44 (0)20 7749 5355 • <a href="http://www.pokelondon.com">www.pokelondon.com</a></div></div></div></div></div></div></div></div></div></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>