View Single Post
Old 3rd April 2010, 08:54
esmiz esmiz is offline
Join Date: Dec 2009
Posts: 44
Thanks: 4
Thanked 3 Times in 3 Posts
Default Multiserver mirror system. Is this a valid way?


First of all, I want to thank jmhoms & till, for such an interesting post.
It's being a great help to understand the multiserver behaviour.

I've being testing 3.02, and just set up a couple of servers: one master, and one slave that mirrors it. I'm using 2 failover ips on the master to hold the domains, websites and mail accounts.
So, I just have to duplicate website contents and databases in the slave, keep them synced, and I can survive a server crash. Well, this is ok, but this way slave does nothing, is just master the one is working, isn't it?

As I was not 100% happy, I forwarded one of the failover ips to the slave server to see if it could handle some work, and this is what happened:

1- In the slave, apache just showed one of the websites of its new ip, but I got it fixed after adding a new vhost by hand with some NameVirtualHost directives.

2- Emails sent to the slave got bounced. This was harder to beat, but after much messing around I saw how..., editing all mysql files in the /etc/postfix folder, and changing server_id = 2, with server_id = 1, solved it.

Apart from these 2 already solved problems, all the rest of the services dns, mysql, ftp, were working without hassle, so this looked like a better solution than having the master doing all the job.

This is the first multiserver I've ever built, and to be honest I was convinced that it was going to fail at any time. I would not be surprised if anything breaks or was already broken. Keep on testing I found out that I can put back the ip failover in the master, or even put both failovers in the slave and everything still works beautifully.

This exactly behaviour is what I've been up to for some time, it cover all my needs, and I'd like to use it as it is, if someone with enough knowledge confirm is harmless.
I don't know how safe or reliable this setup can be, being used in this way, so any answer or comment will be much appreciated.

Reply With Quote