On Wed, Aug 25, 2010 at 1:20 PM, Shreyas Agasthya <shreyasbr@xxxxxxxxx>wrote: > I am not sure who the end-users are for your website but if you are > concerned about scalability, I would definitely go for a sub-domain > approach. Assuming you approach a CDN like Akamai and you want to offload > the traffic to come from the cloud, it's lot easier for you to integrate > with them and to maintain. > > The subdirectory approach, whereas, is very cumbersome and takes more work > at your end to paraphrase the whole set-up should the needs change going > forward. > bearing in mind you can take a mix-&-match approach here to avoid insanity. for example on your 'main app' you have a homepage, a user profile page, and a cart page, for conversation sake. again taking blah.com as an example a simple (sane) approach would be blah.com/home blah.com/profile blah.com/cart then imagine you store images on s3, so you have images.blah.com. this is easily incorporated into any of the above urls by simply having image tags with urls of image.blah.com/imageName. no need to have home.blah.com here for example unless the webserver infrastructure was distributed, and even then load balancers could be used to eliminate the call for that. like i was saying youd typically only see this on a big site which operated under an SOA paradigm. take facebook for example, they will have clusters of infrastructure for image management, advertising, search etc. etc. for a simple site sub-directories is the obvious route for a contiguous single application. this really is a question of how large is the site, and what are the load / distribution requirements, IMO. -nathan