: Site on 2 hosts is there a way yo add 2 hosts per domain so if i host dies it automatically switches to the other one? or if its slow you can easily switch to the second host? Thanks!
is there a way yo add 2 hosts per domain so if i host dies it automatically switches to the other one?
or if its slow you can easily switch to the second host?
Thanks!
More posts by @Deb1703797
1 Comments
Sorted by latest first Latest Oldest Best
Yes there are ways to do this but it's a fairly big topic with several different approaches.
The cheapest and simplest way to do this is with DNS. A DNS server gives the ip address of your domain when queried, you have some monitoring that detects when one of your hosts is down and tells the name server to stop giving out the ip of the broken server. normally DNS results are cached often for a day, so you need to the name server to say the record is only valid for a short time, however some isp's will ignore this and cache the record anyway. DNS was no really designed for this and it's not considered a good solution for large sites.
If your site relies on a database you need to make sure this is kept up to date on both servers or kept on a separate server. You can do master/slave database replication if the database is busy and important.
The other switching solutions are much more expensive. You can have two load balancers which distributes to several web servers, a heartbeat system monitors load balancers and the spare takes over the ip should the first fail. You can use BGP to change network routes if a server fails. You can have one ip address in several locations called multihoming.
As I said a big topic but for a small site DNS fail over is best. There are companies offering this as a service but if you have the TTL of your DNS records set low, say one hour then you may be able to change manually, this will be good enough in a lot of cases.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.