Load Distribution between Servers for WebApplication?
I have a website builder running on a linux RHEL3 server (apache2+php+mysql).
My main concern is to give my users to access their sites via subdomains and to separate out my main website server with users server. That's I need a machine on which I could run main website alongwith the "website editor" which lets users create their sites And another machine where there actual website data and stuff like images,files,videos etc reside. So that my customers' site visitors won't be a burden on my primary server.
All virtual hosts would be maintained on that secondary server so that my primary apache could serve only for my main website and not bothering for virtual hosts and other subdomains servings.
In this scenerio the main problem Im facing right now how to effectively communicate b/w these 2servers. I don't know which communication method should I use? I need to get user html pages for editing in editor for which I can use php file_get_contents function to fetch resource from secondary server but how write back on frequent update? Should I just share the secondary server's hardDrive since both servers are connected on a LAN (but I could have more load balancing servers in future) OR should I use php FTP functions to write back? The main thing I also need is that the architecture should be scalable. So that I could place more servers if one users data server gets full. But keeping my communication method as transparent as possible with primary server.
Right now my current website is working fine on a single linux server but Im not sure which method of communication should I choose which is fastest and reliable.
Any suggestions would be appreciated.