let's say that i have a site that is on "hosting 1" and i have 2 nameservers (NS1 & NS2) set from that hosting. Can i buy another hosting somewhere completely else, let's name it "hosting 2" and can i put 2 namservers (NS3 & NS4) from that hosting in case that the first hosting fails......will that work? of course that i would be running a mirror site on the hosting 2, only thing is that if i have a mysql database i would have to do backup and reupload it on hosting 2 daily, right? or is there an easier way? sorry if this is all wrong, i'm not well informed when it comes to server management..... Regards
You need a kind of DB replication for MySQL, register all NSes at your registrar and make Multiple A Record for your server. Replication is a bottleneck if your database is changing frequently
It does not work like that. you need to setup a HA cluster. Google for "High Available Linux" for more information
If you can figure out how to keep the files and database in sync, you can do a simple DNS failover setup. Basically you have 2 identical servers, on different networks. You use a 3rd party DNS service, DNS made easy is one that offers this feature - http://www.dnsmadeeasy.com/s0306/prod/dnsfo.html. You then set a very short TTL on the DNS, and if your primary server goes down, the DNS automatically switches to the other server. If there is an existing visitor on the server when your site goes down, there's not much you can do, but new visitors will get served the DNS of the server that is still up. It's not as effective, but way cheaper and easier than clustering, load balancing or other advanced redundancy setup's.