Utilising 2 servers?

4 posts / 0 new
Last post
#1 Tue, 06/24/2014 - 07:09
programit

Utilising 2 servers?

Just need a guide in the right direction. After finally solving a major mailing and update issue, which seems to be fixed now, I have ended up with and extra VPS. When I had issues I bought another VPS to setup a blank system and move the domains.

Anyway, the new VDS is bigger, better faster than the old VPS but I was thinking of using the old VPS as a backup or secondary server. Basically I am trying to work out the best way to utilise the 2 servers in the hope that the sites and email etc doesn't go down again. Redundancy ? Backup? The 2 servers are both running Centos 6.5 and virtualmin etc. One is a VPS with 1gig mem and single core the new one is a VDS with 2 gig and dual core. The two servers are from different suppliers, one has 4 ips the other has 3 etc. Different data centres.

Is it possible to have servers split, as in have one just as mailserver and dns and the other with websites and mysql etc. or simply have one as a backup? Or split VMs between the 2 ?

Once I've transfered the remainder of the sites to the new server, then the old one will be completely reset and start again.

I know very little about connecting multiple servers but thats part of learning.

What would be the best direction to go utilise a spare server?

FInally most of what I host is smaller local business sites and community orgs. I have a couple of domains I use for testing Web development stuff. The biggest load is generally emails and database work.

Tue, 06/24/2014 - 08:53
Locutus

Most of your ideas can be implemented, to different levels of complexity. I think you should first decide what you actually wish to do. :)

Your options, which you listed, are:

  • Split services, i.e. put mail on one and other things on the other server.

There is no real "support" for this in Virtualmin though. You need to manually create the virtual servers / users on both machines and configure your templates properly so the DNS records point to the right machine.

  • Backups

You can certainly use one machine to hold backups of the other. You don't even need Virtualmin for that on the backup machine, but you can simply create Linux users and store backups from Virtualmin in their accounts via SFTP.

  • Split virtual servers

Again, you can easily do this by having separate Virtualmin installations on your two VPS. Just create your virtual servers on one or the other.

Truly "connecting" servers, e.g. for automatic fallback if one server fails, is a very complex topic and depends on what you want to do precisely.

There are some services that out of the box support fallback though, e.g. DNS. You can configure one Webmin to be a DNS slave for another Virtualmin. Creation and deletion of zones, and change of zone records, is auto-synced between the two then.

Tue, 06/24/2014 - 22:57
programit

Thanks for your response.
I think I will start by resetting the VPS to a barebones centos 6.5 with virtualmin and that should allow for me to separate sites. I host some small to medium business, some personal and some development.
I would like to run a secondary or slave DNS which is where it could get interesting. One server as main DNS the other as slave for all the sites. At least that would allow vms to be restored on the alternative server in an emergency. (I hope)
Would it be better to keep the same domain name or use different. I registered another site when I got the 2nd server and simply amended 2 to the domain name. The first domain was ABC.com and the second became ABC2.com etc. Would I be better off, having one main domain name (eg ABC.com) and using server1.ABC.com and server2.ABC.com as the host names? Or doesn't it make any difference? (I simply used my primary domain name as the host name in the past)
I assume it is possible to use the DNS off one server to point to the VM on another, I assume you just reference the ip address allocated to the vm.
Do I need the pro version of virtualmin for any of this at this stage. (As money permits I hope to eventually upgrade to pro)

Wed, 06/25/2014 - 05:07
Locutus

Configuring a DNS cluster is rather easy to do with Virtualmin; when the time comes I can give you some help with that if you run into problems. :)

You can easily restore Virtualmin backups to another Virtualmin than that they were taken from, yes, provided they have comparable installations. I often use that method to migrate sites from one virtual machine to another.

As for hostnames, it is recommended to use an "administrative" domain name for your servers, i.e. one that is not immediately under Virtualmin control, and you don't have any virtual servers for it. Then your servers get hostnames like "server1.admindomain.com", "server2.admindomain.com" etc.

You can configure the DNS, where ever it is running, to point to IPs on any of your servers, yes.

You don't need Virtualmin Pro for any of that. Backups, restores, DNS clustering and configuring DNS IPs works fine in the GPL version.

Topic locked