0

So I have searched but I seem to only find information on setting up EE in the config.php for multiple server environments - local, staging, production. What Im looking to get some information on is adding a new server to my already existing setup.

I have added another server, copied over my EE install and put that up on the site. The new servers ip loads up the site minus any dynamic data.

Question: Can I use one EE install and MySql database to run the site on two servers?

Example:

Server 1 = MySql, EE, site

Server 2 = remote into server 1, connect to MySql, use server 1 EE, show site

Hopefully this makes sense, but I dont see a reason to install EE twice. I also dont see a reason to have another DB setup which would require replication of data.

  • 1
    So do you want two front end servers serving the exact same website? Or two completely separate websites? – Adrian Macneil Mar 6 '13 at 2:55
  • Im looking for a two front end servers setup. – JMP Mar 6 '13 at 20:14
1

You don't provide too much information but yes you can assuming that you have configured your database server to allow remote connections from your other server. I'm assuming these servers are both located with the same host or you may hit some serious latency issues.

The ideal setup though in this situation rather than maintaining duplicate copies of ExpressionEngine on two servers (which you could maintain via rsync) would be to mount an NFS volume on Server 2 (so create an export on Server 1).

If you want to show your site on both servers you are also going to need a load balancer sitting in front of them both.

| improve this answer | |
  • I do have a load balancer sitting in front (forgot to mention that). So you are correct in the fact that I dont want to be maintaining duplicate copies of EE on the servers. I will look into mounting but if you have any more information that would be greatly appreciated. – JMP Mar 6 '13 at 20:15
  • Sounds good. Assuming that you wish to keep your files on server 1 together with your database then you would export your html (or appropriate) directory and then mount this directory on server 2 though the use of NFS. Then server 2 acts as a simple 'webhead'. Here are some links to get you started as it's not trivial: hunterford.me/amazon-ec2-and-nfs & mshanm.wordpress.com/2010/09/10/…. Of course the big downside of this is that you still have a single point of failure with Server 1, – Gareth Davies Mar 6 '13 at 23:38
  • You could also play around with Gluster which would keep both your server's file systems in synch gluster.org – Gareth Davies Mar 6 '13 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.