4 ms·
Since the Amazon outage, I've been wondering about the best way to quickly switch to another host. Having multiple A records is so obvious I can't believe I hav
by yesbabyyes 16y ago
Since the Amazon outage, I've been wondering about the best way to quickly switch to another host. Having multiple A records is so obvious I can't believe I have neither thought about it nor heard of it before (I've seen it implemented, but never thought about as a failover). I didn't know the browser would switch to the next IP. Interesting!
That said, can you control which host the browser will try first? I.e. can I have 1.1.1.1 as my main host and trust that all clients will connect to that as long as it's up, and only connecting to my backup 2.2.2.2 when 1.1.1.1 doesn't respond?
- mrcalzone 16y agoI have been wondering about the same thing. Sadly, the article says: >but returning multiple A records diminishes any possibility of deterministic site selection.
- yesbabyyes 16y agoThanks mrcalzone, somehow I missed that piece of info. Too bad, that would have been super elegant.
- mike_esspe 16y agoI tried it, you can't control it, because some client's dns randomize such records.
- justincormack 16y agoIt should work though if you use elastic IPs across different AZs in Amazon, or if you use geo ip and always send one IP for a different region that is close. Not clear if it is the best solution for Amazon though.
- yesbabyyes 16y agoThanks Justin - ideally, I'd like a setup with colocated servers and a cheaper virtualized backup at another provider. I've studied Learnboost's article about leaning on MongoDB's replication, I might reach out to them since I have a similar setup in mind, albeit on with a Redis backend.
- prakash 16y agoSince the Amazon outage, I've been wondering about the best way to quickly switch to another host. This is exact problem we (Cedexis) solve. Assume your site is www.website.com, in general points to an A record or a CNAME to a datacenter/ cloud/ CDN. We add an intermediate hostname, low TTL (20 seconds), global anycast network, which can be scripted (write your load-balancing logic in php) to handout a CNAME (one of many) based on performance (RTT), load, cost, anything else you can think of, etc. Re.: AWS's recent outage, assuming you are running your apps in multiple zones/ regions/ clouds, we would have noticed the latency and automatically routed away to a different zone/ region/ cloud. We collect hundreds of millions of performance measurements daily: http://gigaom.com/cloud/heres-what-amazon-outage-looked-like/ http://gigaom.com/cloud/heres-what-amazon-outage-looked-like... Drop an email and I am happy to explain more and setup folks from HN with a free account: prakash at cedexis.com
- yesbabyyes 16y agoThanks Prakash, I'll definitely check your offering and reach out when we have the need! It sounds cool even though I can't help but feel I would like really tight control over that part - basically we would be dependant on your service instead.