I am having a website in one hosting and i am afraid the server will down anytime coz it seems not stable. One of my friend said i can actually put my website for different nameservers.. something like put ns1 to ns4 or two different serversname but i just couldn't get what they meant..
assuming now i get two hosting to host my website, is that mean i need to put something like ns1.domainA.com, ns2.domainA.com, ns1.domainB.com and ns2.domainB.com ? besides, is it i need to upload my files to both servers from time to time ?
we need to update web applications from time to time and this method seems a bit troublesome.. is there any other method i can use to make sure my website is always even one server is down ? or could you guys please give me an idea how this works ?
thanks.. hope u guys know what i am trying to say..
The nameservers tell the user where the content of your site is located, they don't store the content itself. It's advised to have at least two nameservers at different locations.
You can set up redundant website but if the site is dynamic and eg. uses a database, you'll have to syncronise the content of the two servers from time to time.
So in case that Server A goes down, your visitors will be redirected to Server B.
If Server A does not go down, but only his services do, like the MySQL or the Apache, there would be no redirection, because the DNS service would be up and running.
My advise is to find a proper host, and to host your account on one server. This is in case you are using Linux servers.
If you are using Windows servers, then you can buy mirroring software which will ease your life when synchronizing the content.
The thing is that there are site-mirroring and synchronization software products for Windows which are much easy to use than the ones for Linux (which, unfortunately are very few )
Yes, you will need to update the Database.
If the server(s) on which the web-site is hosted run Linux, this could be done by PHP scripts and Cron Jobs.
A php script will run, and make MySQL dump, which will be send via
FTP to the other server, where another Cron Job will run,
and import the MySQL dump.
This is the automate procedure, but unfortunately I have not seen any scripts which will allow you to do so. This also depends on the server configuration, and mostly on how big the MySQL dump would be.
Another way is the old fashinoed way - to this manually, which will consume time and efforts.