On May 12, 2006, at 10:53 AM, Brian H. wrote:
Views). So placing them in physically separate machines really
Anyone has done this or is it just not possible?
Actually rails works very well with the three tiered approach.
Capistrano has the concept of web, app and db servers. THe way this
breaks down if you wanted to seperate the three tiers on three
machines is thus:
web: this is a static asset server, like lighty or apache it serves
only the static content.
app: this is your rails app itself, running in fcgi’s or mongrels
proxied behind the web server on web
db: well this one is easy, its just a separate server with a database
server running on it.
Now that way to ty all of these together and still be able to use
page caching within rails is to share the public directory via NFS or
some similar network file system. This way the web front server
serves all static requests, including rails page caches. And the
rails app server has access to the public dir to write out the cached
html pages or image uploads.
This gives you the separation of all three tiers like you wanted.
ANd capistrano makes it easy to adhere to a division of labor like
this. The weakest point in the whole thing is the NFS. But you can
get around this with nice SAN solutions or things like mogilefs.