|
|||
|
Dear all,
is there any API or script to make DNS failover working upon WHM? Eg. I have domain abc.com which using Cpanel DNS only for DNS. I have 2 server with same content as www.abc.com (currently I add manual www.abc.com and www1.abc.com). Now, how do I create simple script (combine ping and wget for small txt from other server and compare it). If www is down, then I asked Cpanel DNS to update or create A record for www same with www1, so user does not need type www1.abc.com manually. Sorry for my english, and thank you. |
|
||||
|
In cPanel 11.25, we will be introducing an Edit DNS XML-API function. However, I have no ETA on 11.25.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
|||
|
Why not just use rollover DNS resolution and mirror the accounts?
I would presume you already have the mirroring portion setup if you already have the same content setup on both servers. In that case, all you would need to do is have (2) TWO entries in the DNS 'A' records for the same web address and you'll already have most of what you ask. In example ... Code:
www IN A 127.0.0.1 www IN A 127.0.0.2 IE: instead of "www" on one server and "www1" and the other, you instead make both servers "www" and update the DNS zone files to have both IP addresses with (2) separate "A" records with the same "www" host identifier. Upon DNS resolution, BIND will normally rollover between the two IP addresses at each query and basically but not exactly load balance all you incoming connections between the two servers. If one server is down, the DNS resolution will fail but having both entries delivered will trigger most hosts to try the alternate IP for connectivity. The one thing that would be important though is that the DNS is not handled solely by the downed server. I would instead cluster your DNS between the servers and set both servers as authoritative servers for the domain name in question. You can also update the ZONE templates in Cpanel if you want to have the secondary IP address automatically added at account creation time. If you need to access a specific server, you can either create an alias address such as "www1" or "www2" or just add the IP of the server you need to connect to the "hosts" file on your own local computer. Hope that helps Last edited by Spiral; 06-13-2009 at 02:30 AM. |
|
|||
|
Hello Spiral,
I already setup "failover" like your suggestion, create www and www1 with different IP/location. But what I want to do is: If www (as main webserver) down then I execute some scripts on main DNS server to change IP of www to IP of www1 and spread to slave DNS. Thank you. |
|
|||
|
I would suggest DNS Made Easy it's free and they handle it all. no need for a script or anything. set a 3 min TTL... If server "A" is down it updates ip to server "B". as soon as "A" is back online it changes over to "A" again. It checks the server status every 30-60 seconds i believe. It also allows you input a a file to run on your server and a string to grab.
I'm attaching a screenie of there demo fail over page... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Failover on CPANEL | anasnajj | cPanel Newbies | 1 | 04-23-2009 08:52 AM |
| Failover | Grep_ler | cPanel Newbies | 14 | 02-01-2007 07:51 AM |
| DNS Cluster/ Failover... | Rivaman | cPanel and WHM Discussions | 1 | 09-15-2006 12:24 PM |
| FailOver | youp | cPanel and WHM Discussions | 10 | 11-20-2005 01:31 PM |
| DNS failover / redundancy | cz1179 | cPanel and WHM Discussions | 11 | 02-05-2005 09:25 AM |