{"id":1219,"date":"2021-04-26T22:05:21","date_gmt":"2021-04-26T20:05:21","guid":{"rendered":"https:\/\/devpath.pro\/?p=1219"},"modified":"2021-04-26T22:05:21","modified_gmt":"2021-04-26T20:05:21","slug":"save-yourself-from-a-disaster-6-redundancy-of-dns","status":"publish","type":"post","link":"https:\/\/fabiocicerchia.it\/web\/save-yourself-from-a-disaster-6-redundancy-of-dns","title":{"rendered":"Save yourself from a disaster #6: Redundancy of DNS"},"content":{"rendered":"
This is the sixth part of the series Save yourself from a disaster: Redundancy on a budget<\/a>.<\/p>\n How can we make sure our website is always available and not going down when a node is offline?<\/p>\n We could do mainly 2 things:<\/p>\n <\/p>\n This is not really a practical solution because whenever one server is down the traffic will still be routed to that server, and your customers will be affected. If you have 2 records A pointing to 2 different servers you could potentially lose 50% of your traffic.<\/p>\n In case you need to remove (manually) quickly the unresponsive server, you need to take into account the DNS TTL. If it is set to a high value (like 24h or – even worse – a week) you cannot do anything to change that, other than wait. There are pro and cons<\/a> for setting either a low<\/a> or high<\/a> TTL.<\/p>\n Usually, the DNS propagation time is around 24 hours, but it could also be around 72 hours, this is because ISP can override the TTL you have specified and the time for your changes to propagate can be longer than expected.<\/p>\n By having multiple nameservers you can have a fallback in case your DNS provider is having issues (very unlikely but possible<\/a>).<\/p>\n Generally, you need to maintain manually the records aligned between the two providers. Sometimes the DNS provider will give you the ability to manage those records by pulling the data from your primary provider or by giving you API access so you can do it programmatically.<\/p>\n The RFC 1035 (Domain Names – Implementation And Specification)<\/a>, in fact, proposes to have more than nameserver configured.<\/p>\n First of all, you need to verify that your registrar has got a nice and good DNS management panel. Some services that are offering such functionality are for example FreeDNS<\/a> (premium version ~$5\/year),\u00a0DNSMadeEasy<\/a>, and many more<\/a>. Cloudflare can act as Secondary DNS<\/a> but the setup seems quite long, DNSimple<\/a> has out-of-the-box integration with it (but you cannot use any of the functionality offered by CF – which makes it a bit of a loss).<\/p>\n I went with PremiumDNS<\/a>\u00a0which claims that it “keeps your website running, even when flooded with traffic. It secures the very deepest level of the Domain Name System (DNS), preventing Distributed Denial of Service (DDoS) attacks, and giving you 100% uptime, guaranteed.” You can check the nameservers by running:<\/p>\n Inspecting TTLs<\/strong><\/p>\n PremiumDNS has a TTL on the NS records<\/a> of 30m, so you can be unavailable roughly for that amount of time (only if the ISP is not overriding the TTL<\/a>). Cloudflare has a TTL on the NS records of 6 hours.<\/p>\n When everything goes south, sometimes happens to have issues with DNS, and you know you are going to be affected for too long, the last resort is to change manually the authoritative name servers registered on the domain (you could do that via your registrar) and point them to a fallback DNS (you could set up an offline clone of your records in Cloudflare).<\/p>\n The next post will be about Billing Impact, Stay Tuned.<\/p>\n Check out the whole version of this post in the ebook. This is the sixth part of the series Save yourself from a disaster: Redundancy on a budget. How can we make sure our website is always available and not going down when a node is offline? We could do mainly 2 things: Secondary DNS Manual Switch<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","footnotes":""},"categories":[14],"tags":[122,123,124,125],"aioseo_notices":[],"author_meta":{"display_name":"fabio","author_link":"https:\/\/fabiocicerchia.it\/author\/fabio"},"featured_img":null,"coauthors":[],"tax_additional":{"categories":{"linked":["Web<\/a>"],"unlinked":["Web<\/span>"]},"tags":{"linked":["disaster recovery<\/a>","ovh<\/a>","redundancy<\/a>","sbg2<\/a>"],"unlinked":["disaster recovery<\/span>","ovh<\/span>","redundancy<\/span>","sbg2<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 3 years ago","modified":"Updated 3 years ago"},"absolute_dates":{"created":"Posted on April 26, 2021","modified":"Updated on April 26, 2021"},"absolute_dates_time":{"created":"Posted on April 26, 2021 10:05 pm","modified":"Updated on April 26, 2021 10:05 pm"},"featured_img_caption":"","series_order":"","_links":{"self":[{"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/posts\/1219"}],"collection":[{"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/comments?post=1219"}],"version-history":[{"count":0,"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/posts\/1219\/revisions"}],"wp:attachment":[{"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/media?parent=1219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/categories?post=1219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fabiocicerchia.it\/wp-json\/wp\/v2\/tags?post=1219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\nThis guide won’t cover everything, it won’t be a comprehensive guide, and the steps that are shown need to be carefully reviewed and tested in your development\/pre-production environment. I don’t take any responsibility for any damage, interruption of service nor leak\/loss of data for the use of the instructions in the ebook (nor from any external website I’ve mentioned).<\/small><\/div>\nDNS Round-Robin<\/h2>\n
Secondary DNS<\/strong><\/h2>\n
\nGreat point is that you can buy it even for 3rd party domain<\/a>.<\/p>\ndig +short NS example.com\n<\/pre>\n
Manual Switch<\/h2>\n
\n
\n<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"