views:

32

answers:

0

Currently I use nginx + passenger for serving my rails app. I have been doing some research on reverse proxies and a few names pop up (squid, varnish and nginx mostly).

1 - Now If I am using nginx as my web server can I stil use it as my reverse proxy?

2 - The general sense is that most sites use nginx for proxying static content and apache/mongrel or something like that for dynamic content. If I wanna stick with my nginx, passenger setup, what would my architecture look like when I introduce a reverse proxy? Will it be a separate box or instance of nginx?

3 - What would it look like if I am introducing a load balancer like HAProxy.

4 - Finally, how important are these choices early on? So If I end up regretting a choice (let's say Varnish because it doesn't do well with cookies etc etc), is it easy to switch things around?

Thanks