{"id":"domain-name-system","title":"Domain name system","sections":[{"id":"overview","title":"Overview","html":"<p class=\"figure\">\n  <img src=\"/repo/images/IOyLj4i.jpg\" loading=\"lazy\" decoding=\"async\" alt=\"Diagram\">\n  <br>\n  <i><a href=\"http://www.slideshare.net/srikrupa5/dns-security-presentation-issa\" target=\"_blank\" rel=\"noopener noreferrer\">Source: DNS security presentation</a></i>\n</p>\n<p>A Domain Name System (DNS) translates a domain name such as <a href=\"http://www.example.com\" target=\"_blank\" rel=\"noopener noreferrer\">www.example.com</a> to an IP address.</p>\n<p>DNS is hierarchical, with a few authoritative servers at the top level.  Your router or ISP provides information about which DNS server(s) to contact when doing a lookup.  Lower level DNS servers cache mappings, which could become stale due to DNS propagation delays.  DNS results can also be cached by your browser or OS for a certain period of time, determined by the <a href=\"https://en.wikipedia.org/wiki/Time_to_live\" target=\"_blank\" rel=\"noopener noreferrer\">time to live (TTL)</a>.</p>\n<ul>\n<li><strong>NS record (name server)</strong> - Specifies the DNS servers for your domain/subdomain.</li>\n<li><strong>MX record (mail exchange)</strong> - Specifies the mail servers for accepting messages.</li>\n<li><strong>A record (address)</strong> - Points a name to an IP address.</li>\n<li><strong>CNAME (canonical)</strong> - Points a name to another name or <code>CNAME</code> (example.com to <a href=\"http://www.example.com\" target=\"_blank\" rel=\"noopener noreferrer\">www.example.com</a>) or to an <code>A</code> record.</li>\n</ul>\n<p>Services such as <a href=\"https://www.cloudflare.com/dns/\" target=\"_blank\" rel=\"noopener noreferrer\">CloudFlare</a> and <a href=\"https://aws.amazon.com/route53/\" target=\"_blank\" rel=\"noopener noreferrer\">Route 53</a> provide managed DNS services.  Some DNS services can route traffic through various methods:</p>\n<ul>\n<li><a href=\"https://www.jscape.com/blog/load-balancing-algorithms\" target=\"_blank\" rel=\"noopener noreferrer\">Weighted round robin</a>\n<ul>\n<li>Prevent traffic from going to servers under maintenance</li>\n<li>Balance between varying cluster sizes</li>\n<li>A/B testing</li>\n</ul>\n</li>\n<li><a href=\"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-latency.html\" target=\"_blank\" rel=\"noopener noreferrer\">Latency-based</a></li>\n<li><a href=\"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-geo.html\" target=\"_blank\" rel=\"noopener noreferrer\">Geolocation-based</a></li>\n</ul>\n<h3 id=\"disadvantages-dns\">Disadvantage(s): DNS</h3>\n<ul>\n<li>Accessing a DNS server introduces a slight delay, although mitigated by caching described above.</li>\n<li>DNS server management could be complex and is generally managed by <a href=\"http://superuser.com/questions/472695/who-controls-the-dns-servers/472729\" target=\"_blank\" rel=\"noopener noreferrer\">governments, ISPs, and large companies</a>.</li>\n<li>DNS services have recently come under <a href=\"http://dyn.com/blog/dyn-analysis-summary-of-friday-october-21-attack/\" target=\"_blank\" rel=\"noopener noreferrer\">DDoS attack</a>, preventing users from accessing websites such as Twitter without knowing Twitter's IP address(es).</li>\n</ul>\n<h3 id=\"sources-and-further-reading-5\">Source(s) and further reading</h3>\n<ul>\n<li><a href=\"https://technet.microsoft.com/en-us/library/dd197427(v=ws.10).aspx\" target=\"_blank\" rel=\"noopener noreferrer\">DNS architecture</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Domain_Name_System\" target=\"_blank\" rel=\"noopener noreferrer\">Wikipedia</a></li>\n<li><a href=\"https://support.dnsimple.com/categories/dns/\" target=\"_blank\" rel=\"noopener noreferrer\">DNS articles</a></li>\n</ul>","headings":[{"id":"disadvantages-dns","title":"Disadvantage(s): DNS","depth":3},{"id":"sources-and-further-reading-5","title":"Source(s) and further reading","depth":3}]}],"sourceFiles":[]}