views:

40

answers:

1

Hello. I have developed an application in PHP + Javascript. I'm using MySQL as database support. Every account for this app will come with a subdomain... so the client Stardust would have stardust.mysite.com. I want to put the application files in a folder outside public_html and link every account from every subdomain created to this files folder through a config file that would stay in each subdomain. Just for specifying the database infos. My questions is: Would I have more server load if I put every customer to access files from the same folder than I would have if I put the files in every subdomain, separately for every client ? Would 500 customers accessing the files in the same time all from one location be the same with 500 customers accessing files separately from its own folder ?

Thank you.

+2  A: 

The operating system will cache files, so having 500 copies means a lot more caching and a lot more disk IO than one copy. You may want to simply have a "master" application that understands subdomains (i.e. user1 is associated with subdomain1) and use apache redirects/etc to send all the requests to the master application/etc.

Kurt