<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged dns</title>
<link>https://coderlegion.com/tag/dns</link>
<description>Powered by Question2Answer</description>
<item>
<title>Drill the Safe Open: How IANA's 2020 Root Key Ceremony Ran Four Days Late</title>
<link>https://coderlegion.com/32572/drill-the-safe-open-how-ianas-2020-root-key-ceremony-ran-four-days-late</link>
<description>&lt;p&gt;&lt;em&gt;In February 2020 the safe holding the internet's root signing key would not open. IANA's published, hand-initialed ceremony scans show the custody behind the cryptography: a repair script written before anyone drilled, and a signing that took four minutes and fifteen seconds.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Page 6 of the script is a table with four columns: Step, Activity, Initials, Time. In step 5 a locksmith replaces a combination lock, and the first task on the list reads &quot;a) Drill the lock/safe open.&quot; Beside it, in blue pen, someone has initialed the box and written a time: 21:48+1.&lt;/p&gt;
&lt;p&gt;The safe is Equipment Safe #1 in the Key Management Facility that IANA runs in El Segundo, California. It holds the hardware security modules that keep the private half of the root zone's key-signing key, the trust anchor that validating resolvers chain every signed DNS answer back to. In February 2020 it would not open. IANA publishes the paperwork from its key ceremonies, scanned with the handwriting left in, so the story of how it got into its own safe can be read page by page, initials and all.&lt;/p&gt;
&lt;p&gt;Most writing about the root key ceremony is about cryptography. The paperwork is mostly about custody: who held what, who watched, and what got written down when something went wrong. That February the cryptography took four minutes and fifteen seconds. Getting into the safe took most of four days.&lt;/p&gt;
&lt;h3 id=&quot;how-a-ceremony-runs&quot;&gt;How a ceremony runs&lt;/h3&gt;
&lt;p&gt;The root zone is signed in quarters, and the key-signing key is brought out of its safe four times a year to sign the keys for the next one. The rule in force in 2020, in IANA's DNSSEC Practice Statement, was that each quarter's ceremony is held &quot;approximately 60 days but no later than 33 days, before the time cycle commences.&quot;&lt;/p&gt;
&lt;p&gt;The people are set out in roles. A Ceremony Administrator runs the script and an Internal Witness keeps the record. Safe Security Controllers hold the combinations, two people for each of the two safes: the Equipment Safe with the hardware, and the Credentials Safe with the safe deposit boxes. Crypto Officers hold the keys to those boxes. The Practice Statement describes &quot;successive barriers in three tiers, requiring at least seven trusted persons from four different roles,&quot; and activating a hardware module &quot;requires three out of seven Crypto Officers to extract activation material from above safe deposit boxes using their physical key.&quot; The Crypto Officers are Trusted Community Representatives, picked from statements of interest that IANA solicits from the internet community, and its roster page states the rule that keeps them independent: &quot;Persons considered directly affiliated with PTI, ICANN or VeriSign may not become a Trusted Community Representatives.&quot;&lt;/p&gt;
&lt;p&gt;The script's preamble says how the room behaves. &quot;CA reads each step aloud prior to its performance.&quot; &quot;Upon completion of each step, IW announces the time of completion, records the completion time, and initials their copy of the script.&quot; And then the paragraph the rest of this story runs on:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Ceremony participants who notice a problem or an error during the ceremony should interrupt the ceremony. Ceremony participants agree on a resolution before proceeding ... Unplanned events (exceptions) during the ceremony are evaluated, documented, and acted upon. It is the CA's sole responsibility to decide on proper actions after consulting with the IW. In either case, an exception is regarded as an incident, and incident handling procedures are enacted.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&quot;Documented&quot; has a form. The Root DNSSEC Script Exception is a one-page sheet. Its first row asks for the Act, the Step, the Page, and the date and time, and its second says &quot;IW describes the exception(s) and action(s) below,&quot; with a box for initials and a box for the time on each row. An exception is filed against a place in the script, the way a bug is filed against a line of code.&lt;/p&gt;
&lt;h3 id=&quot;the-day-the-dial-was-due-for-replacement&quot;&gt;The day the dial was due for replacement&lt;/h3&gt;
&lt;p&gt;The trouble surfaced during maintenance, and the maintenance was itself a ceremony with its own script. Administrative ceremonies are smaller affairs, with no signing, but the same rules apply: a Ceremony Administrator, an Internal Witness, cameras, and a participants table. In that week's tables the participants included a locksmith from an outside lock-and-security company.&lt;/p&gt;
&lt;p&gt;The work was to replace the combination dials on both safes, swapping each Kaba Mas X-09 for a new X-10. The day before, at a ceremony to program the safe deposit boxes' lock assemblies, one assembly had misbehaved. That got a sheet too:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;The last KMF West Lock Assembly was malfunctioning, and we delayed the bagging of the unit to allow more time for the locksmith to troubleshoot. Once the lock assembly was functioning, we placed it in TEB BB91951419 and continued where we left off in the script.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;TEB is a tamper-evident bag, and the bag's serial number goes in the record.&lt;/p&gt;
&lt;p&gt;The script for the Equipment Safe, dated Tuesday 11 February, has an Act 2 called &quot;Safe #1 Equipment Maintenance.&quot; Step 1, initialed at 21:34, has the administrator and the witness carry &quot;a flashlight, phillips screwdriver, change key tool&quot; into the safe room. Step 2 reads &quot;SSC1_A opens Safe #1 while shielding the combination from the camera,&quot; with a note that the controller &quot;will begin by rapidly spinning the dial counter-clockwise in order to charge it.&quot; The lock powers itself from the dial. Step 4 is the job they had come to do: &quot;a) Remove the current Kaba Mas X-09. b) Install a new Kaba Mas X-10.&quot;&lt;/p&gt;
&lt;p&gt;Step 2 has no initials. The exception sheet behind it is filed against Act 2, Step 2, Page 6, dated 2020/02/11 and initialed at 23:14:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;SSC1_A was unable to open the safe due to malfunctioning hardware. Escorted out by IW2 to verify combination with other SSC. Locksmith contacted manufacturer and they suggested the issue was a faulty logic board and the dial will require drilling. Ended ceremony to discuss steps going forward.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So the dial that failed was the one they had come to replace, and it failed at the one step that needed it to work. A second ceremony a couple of hours later opened the Credentials Safe without trouble and swapped its X-09 for an X-10.&lt;/p&gt;
&lt;p&gt;The next day ICANN's blog announced that the 40th ceremony, &quot;originally scheduled for 12 February 2020 in El Segundo, California, has been postponed.&quot; &quot;One of the security mechanisms that protects the contents of the secure safes was found to be malfunctioning.&quot; &quot;The issue was identified yesterday, 11 February 2020, during routine maintenance of the Key Management Facility.&quot; The post said there would be &quot;no interruption to Domain Name System Security Extensions (DNSSEC) service,&quot; that &quot;We maintain a complete replica facility in Culpeper, Virginia,&quot; and that the repair was scheduled for Friday the 14th.&lt;/p&gt;
&lt;h3 id=&quot;the-branch-was-written-before-anyone-drilled&quot;&gt;The branch was written before anyone drilled&lt;/h3&gt;
&lt;p&gt;The 11 February script had no step for a safe that would not open. Step 2 simply assumed it would. When it failed, nobody improvised the repair in the room. They filed the sheet, ended the ceremony, and wrote a new script.&lt;/p&gt;
&lt;p&gt;The repair ceremony began on the 14th, and its Act 2 opens with a section titled &quot;Confirmation of Equipment Safe #1 Dial Malfunction.&quot; Before anyone was allowed to drill, the controller tried the safe again, under the cameras, at 17:26. The step carries a note that &quot;Locksmith may provide additional advice/techniques to attempt to operate the safe dial.&quot; Then the script splits:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;If the safe opens: Complete the safe log by following the steps below ...&lt;/p&gt;
&lt;p&gt;If the lock malfunctions: Continue with the steps below.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the safe had opened on that attempt, the script would have sent everyone to the safe log and the dial swap, and there would have been no drilling. It didn't open. Step 5 begins &quot;The locksmith performs the following tasks to replace the combination lock,&quot; and lists them: &quot;a) Drill the lock/safe open,&quot; &quot;b) Remove the current Kaba Mas X-09 Safe Dial,&quot; &quot;c) Return the safe door to a secure state by performing necessary repairs,&quot; &quot;d) Install a new Kaba Mas X-10 Safe Dial.&quot; Under the first task sits a note about breaks: &quot;A ceremony break will be performed as required. All personnel will be escorted out of the Tier 5 (Safe Room) and Tier 4 (Ceremony Room.)&quot; Each lettered task has its own box for initials and time.&lt;/p&gt;
&lt;p&gt;Drilling into the safe that guards the root key was written down in advance as a numbered, witnessed, timed step, with a branch for the possibility that it wasn't needed.&lt;/p&gt;
&lt;h3 id=&quot;what-the-sheets-caught&quot;&gt;What the sheets caught&lt;/h3&gt;
&lt;p&gt;The repair took two days, and the packet of exception sheets behind its script reads like a log of everything the plan didn't specify. I read four of them, all filed against Act 2, Step 5, Page 6. I didn't read every page of the packet, so four is a floor.&lt;/p&gt;
&lt;p&gt;The first, dated the 14th at 21:00, records that an external witness &quot;left the room on a break and stayed outside until the next break,&quot; returning at 22:19, and adds: &quot;Due to the length of the ceremony carrying into the next day, other non essential participants came and went as well.&quot; The second is one sentence: &quot;Ceremony was paused overnight and resumed in the morning.&quot;&lt;/p&gt;
&lt;p&gt;The third, at 19:26 on the 15th, is about the building. A security guard used the hand scanner outside Tier 3 to escort an external witness in, and that triggered the alarm. The witness was asked to step out and wait in the conference room, &quot;and the alarm was triggered again when he manually opened the door.&quot;&lt;/p&gt;
&lt;p&gt;The fourth is about the order of steps:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Steps e, f, g, and h were performed immediately after opening the safe for the first time which occurred between steps a and b.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Steps e to h are the safe log: the controller shows the old log to the camera, takes the pre-printed one from the witness, writes the time and signs where it says &quot;Open Safe,&quot; and the witness checks and initials the entry. The script had them after the new dial went on. In the room, they did them the moment the drilled door first opened, and the times in the script's own columns agree: a at 21:48, e to h at 21:54, the new dial at 23:56. Doing the log first was arguably the better order, since it put the opening on paper at once. Nobody rewrote the script to match. The deviation went on its own sheet, and the record shows the steps in the order they happened.&lt;/p&gt;
&lt;p&gt;The times in that column all carry a &quot;+1,&quot; which the script never defines. I read it as the day after the ceremony began, which puts the drilling at 21:48 UTC on the 15th. Three other records agree with that reading: the overnight sheet is dated the 15th at 00:38, IANA's announcement that the safe was open went out at 22:10 UTC on the 15th, and the participants signed the ceremony off at 00:44 on the 16th. The discovery sheet was initialed at 23:14 on the 11th, so the drilling step was initialed 3 days, 22 hours and 34 minutes after it.&lt;/p&gt;
&lt;p&gt;IANA's message to the root-dnssec-announce list read: &quot;We have successfully opened the safe with the failed mechanism, and are in the final stages of remediation, with the repair work and installation of a new lock underway. We are therefore arranging resources to start the KSK Ceremony 40 at 0000 UTC, or shortly thereafter.&quot;&lt;/p&gt;
&lt;h3 id=&quot;four-minutes-and-fifteen-seconds&quot;&gt;Four minutes and fifteen seconds&lt;/h3&gt;
&lt;p&gt;The signing went the way the script said it would. The signer's log for Ceremony 40 opens with &quot;Starting: ksrsigner /media/KSR/KSK40/ksr-root-2020-q2-0.xml (at Sun Feb 16 02:21:33 2020 UTC).&quot; Twenty-two seconds later the hardware module is activated. At 02:25:48 the log reads &quot;Generated new SKR,&quot; a signed key response whose first signature period begins on 1 April 2020, made with the key whose tag is 20326. The log prints the response's SHA-256 hash in hex, and then again as a run of English words: &quot;unwind leprosy fracture savagery tactics speculate Neptune miracle slingshot aftermath …&quot;&lt;/p&gt;
&lt;p&gt;From start to signed response is four minutes and fifteen seconds. Against the Practice Statement's rule, the latest date for the second-quarter ceremony was 28 February, so the signing finished with nearly twelve days to spare.&lt;/p&gt;
&lt;p&gt;The ceremony's closing act has the administrator read every exception out before anyone signs. Step 1 of the participants' signing reads &quot;CA reads all exceptions that occurred during the ceremony.&quot; In step 2 each attendee comes to the table and signs the witness's list, and &quot;All signatures declare that this script is a true and accurate record of the ceremony.&quot; The read-back comes first. You hear what went wrong before you put your name to the record.&lt;/p&gt;
&lt;h3 id=&quot;april-nobody-could-come&quot;&gt;April: nobody could come&lt;/h3&gt;
&lt;p&gt;Two months later the failure was the people. Ceremony 41 was set for 23 April 2020, in the first weeks of the pandemic. IANA's published questions-and-answers document says there were no representatives for the El Segundo facility &quot;located close enough to allow unrestricted and safe travel to the facility,&quot; and says where they were: &quot;Mauritius, Spain, Russia, Tanzania, Uruguay and east-coast United States.&quot;&lt;/p&gt;
&lt;p&gt;The plan IANA used kept the custody chain and moved the people. &quot;Four trusted community representatives (TCRs) who fulfil Cryptographic Officer roles in the ceremony have transmitted their safe deposit keys to separate ICANN and PTI staff. These staff will act as surrogates, but the TCRs will participate in the ceremony remotely and monitor their credential's use.&quot; The keys travelled sealed: &quot;The TCRs have wrapped their deposit keys with opaque material, and then transmitted them in tamper-evident bags. This bag will not be opened until within the ceremony so that each TCR can witness their key is in the same condition as when they released it.&quot; The ceremony would sign three quarters at once instead of one, and &quot;The additional generated signatures will be initially withheld.&quot;&lt;/p&gt;
&lt;p&gt;The plan they didn't use is in the same document. &quot;The first version of our contingency plan assumed the trusted community representatives would not transmit their safe deposit box keys for performance of the ceremony. In such a scenario, a trained locksmith would drill and replace the locks to three safe deposit boxes during the ceremony in order to retrieve the smart cards needed to activate the hardware security module.&quot; Two months after the safe, the first version of the fallback was to drill again.&lt;/p&gt;
&lt;p&gt;One part of the April plan broke the rules as they stood, and the document says which: &quot;The only element of our revised approach that was inconsistent with the DPS was signing additional quarters of KSRs during the ceremony. The Policy Management Authority, an internal committee that reviews changes to the DPS, convened on 6 April and approved revisions that allow for signing additional quarters of KSRs as a disaster recovery response.&quot; The rule was changed by its owner seventeen days before it was needed, and not by the people in the room on the day.&lt;/p&gt;
&lt;p&gt;The Ceremony 41 script also adds a step to its closing act. After reading the exceptions, the administrator &quot;asks any COs who are participating remotely if they have any concerns pertaining to the ceremony or exceptions which may have occurred.&quot;&lt;/p&gt;
&lt;p&gt;By November the bend was standing policy. The Practice Statement in force in February 2020, the fourth edition, has no variance clause. The sixth edition, dated 4 November 2020, carries section 4.5.4.1, and the eighth edition of 2025 still carries it word for word:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;In the event of a declaration of a disaster recovery or business continuity response, the adverse event may necessitate variances to the procedural controls and technical security controls. These variances shall be limited in scope to those necessary for the successful conduct of key signing operations, and according to protocols that best ensures a proper record of the chain-of-custody and limiting sensitive operations to trusted persons.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The clause ends by requiring that variances are &quot;consented by the RZ KSK Operator's management, are documented and communicated.&quot; I didn't read the fifth edition, so I can't say which edition first carried it, only that it arrived between February and November 2020.&lt;/p&gt;
&lt;h3 id=&quot;the-record-since&quot;&gt;The record since&lt;/h3&gt;
&lt;p&gt;IANA's schedule lists 63 held ceremonies from June 2010 to August 2026, counting Ceremony 53's two parts separately. In 2020 and 2021 there were two each, the only full years with fewer than four. Ceremonies 41 and 42 are the only ones that signed more than one quarter, and the 294 days between them is the longest gap in the schedule.&lt;/p&gt;
&lt;p&gt;The public archive runs to 65 directories and 940 files, among them 315 video files from the ceremony cameras. Files from administrative ceremonies first appear in the directory for Ceremony 40, the safe repair, and turn up again in 15 later directories. I didn't read what those later administrative ceremonies were for. Everything here comes from IANA's and ICANN's own record. That is the point of reading it, and also its limit, because an outside auditor's view isn't quoted here.&lt;/p&gt;
&lt;h3 id=&quot;what-carries-over&quot;&gt;What carries over&lt;/h3&gt;
&lt;p&gt;None of this is exotic. It is a procedure that expects to be interrupted, and a record that treats the interruption as a first-class entry. Anyone running software that acts where actions can't be taken back, a deployment pipeline or an agent holding production credentials, can copy four habits from it.&lt;/p&gt;
&lt;p&gt;An exception there is a typed record: act, step, page, time, initials, and a description written by the witness rather than the actor. When the script doesn't cover a failure, the response in that room was to stop and write a new script, with a branch for each outcome, before taking the irreversible step. When steps happen out of order, the record says so instead of being tidied. And when a rule has to bend, its owner bends it in advance, in writing, and later turns the bend into a clause with limits.&lt;/p&gt;
&lt;p&gt;At the back of the Ceremony 40 script is a page for the Internal Witness alone. It is two sentences long: &quot;I hereby attest that the Key Ceremony was conducted in accordance to this script. Any exceptions that occurred were accurately and properly documented.&quot;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IANA, &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.iana.org/dnssec/ceremonies&quot;&gt;Key Signing Ceremonies&lt;/a&gt;, the schedule of held and planned ceremonies (as fetched 7 October 2026).&lt;/li&gt;
&lt;li&gt;IANA, &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/&quot;&gt;ceremony archive&lt;/a&gt;, 65 directories of scripts, logs and video.&lt;/li&gt;
&lt;li&gt;IANA, Ceremony 40 administrative scripts, annotated scans: &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/40/20200210-AC40_1-Ceremony_Script_Annotated.pdf&quot;&gt;AC40_1, 10 February 2020&lt;/a&gt; (lock assembly exception, page 7); &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/40/20200211_1-AC40_2-Ceremony_Script_Annotated.pdf&quot;&gt;AC40_2, 11 February 2020&lt;/a&gt; (Act 2 and the discovery exception); &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/40/20200211_2-AC40_3-Ceremony_Script_Annotated.pdf&quot;&gt;AC40_3, 11 February 2020&lt;/a&gt; (the Credentials Safe); &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/40/20200214-AC40_4-Ceremony_Script_Annotated.pdf&quot;&gt;AC40_4, 14 to 16 February 2020&lt;/a&gt; (the drilling, script page 6, and the exception sheets).&lt;/li&gt;
&lt;li&gt;IANA, &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/40/20200212-KC40_Ceremony_Script.pdf&quot;&gt;Ceremony 40 script&lt;/a&gt; (preamble, closing act, Appendix C) and &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/40/ksrsigner-20200216-022133.log&quot;&gt;signer log&lt;/a&gt;, 16 February 2020.&lt;/li&gt;
&lt;li&gt;Kim Davies, &quot;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.icann.org/en/blogs/details/root-key-signing-key-ceremony-postponed-12-2-2020-en&quot;&gt;Root Key Signing Key Ceremony Postponed&lt;/a&gt;,&quot; ICANN blog, 12 February 2020.&lt;/li&gt;
&lt;li&gt;Kim Davies, &quot;[Root KSK Ceremony 40 scheduled for 0000 UTC](&lt;a rel=&quot;nofollow&quot; href=&quot;https://lists.icann.org/hyperkitty/list/*Emails&quot;&gt;https://lists.icann.org/hyperkitty/list/*Emails&lt;/a&gt; are not allowed*/message/Z7KNDGDKD5PNZJ52XHP5Y4W3GIYM23H3/),&quot; root-dnssec-announce, 15 February 2020.&lt;/li&gt;
&lt;li&gt;IANA, &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/41/KC41_qa.pdf&quot;&gt;Questions and Answers on COVID-19 mitigations for KSK Ceremony 41&lt;/a&gt;, and the &lt;a rel=&quot;nofollow&quot; href=&quot;https://data.iana.org/ksk-ceremony/41/KC41_Script.pdf&quot;&gt;Ceremony 41 script&lt;/a&gt;, April 2020.&lt;/li&gt;
&lt;li&gt;DNSSEC Practice Statement for the Root Zone KSK Operator: 4th edition, 1 October 2016, as published at iana.org/dnssec/icann-dps.txt in February 2020 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://web.archive.org/web/20200216072548/https://www.iana.org/dnssec/icann-dps.txt&quot;&gt;Wayback Machine capture, 16 February 2020&lt;/a&gt;), sections 4.2.2 and 6.6; &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.iana.org/dnssec/procedures/ksk-operator/ksk-dps-20201104.html&quot;&gt;6th edition, 4 November 2020&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.iana.org/dnssec/procedures/ksk-operator/ksk-dps-20250414.html&quot;&gt;8th edition, 14 April 2025&lt;/a&gt;, sections 4.2.2 and 4.5.4.1.&lt;/li&gt;
&lt;li&gt;IANA, &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.iana.org/dnssec/tcrs&quot;&gt;Trusted Community Representatives&lt;/a&gt; (as fetched 7 October 2026).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;How this was checked. Typed quotations were checked word for word against the saved text of the source named beside them. The handwritten ones were transcribed from the scanned pages of the annotated scripts and checked against the images; the scans have no text layer. Times are UTC, as the scripts record them, and the &quot;+1&quot; day is read as explained in the text. The intervals (3 days, 22 hours and 34 minutes; 4 minutes and 15 seconds; the margin before 28 February) and the counts from the schedule and the archive listings were computed by script from those sources. Four exception sheets is the number read in the repair ceremony's packet, not a total for the month.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Related on our blog: &lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/blog/replit-ai-agent-deleted-production-database-during-code-freeze/&quot;&gt;Replit's AI Agent Deleted a Production Database During a Code Freeze&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/blog/aviation-confessed-121128-times-last-year/&quot;&gt;Aviation Confessed 121,128 Times Last Year&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Originally published at &lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/blog/iana-root-key-ceremony-2020-drill-the-safe-open/&quot;&gt;vibeagentmaking.com&lt;/a&gt;.&lt;/em&gt; If you want a tamper-evident, dated record of what an automated system did and what went off-script: &lt;code&gt;pip install chain-of-consciousness&lt;/code&gt; or &lt;code&gt;npm install chain-of-consciousness&lt;/code&gt;, or try &lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/hosted-coc/&quot;&gt;Hosted Chain of Consciousness&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Security</category>
<guid isPermaLink="true">https://coderlegion.com/32572/drill-the-safe-open-how-ianas-2020-root-key-ceremony-ran-four-days-late</guid>
<pubDate>Mon, 26 Oct 2026 15:36:01 +0000</pubDate>
</item>
<item>
<title>How to get alerted when someone changes your DNS records</title>
<link>https://coderlegion.com/31079/how-to-get-alerted-when-someone-changes-your-dns-records</link>
<description>&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;TL;DR.&lt;/strong&gt; Most DNS changes do not take your site down. A new MX record or an edited SPF record usually still resolves, so your uptime checks stay green. To catch these changes, list every record a name should have. Then get an alert when the live answer is different in any way. The &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/blog/monitor-dns-record-changes?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline&quot;&gt;original post&lt;/a&gt; has the same text with a short FAQ at the end.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;a-dns-change-does-not-look-like-an-outage&quot;&gt;A DNS change does not look like an outage&lt;/h3&gt;
&lt;p&gt;Uptime monitors wait for something to break. A DNS change often breaks nothing you can see.&lt;/p&gt;
&lt;p&gt;Here is an example. Someone adds a second MX record to your domain. MX records tell other servers where to deliver your email. Maybe it was a test of a new email provider, and nobody removed it. Maybe someone stole the password to your DNS account.&lt;/p&gt;
&lt;p&gt;Each MX record has a priority number, and senders try the lowest one first. If the new record has a lower number than yours, your email now goes to another server first. Your website works, your checks are green, and nobody notices for weeks.&lt;/p&gt;
&lt;p&gt;Other changes work the same way:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Someone changes your nameservers at the registrar. Now a different server answers for your whole domain.&lt;/li&gt;
&lt;li&gt;Someone edits your SPF record during a migration. SPF lists the servers that may send email as you, and your newsletter tool is no longer on it.&lt;/li&gt;
&lt;li&gt;Someone deletes your &lt;code&gt;_dmarc&lt;/code&gt; record while cleaning up old records.&lt;/li&gt;
&lt;li&gt;Someone changes your CAA record. Now a different certificate authority can issue certificates for your domain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These changes can leave your DNS lookups and website checks passing.&lt;/p&gt;
&lt;h3 id=&quot;this-happens-in-real-attacks&quot;&gt;This happens in real attacks&lt;/h3&gt;
&lt;p&gt;In January 2019, the US Cybersecurity and Infrastructure Security Agency (CISA) published &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.cisa.gov/news-events/directives/ed-19-01-mitigate-dns-infrastructure-tampering-closed&quot;&gt;Emergency Directive 19-01&lt;/a&gt;. Attackers had changed DNS records on several US government domains.&lt;/p&gt;
&lt;p&gt;They obtained credentials for a DNS account. They changed A, MX and NS records to point to their own servers. Then they could read web and email traffic as it passed through.&lt;/p&gt;
&lt;p&gt;CISA's first order to the agencies was simple: check your public DNS records, and make sure each one points to the right place. Start with NS records.&lt;/p&gt;
&lt;p&gt;A check like that tells you the records were right on one day. A monitor does the same check every few minutes, so you find out on the day of the change.&lt;/p&gt;
&lt;h3 id=&quot;why-does-it-resolve-is-not-enough&quot;&gt;Why &quot;does it resolve?&quot; is not enough&lt;/h3&gt;
&lt;p&gt;Most DNS checks ask one of two questions.&lt;/p&gt;
&lt;p&gt;The first is &quot;Does the name resolve?&quot; This catches a deleted record or an &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/blog/domain-expired-but-site-still-up?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline&quot;&gt;expired domain&lt;/a&gt;. It does not catch a changed record, because a changed record still resolves.&lt;/p&gt;
&lt;p&gt;The second is &quot;Does the answer contain this value?&quot; For example, you enter your mail server, and the check fails if it disappears. This is better. But the check passes as long as your value is somewhere in the answer. So it misses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;an extra MX or NS record next to yours;&lt;/li&gt;
&lt;li&gt;an SPF record changed around the part you check;&lt;/li&gt;
&lt;li&gt;one A record replaced, when you have several.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To catch these, the check must know every record that should be there. Then it can fail on anything else.&lt;/p&gt;
&lt;h3 id=&quot;watch-the-exact-record-set&quot;&gt;Watch the exact record set&lt;/h3&gt;
&lt;p&gt;An exact record set is a list of every record that one name should have, for one record type. The check reads the live answer and compares it with your list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A record in your list but not in the answer is &lt;strong&gt;missing&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A record in the answer but not in your list is &lt;strong&gt;unexpected&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A changed record shows up as both. The old value is missing and the new value is unexpected.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Any difference fails the check. The order of the records does not matter, and neither does the TTL.&lt;/p&gt;
&lt;p&gt;To write the list, start from the records your domain has now. The &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/tools/dns-lookup?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline&quot;&gt;DNS lookup tool&lt;/a&gt; shows them from Cloudflare and Google side by side. Check that every record is one you expect. If the two resolvers disagree, a change is still spreading, so wait until they match.&lt;/p&gt;
&lt;p&gt;In Uptimepage, create a DNS monitor and choose &lt;strong&gt;exact set&lt;/strong&gt; as the answer match. Write one record per line, the way a DNS answer shows it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;10 mail.example.com.
20 alt.example.com.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Say someone adds a third MX record. The next check fails, and the result shows what changed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;domain&quot;: &quot;example.com&quot;,
  &quot;record_type&quot;: &quot;MX&quot;,
  &quot;missing&quot;: [],
  &quot;unexpected&quot;: [&quot;5 mx.attacker.example.&quot;],
  &quot;answers&quot;: [&quot;10 mail.example.com.&quot;, &quot;20 alt.example.com.&quot;, &quot;5 mx.attacker.example.&quot;],
  &quot;expected_contains&quot;: null,
  &quot;matched&quot;: false
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new MX record has priority 5, lower than yours, so senders try it first.&lt;/p&gt;
&lt;p&gt;The check ignores small differences that would only cause false alarms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Upper and lower case in names do not matter, so &lt;code&gt;10 Mail.Example.com&lt;/code&gt; matches &lt;code&gt;10 mail.example.com.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The dot at the end of a name is optional.&lt;/li&gt;
&lt;li&gt;Numbers and IP addresses are compared by value, so &lt;code&gt;2001:0db8::1&lt;/code&gt; matches &lt;code&gt;2001:db8::1&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;TXT values must match exactly, including case. In SPF and DKIM, every character counts.&lt;/p&gt;
&lt;p&gt;Enter only the record value, without the name, TTL or type. For TXT records, you can paste quoted strings from your zone file, with all parts on one line.&lt;/p&gt;
&lt;h3 id=&quot;which-records-to-watch&quot;&gt;Which records to watch&lt;/h3&gt;
&lt;p&gt;You do not need this for every record. Start with the ones where a quiet change hurts the most.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Record &lt;/th&gt;&lt;th&gt;Name &lt;/th&gt;&lt;th&gt;What it controls&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;NS &lt;/td&gt;&lt;td&gt;&lt;code&gt;example.com&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Which servers answer for your whole domain&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;MX &lt;/td&gt;&lt;td&gt;&lt;code&gt;example.com&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Where your email goes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;TXT &lt;/td&gt;&lt;td&gt;&lt;code&gt;example.com&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Your SPF record: who may send email as you&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;TXT &lt;/td&gt;&lt;td&gt;&lt;code&gt;_dmarc.example.com&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Your DMARC policy: what receivers do with fake email from your domain&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;TXT &lt;/td&gt;&lt;td&gt;&lt;code&gt;selector._domainkey.example.com&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Your DKIM public key, which receivers use to check your email signatures&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CAA &lt;/td&gt;&lt;td&gt;&lt;code&gt;example.com&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Which certificate authorities may issue certificates for you&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;A, AAAA &lt;/td&gt;&lt;td&gt;your server hostnames &lt;/td&gt;&lt;td&gt;Only if your servers have fixed IP addresses&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Your main domain often has other TXT records too, such as verification records from other services. Put all of them in the list. A new one means someone connected a new service to your domain, and you want to know about that.&lt;/p&gt;
&lt;p&gt;One monitor watches one name and one record type. Start with six monitors, one for each of the first six rows. Then add one for each other DKIM selector you use, and one for each fixed A or AAAA record set. A hostname with both an A and an AAAA record needs two monitors.&lt;/p&gt;
&lt;p&gt;If you set up only one, make it NS. CISA put NS first too. Whoever changes your NS records controls all your other records.&lt;/p&gt;
&lt;h3 id=&quot;query-your-own-nameserver&quot;&gt;Query your own nameserver&lt;/h3&gt;
&lt;p&gt;Normally a DNS lookup goes through a resolver, such as &lt;code&gt;1.1.1.1&lt;/code&gt; or the one from your internet provider. The resolver keeps each answer for a while. This time is called the TTL. If your MX record has a TTL of one hour, the resolver can show the old answer for about an hour after a change. Sometimes it is longer: a resolver that cannot reach your nameserver may &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.rfc-editor.org/rfc/rfc8767.html#section-1&quot;&gt;keep serving the old answer&lt;/a&gt; until it can.&lt;/p&gt;
&lt;p&gt;You can skip this delay. Set the monitor's resolver to the IP address of your own nameserver, the one that holds your real records (your authoritative nameserver). Then every check sees your records as they are right now.&lt;/p&gt;
&lt;p&gt;There is one exception: NS records. If someone changes your nameservers at the registrar, your own nameserver does not know. It still answers with the old, correct list. So watch NS through a public resolver, such as &lt;code&gt;1.1.1.1&lt;/code&gt; or &lt;code&gt;8.8.8.8&lt;/code&gt;. A public resolver follows the registrar, like your visitors do. You can &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/tools/dns-lookup?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline&quot;&gt;check what a public resolver sees&lt;/a&gt; for any name before you create the monitor.&lt;/p&gt;
&lt;h3 id=&quot;when-not-to-use-an-exact-set&quot;&gt;When not to use an exact set&lt;/h3&gt;
&lt;p&gt;Some records change on purpose. An exact set on them only gives you false alarms.&lt;/p&gt;
&lt;p&gt;Names behind a CDN or a load balancer get their IP addresses from a pool. The answer can change over time and depending on where you query from. I wrote about this in &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/blog/why-dns-returns-different-ip-addresses?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline&quot;&gt;why DNS returns different IP addresses&lt;/a&gt;. An exact A set on such a name would fail all the time. Watch the CNAME record that points to the CDN instead.&lt;/p&gt;
&lt;p&gt;SOA records change every time you edit your zone, because their serial number goes up. &lt;code&gt;_acme-challenge&lt;/code&gt; TXT records come and go with each certificate renewal. Do not use an exact set for these either.&lt;/p&gt;
&lt;h3 id=&quot;keep-the-list-next-to-your-dns&quot;&gt;Keep the list next to your DNS&lt;/h3&gt;
&lt;p&gt;If you manage DNS with Terraform, put the monitor in the same repository:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-hcl&quot;&gt;resource &quot;uptimepage_target&quot; &quot;mx&quot; {
  name     = &quot;mx example.com&quot;
  interval = 300

  check = {
    type = &quot;dns&quot;
    dns = {
      domain           = &quot;example.com&quot;
      record_type      = &quot;MX&quot;
      expected_records = [&quot;10 mail.example.com.&quot;, &quot;20 alt.example.com.&quot;]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now a pull request that changes an MX record must change the monitor too. An MX change that nobody reviewed fails the check. You need Terraform provider 0.15.0 or later. Read more in &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/blog/monitoring-as-code?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline&quot;&gt;monitoring as code&lt;/a&gt;. All DNS options are in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/docs/monitor-types?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=inline#dns&quot;&gt;DNS monitor docs&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;where-uptimepage-fits&quot;&gt;Where Uptimepage fits&lt;/h3&gt;
&lt;p&gt;I build &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=cta&quot;&gt;Uptimepage&lt;/a&gt;, an uptime monitor that checks your services from several regions and alerts you when one fails. The exact set match above is part of its &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/docs/monitor-types?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=dns-record-changes&amp;amp;utm_content=cta#dns&quot;&gt;DNS monitor&lt;/a&gt;. A DNS change alerts you once the failure is confirmed: by default two failed checks in a row, from more than half of the regions. The result names the missing and the unexpected records, so you see the change without running &lt;code&gt;dig&lt;/code&gt; yourself. It is open source under AGPL, so it can also run on your own server.&lt;/p&gt;
&lt;p&gt;Whatever you use, look up your NS records today and check that every name in the answer is one you expect.&lt;/p&gt;
&lt;p&gt;Now the question for the comments: has a DNS record on one of your domains ever changed without anyone noticing? I would like to hear how you found out, and how long it took.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31079/how-to-get-alerted-when-someone-changes-your-dns-records</guid>
<pubDate>Wed, 14 Oct 2026 14:40:51 +0000</pubDate>
</item>
<item>
<title>Diagnosing DNS Filtering Delays Without Resetting the Network</title>
<link>https://coderlegion.com/30088/diagnosing-dns-filtering-delays-without-resetting-the-network</link>
<description>&lt;p&gt;When a filtering change appears to have no effect, waiting is useful only after you know which setting and resolver the client is using. This checklist keeps the diagnosis focused.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Adapted with permission from &lt;a rel=&quot;nofollow&quot; href=&quot;https://lisar.io/articles/dns-caching-vpn-filtering-delay&quot;&gt;the original Lisar article&lt;/a&gt; by Mohammad Hesameddin Montazerilisar, published July 9, 2026 and updated September 27, 2026. AI assisted editing, platform-specific framing, and the documentation note; the substantive source guidance is human-authored.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A DNS change may not be visible immediately because a device, browser or resolver still has an earlier answer cached. Caching is one possible explanation, not proof that a configuration is correct or that waiting will resolve the problem.&lt;/p&gt;
&lt;h3 id=&quot;what-dns-caching-retains&quot;&gt;What DNS caching retains&lt;/h3&gt;
&lt;p&gt;DNS translates a domain name into records a client can use. Cached records are normally reusable for their time to live (TTL). The &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.rfc-editor.org/rfc/rfc1034.html&quot;&gt;DNS specification&lt;/a&gt; describes this caching model. There is no single waiting period that fits every domain, resolver and application.&lt;/p&gt;
&lt;p&gt;DNS cache is different from downloaded page content and an existing network connection. A page can keep displaying an already-loaded ad after DNS settings change. A running app may reuse an established connection without performing another lookup.&lt;/p&gt;
&lt;h3 id=&quot;check-the-setting-before-blaming-the-cache&quot;&gt;Check the setting before blaming the cache&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Confirm the profile's active plan and whether DNS AdBlock is included.&lt;/li&gt;
&lt;li&gt;Confirm the intended VPN profile is connected.&lt;/li&gt;
&lt;li&gt;Identify the domain or application and note the time of the change.&lt;/li&gt;
&lt;li&gt;Check whether the browser or device uses a separate secure-DNS resolver.&lt;/li&gt;
&lt;li&gt;Compare a fresh request under the same conditions after allowing the relevant cache time to pass.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A browser using another resolver can show different results even after its cache expires. A changed setting on one profile does not establish that another device or profile has the same configuration.&lt;/p&gt;
&lt;p&gt;For a documented browser example, &lt;a rel=&quot;nofollow&quot; href=&quot;https://support.mozilla.org/en-US/kb/dns-over-https&quot;&gt;Mozilla describes different DNS-over-HTTPS protection modes&lt;/a&gt; in Firefox. Default protection can disable secure DNS when a VPN or enterprise policy is active, while other modes use the selected provider differently. Read the active mode and policy; do not assume every browser sends every lookup to the same resolver.&lt;/p&gt;
&lt;h3 id=&quot;why-devices-disagree&quot;&gt;Why devices disagree&lt;/h3&gt;
&lt;p&gt;Devices may hold answers obtained at different times or use different resolvers, clients and network routes. A new result on one device and an old result on another can be consistent with caching, but the difference is not enough to diagnose caching by itself.&lt;/p&gt;
&lt;p&gt;Keep the comparison narrow: same destination, intended profile and network where possible. Record browser secure-DNS and device DNS settings without changing managed policies.&lt;/p&gt;
&lt;h3 id=&quot;do-you-need-to-restart-&quot;&gt;Do you need to restart?&lt;/h3&gt;
&lt;p&gt;Usually start by confirming the applied settings and opening a fresh request. Reopening an application or restarting a device may clear some local state, but it does not clear an upstream resolver's cache or guarantee a different answer. Save work before any restart.&lt;/p&gt;
&lt;p&gt;A full network reset, client reinstall or router restart is not a routine first step for a suspected DNS cache delay. If a local cache flush is specifically needed, use the operating system's documented procedure; a managed device or network may require its administrator.&lt;/p&gt;
&lt;h3 id=&quot;if-nothing-changes&quot;&gt;If nothing changes&lt;/h3&gt;
&lt;p&gt;Report the domain, time, device, client, profile entitlement, network and the expected versus actual result to the service support team. Do not send your complete profile or credentials. Check whether the issue is actually an ad served from the same allowed domain: DNS filtering cannot separate that ad from the content by domain alone.&lt;/p&gt;
&lt;h3 id=&quot;frequently-asked-questions&quot;&gt;Frequently asked questions&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;How long should I wait?&lt;/strong&gt; There is no universal delay. The relevant TTL, resolver behavior and application state matter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Will restarting clear every DNS cache?&lt;/strong&gt; No. It may affect local state, but upstream caches and application behavior are separate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Does an unchanged result mean the setting failed?&lt;/strong&gt; Not necessarily. Check whether it was applied, which resolver is used and whether an old answer or existing connection is being reused.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Can DNS AdBlock remove an ad already on screen?&lt;/strong&gt; No. It affects relevant lookups; it does not edit content that has already loaded.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Original author: Mohammad Hesameddin Montazerilisar, technical author for Lisar Connect and Manager of MONTAZERI COMPUTERS &amp;amp; REQUISITES TRADING CO. L.L.C, which develops and operates Lisar Connect.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/30088/diagnosing-dns-filtering-delays-without-resetting-the-network</guid>
<pubDate>Wed, 07 Oct 2026 08:33:32 +0000</pubDate>
</item>
<item>
<title>How Does One Server Find Another Server? DNS, Private DNS, and Service Discovery Explained</title>
<link>https://coderlegion.com/25712/how-does-one-server-find-another-server-dns-private-dns-and-service-discovery-explained</link>
<description>&lt;p&gt;Hey developers! 👋&lt;/p&gt;
&lt;p&gt;Welcome back to our networking and infrastructure deep-dive series.&lt;/p&gt;
&lt;p&gt;In the &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.aniksikder.me/articles/networking/internet-free-infrastructure-how-two-servers-talk-without-using-the-internet&quot;&gt;&lt;strong&gt;previous article&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;we learned something surprising:&lt;/p&gt;
&lt;p&gt;Two servers inside AWS, Azure, GCP, or a private datacenter can communicate without touching the public internet.&lt;/p&gt;
&lt;p&gt;No ISP.&lt;/p&gt;
&lt;p&gt;No public IP.&lt;/p&gt;
&lt;p&gt;No internet routing.&lt;/p&gt;
&lt;p&gt;Just private networking.&lt;/p&gt;
&lt;p&gt;But that raises a much bigger question.&lt;/p&gt;
&lt;p&gt;A question every backend developer eventually encounters.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-mystery-nobody-talks-about&quot;&gt;The Mystery Nobody Talks About&lt;/h3&gt;
&lt;p&gt;Imagine you have:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Web Server
    |
    |
    ▼
PostgreSQL Server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your application needs to connect to PostgreSQL.&lt;/p&gt;
&lt;p&gt;Simple.&lt;/p&gt;
&lt;p&gt;Right?&lt;/p&gt;
&lt;p&gt;Not really.&lt;/p&gt;
&lt;p&gt;Because the web server doesn't magically know:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Where PostgreSQL is.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Servers are not humans.&lt;/p&gt;
&lt;p&gt;They cannot read dashboards.&lt;/p&gt;
&lt;p&gt;They cannot open AWS Console.&lt;/p&gt;
&lt;p&gt;They cannot browse Kubernetes UI.&lt;/p&gt;
&lt;p&gt;So the real question becomes:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;How does one server discover another server?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This seemingly simple question led to the creation of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DNS&lt;/li&gt;
&lt;li&gt;Private DNS&lt;/li&gt;
&lt;li&gt;Service Discovery&lt;/li&gt;
&lt;li&gt;Consul&lt;/li&gt;
&lt;li&gt;Eureka&lt;/li&gt;
&lt;li&gt;Kubernetes DNS&lt;/li&gt;
&lt;li&gt;Cloud Map&lt;/li&gt;
&lt;li&gt;Service Meshes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And ultimately became one of the most important problems in distributed systems.&lt;/p&gt;
&lt;p&gt;Today we're going deep into that rabbit hole.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;imagine-a-new-city&quot;&gt;Imagine a New City&lt;/h3&gt;
&lt;p&gt;Suppose you move into a new city.&lt;/p&gt;
&lt;p&gt;You need to find:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Hospital
Bank
Police Station
Restaurant
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do you memorize every building's GPS coordinates?&lt;/p&gt;
&lt;p&gt;Of course not.&lt;/p&gt;
&lt;p&gt;Instead you use:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Names
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Such as:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;city-hospital.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;104.22.18.150
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Computers do exactly the same thing.&lt;/p&gt;
&lt;p&gt;Humans prefer names.&lt;/p&gt;
&lt;p&gt;Networks use IP addresses.&lt;/p&gt;
&lt;p&gt;Something must translate between them.&lt;/p&gt;
&lt;p&gt;That something is DNS.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;dns-the-internet-s-phonebook&quot;&gt;DNS: The Internet's Phonebook&lt;/h3&gt;
&lt;p&gt;DNS stands for:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Domain Name System
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Its job is simple:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Name -&amp;gt; IP Address
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;google.com

↓

142.250.x.x
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you visit:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;https://google.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;your computer first asks:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;What's the IP address of google.com?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;DNS replies:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;142.250.x.x
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Only then can the connection begin.&lt;/p&gt;
&lt;p&gt;Without DNS:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;The internet would be a giant spreadsheet of IP addresses.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nobody wants that.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-actually-happens-&quot;&gt;What Actually Happens?&lt;/h3&gt;
&lt;p&gt;When your browser requests:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;google.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the flow looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Browser
   |
   ▼
DNS Resolver
   |
   ▼
Root DNS
   |
   ▼
.com Nameserver
   |
   ▼
Google Nameserver
   |
   ▼
IP Address Returned
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Browser
   |
   ▼
Google Server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Connection established.&lt;/p&gt;
&lt;p&gt;This process often completes in milliseconds.&lt;/p&gt;
&lt;p&gt;Billions of times every day.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;but-cloud-infrastructure-has-a-problem&quot;&gt;But Cloud Infrastructure Has a Problem&lt;/h3&gt;
&lt;p&gt;Public DNS works great for public websites.&lt;/p&gt;
&lt;p&gt;But what about:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Backend API
Redis
PostgreSQL
RabbitMQ
Elasticsearch
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These services are not public.&lt;/p&gt;
&lt;p&gt;In fact:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;They should NEVER be public.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;api.company.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;can be public.&lt;/p&gt;
&lt;p&gt;But:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;postgres.company.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;should almost never be exposed to the internet.&lt;/p&gt;
&lt;p&gt;So where do we keep internal server names?&lt;/p&gt;
&lt;p&gt;This is where Private DNS enters the picture.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;private-dns-the-hidden-phonebook&quot;&gt;Private DNS: The Hidden Phonebook&lt;/h3&gt;
&lt;p&gt;Think of Private DNS as:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;An internal company directory.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Only employees can access it.&lt;/p&gt;
&lt;p&gt;Not outsiders.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;db.internal
redis.internal
auth.internal
payments.internal
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These names resolve only inside the private network.&lt;/p&gt;
&lt;p&gt;Outside users see:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Nothing.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Inside AWS this is common.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;ip-10-0-4-25.ec2.internal
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;db.production.internal
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Only resources inside the VPC can resolve these names.&lt;/p&gt;
&lt;p&gt;The public internet has no idea they exist.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;real-production-example&quot;&gt;Real Production Example&lt;/h3&gt;
&lt;p&gt;Suppose you're building an e-commerce platform.&lt;/p&gt;
&lt;p&gt;Architecture:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Internet
    |
    ▼
Load Balancer
    |
    ▼
Web Servers
    |
    ▼
API Service
    |
    ├────────► PostgreSQL
    |
    ├────────► Redis
    |
    └────────► RabbitMQ
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Question:&lt;/p&gt;
&lt;p&gt;How does API Service find PostgreSQL?&lt;/p&gt;
&lt;p&gt;Do we hardcode:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;10.0.12.55
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;inside the application?&lt;/p&gt;
&lt;p&gt;Never.&lt;/p&gt;
&lt;p&gt;Because servers change.&lt;/p&gt;
&lt;p&gt;Instances restart.&lt;/p&gt;
&lt;p&gt;Containers move.&lt;/p&gt;
&lt;p&gt;Databases failover.&lt;/p&gt;
&lt;p&gt;IP addresses evolve.&lt;/p&gt;
&lt;p&gt;Hardcoded IPs become operational nightmares.&lt;/p&gt;
&lt;p&gt;Instead:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;DATABASE_HOST = &quot;postgres.internal&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now infrastructure can move PostgreSQL anywhere.&lt;/p&gt;
&lt;p&gt;DNS updates.&lt;/p&gt;
&lt;p&gt;Application remains unchanged.&lt;/p&gt;
&lt;p&gt;Beautiful.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-ip-address-problem&quot;&gt;The IP Address Problem&lt;/h3&gt;
&lt;p&gt;Modern infrastructure is dynamic.&lt;/p&gt;
&lt;p&gt;Very dynamic.&lt;/p&gt;
&lt;p&gt;Consider Kubernetes.&lt;/p&gt;
&lt;p&gt;A container crashes.&lt;/p&gt;
&lt;p&gt;A new container starts.&lt;/p&gt;
&lt;p&gt;The new container may receive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Completely different IP
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;within seconds.&lt;/p&gt;
&lt;p&gt;Imagine every service storing IPs manually.&lt;/p&gt;
&lt;p&gt;The system would collapse.&lt;/p&gt;
&lt;p&gt;This is why names matter.&lt;/p&gt;
&lt;p&gt;Names remain stable.&lt;/p&gt;
&lt;p&gt;IPs do not.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;enter-service-discovery&quot;&gt;Enter Service Discovery&lt;/h3&gt;
&lt;p&gt;DNS solved:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Find a machine
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Service Discovery solves:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Find a service
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those sound similar.&lt;/p&gt;
&lt;p&gt;They are not.&lt;/p&gt;
&lt;p&gt;Let's see why.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-microservice-nightmare&quot;&gt;The Microservice Nightmare&lt;/h3&gt;
&lt;p&gt;Imagine:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;User Service

Order Service

Payment Service

Notification Service

Inventory Service

Recommendation Service
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each service runs:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Multiple Instances
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Payment Service

payment-1
payment-2
payment-3
payment-4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now User Service wants Payment Service.&lt;/p&gt;
&lt;p&gt;Which instance should it choose?&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-1 ?
payment-2 ?
payment-3 ?
payment-4 ?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hardcoding doesn't work.&lt;/p&gt;
&lt;p&gt;Static DNS doesn't fully solve it.&lt;/p&gt;
&lt;p&gt;We need something smarter.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-service-discovery-actually-does&quot;&gt;What Service Discovery Actually Does&lt;/h3&gt;
&lt;p&gt;A service registry keeps track of:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Who exists
Where they are
Whether they are healthy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Think of it like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Air Traffic Control
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for services.&lt;/p&gt;
&lt;p&gt;Every service announces:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;I'm alive.
Here's my address.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Registry stores that information.&lt;/p&gt;
&lt;p&gt;Other services ask:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Where is Payment Service?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Registry responds:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-2
payment-3
payment-4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now requests can flow.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;netflix-solved-this-years-ago&quot;&gt;Netflix Solved This Years Ago&lt;/h3&gt;
&lt;p&gt;When Netflix moved to microservices they faced a huge challenge.&lt;/p&gt;
&lt;p&gt;Thousands of services.&lt;/p&gt;
&lt;p&gt;Millions of requests.&lt;/p&gt;
&lt;p&gt;Servers constantly scaling.&lt;/p&gt;
&lt;p&gt;They created:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Eureka
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A service discovery platform.&lt;/p&gt;
&lt;p&gt;Services register themselves.&lt;/p&gt;
&lt;p&gt;Other services discover them dynamically.&lt;/p&gt;
&lt;p&gt;Without manual configuration.&lt;/p&gt;
&lt;p&gt;This became one of the foundational patterns of cloud-native architecture.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;kubernetes-service-discovery-on-steroids&quot;&gt;Kubernetes: Service Discovery on Steroids&lt;/h3&gt;
&lt;p&gt;Kubernetes has built-in service discovery.&lt;/p&gt;
&lt;p&gt;Suppose you deploy:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-service
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;4 Pods
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Kubernetes automatically creates:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-service.default.svc.cluster.local
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your application simply uses:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;PAYMENT_URL = &quot;http://payment-service&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No IP required.&lt;/p&gt;
&lt;p&gt;No server management.&lt;/p&gt;
&lt;p&gt;No lookup tables.&lt;/p&gt;
&lt;p&gt;Kubernetes DNS handles everything.&lt;/p&gt;
&lt;p&gt;Behind the scenes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-service
        |
        ▼
Cluster DNS
        |
        ▼
Healthy Pods
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Magic?&lt;/p&gt;
&lt;p&gt;Not really.&lt;/p&gt;
&lt;p&gt;Just extremely sophisticated automation.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-happens-during-a-request-&quot;&gt;What Happens During a Request?&lt;/h3&gt;
&lt;p&gt;Imagine:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Order Service
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;calls:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Payment Service
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Flow:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Order Service
       |
       ▼
DNS Query
       |
       ▼
Cluster DNS
       |
       ▼
Payment Service Endpoints
       |
       ▼
Healthy Pod Selected
       |
       ▼
Request Sent
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All this happens in milliseconds.&lt;/p&gt;
&lt;p&gt;Most developers never see it.&lt;/p&gt;
&lt;p&gt;Yet every request depends on it.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;health-checks-change-everything&quot;&gt;Health Checks Change Everything&lt;/h3&gt;
&lt;p&gt;Modern service discovery isn't just:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Where is the service?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It also asks:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Is the service healthy?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Suppose:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;crashes.&lt;/p&gt;
&lt;p&gt;Registry detects failure.&lt;/p&gt;
&lt;p&gt;Immediately removes it.&lt;/p&gt;
&lt;p&gt;Now traffic goes only to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;payment-1
payment-2
payment-4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No code changes required.&lt;/p&gt;
&lt;p&gt;No deployment required.&lt;/p&gt;
&lt;p&gt;Infrastructure heals itself.&lt;/p&gt;
&lt;p&gt;This is one of the superpowers of modern cloud systems.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;dns-vs-service-discovery&quot;&gt;DNS vs Service Discovery&lt;/h3&gt;
&lt;p&gt;Many engineers confuse them.&lt;/p&gt;
&lt;p&gt;Let's simplify.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Feature                &lt;/th&gt;&lt;th&gt;DNS     &lt;/th&gt;&lt;th&gt;Service Discovery&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Finds Machines         &lt;/td&gt;&lt;td&gt;Yes     &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Finds Services         &lt;/td&gt;&lt;td&gt;Limited &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Tracks Health          &lt;/td&gt;&lt;td&gt;No      &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Dynamic Scaling        &lt;/td&gt;&lt;td&gt;Limited &lt;/td&gt;&lt;td&gt;Excellent&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cloud Native           &lt;/td&gt;&lt;td&gt;Partial &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Microservices Friendly &lt;/td&gt;&lt;td&gt;Partial &lt;/td&gt;&lt;td&gt;Excellent&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Think of DNS as:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;A phonebook
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Think of Service Discovery as:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;A live GPS system with traffic updates.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Huge difference.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;aws-example&quot;&gt;AWS Example&lt;/h3&gt;
&lt;p&gt;AWS provides:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;AWS Cloud Map
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Services register themselves.&lt;/p&gt;
&lt;p&gt;Applications discover services dynamically.&lt;/p&gt;
&lt;p&gt;Instead of:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;10.0.22.17
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you use:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;payment.production.internal
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;AWS continuously keeps records updated.&lt;/p&gt;
&lt;p&gt;Your applications stay clean.&lt;/p&gt;
&lt;p&gt;Infrastructure stays flexible.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-hidden-system-every-developer-uses&quot;&gt;The Hidden System Every Developer Uses&lt;/h3&gt;
&lt;p&gt;Whenever your application connects to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Database
Cache
Queue
API
Microservice
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;one of the following is usually working behind the scenes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;DNS

Private DNS

Service Discovery
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Without them:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Modern cloud architecture would be impossible.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not difficult.&lt;/p&gt;
&lt;p&gt;Impossible.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;visual-mental-model&quot;&gt;Visual Mental Model&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Application
     |
     ▼
Service Name

(payment-service)

     |
     ▼
DNS / Service Discovery

     |
     ▼
Healthy Instance

(payment-2)

     |
     ▼
TCP Connection

     |
     ▼
Response
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Simple.&lt;/p&gt;
&lt;p&gt;Powerful.&lt;/p&gt;
&lt;p&gt;Cloud Native.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-system-designers-care&quot;&gt;Why System Designers Care&lt;/h3&gt;
&lt;p&gt;Junior developers often think:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Database Host = Some String
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;System designers think:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;How is that string resolved?

Who owns it?

What happens during failover?

How is health tracked?

How does scaling affect discovery?

How quickly do updates propagate?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These questions separate:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Application Development
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;from&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Infrastructure Engineering
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Understanding service discovery is one of the first steps toward thinking like a platform engineer, DevOps engineer, cloud architect, or distributed systems designer.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;tl-dr-quick-recap&quot;&gt;TL;DR Quick Recap&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Servers communicate using IP addresses.&lt;/li&gt;
&lt;li&gt;Humans prefer names.&lt;/li&gt;
&lt;li&gt;DNS translates names into IP addresses.&lt;/li&gt;
&lt;li&gt;Private DNS provides internal-only naming.&lt;/li&gt;
&lt;li&gt;Modern infrastructure avoids hardcoded IPs.&lt;/li&gt;
&lt;li&gt;Service Discovery tracks service locations dynamically.&lt;/li&gt;
&lt;li&gt;Kubernetes provides built-in service discovery.&lt;/li&gt;
&lt;li&gt;Healthy instances are automatically discovered.&lt;/li&gt;
&lt;li&gt;Failed instances are automatically removed.&lt;/li&gt;
&lt;li&gt;Every modern cloud platform depends heavily on these mechanisms.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;final-thoughts-the-invisible-map-of-the-cloud-&quot;&gt;Final Thoughts: The Invisible Map of the Cloud 🗺️&lt;/h3&gt;
&lt;p&gt;Most developers spend years writing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;DATABASE_HOST=&quot;postgres&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;without asking:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Who told the application where postgres is?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Behind that tiny configuration value sits an enormous ecosystem:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DNS Servers&lt;/li&gt;
&lt;li&gt;Private DNS&lt;/li&gt;
&lt;li&gt;Service Registries&lt;/li&gt;
&lt;li&gt;Health Checks&lt;/li&gt;
&lt;li&gt;Load Balancers&lt;/li&gt;
&lt;li&gt;Cloud Networking&lt;/li&gt;
&lt;li&gt;Kubernetes Controllers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All working together to answer one deceptively simple question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Where is the thing I'm trying to talk to?&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And surprisingly, that question powers almost every distributed system on Earth.&lt;/p&gt;
&lt;p&gt;In the next article, we'll go even deeper:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How Does Traffic Know Which Server Should Receive the Request?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Load Balancers → Reverse Proxies → Traffic Routing → Health Checks&lt;/p&gt;
&lt;p&gt;Because finding a service is only half the story.&lt;/p&gt;
&lt;p&gt;Choosing the right instance is where things get really interesting. 🚀&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25712/how-does-one-server-find-another-server-dns-private-dns-and-service-discovery-explained</guid>
<pubDate>Fri, 28 Aug 2026 16:58:06 +0000</pubDate>
</item>
<item>
<title>DNS Propagation Explained: Why DNS Changes Take Time and What Actually Happens Behind the Scenes</title>
<link>https://coderlegion.com/24532/dns-propagation-explained-why-dns-changes-take-time-what-actually-happens-behind-scenes</link>
<description>&lt;p&gt;In the &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.aniksikder.me/articles/networking/dns-record-types-explained&quot;&gt;previous article&lt;/a&gt;, we explored:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How DNS works&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How DNS records power websites, email systems, and cloud infrastructure&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At this point, a natural question emerges:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;If DNS changes are just records stored on a server, why don’t updates happen instantly?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Imagine moving a website to a new server.&lt;/p&gt;
&lt;p&gt;You update the DNS record.&lt;/p&gt;
&lt;p&gt;You refresh your browser.&lt;/p&gt;
&lt;p&gt;Nothing changes.&lt;/p&gt;
&lt;p&gt;An hour later, some users see the new website.&lt;/p&gt;
&lt;p&gt;Others still see the old one.&lt;/p&gt;
&lt;p&gt;A colleague in another country sees something completely different.&lt;/p&gt;
&lt;p&gt;Monitoring tools report mixed results.&lt;/p&gt;
&lt;p&gt;Suddenly everyone starts asking:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Has DNS propagated yet?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is one of the most misunderstood concepts in networking.&lt;/p&gt;
&lt;p&gt;In reality, DNS propagation is not magic.&lt;/p&gt;
&lt;p&gt;It is not a global synchronization event.&lt;/p&gt;
&lt;p&gt;And contrary to popular belief, DNS records do not slowly travel across the internet.&lt;/p&gt;
&lt;p&gt;What actually happens is far more interesting.&lt;/p&gt;
&lt;p&gt;Understanding DNS propagation requires understanding three critical concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS Cache&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS TTL&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Recursive Resolvers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once those concepts click, DNS behavior becomes predictable instead of mysterious.&lt;/p&gt;
&lt;h3 id=&quot;the-biggest-misconception-about-dns-propagation&quot;&gt;&lt;strong&gt;The Biggest Misconception About DNS Propagation&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Most explanations describe DNS propagation like this:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;DNS Change
      ↓
Internet Updates Everywhere
      ↓
Propagation Complete
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This sounds reasonable.&lt;/p&gt;
&lt;p&gt;Unfortunately, it isn’t how DNS works.&lt;/p&gt;
&lt;p&gt;There is no global “update internet” button.&lt;/p&gt;
&lt;p&gt;There is no mechanism that pushes your DNS change to every network on Earth.&lt;/p&gt;
&lt;p&gt;The internet doesn’t work that way.&lt;/p&gt;
&lt;p&gt;A more accurate model looks like this:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;DNS Change
      ↓
Old Answers Expire
      ↓
Resolvers Ask Again
      ↓
New Answers Are Cached
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This distinction is important.&lt;/p&gt;
&lt;p&gt;Because understanding it helps explain nearly every DNS propagation issue.&lt;/p&gt;
&lt;h3 id=&quot;what-dns-propagation-actually-means&quot;&gt;&lt;strong&gt;What DNS Propagation Actually Means&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;When people say:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DNS propagation is taking time&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What they usually mean is:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Some systems are still using cached DNS information.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s it.&lt;/p&gt;
&lt;p&gt;Propagation is largely a caching problem.&lt;/p&gt;
&lt;p&gt;Not a distribution problem.&lt;/p&gt;
&lt;p&gt;The internet already knows where your DNS records live.&lt;/p&gt;
&lt;p&gt;The challenge is that millions of systems may still trust older answers.&lt;/p&gt;
&lt;h3 id=&quot;understanding-dns-cache&quot;&gt;&lt;strong&gt;Understanding DNS Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS would be incredibly inefficient without caching.&lt;/p&gt;
&lt;p&gt;Imagine every website visit requiring:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Contact Root Servers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Contact TLD Servers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Contact Authoritative Nameservers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retrieve DNS Records&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For every request.&lt;/p&gt;
&lt;p&gt;For every user.&lt;/p&gt;
&lt;p&gt;For every page load.&lt;/p&gt;
&lt;p&gt;The internet would be overwhelmed.&lt;/p&gt;
&lt;p&gt;Instead, DNS uses caching extensively.&lt;/p&gt;
&lt;h3 id=&quot;where-dns-is-cached&quot;&gt;&lt;strong&gt;Where DNS Is Cached&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Most people assume DNS is cached in only one location.&lt;/p&gt;
&lt;p&gt;In reality, DNS is cached everywhere.&lt;/p&gt;
&lt;h3 id=&quot;browser-cache&quot;&gt;&lt;strong&gt;Browser Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Your browser remembers previous DNS lookups.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;chrome
firefox
safari
edge
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;all maintain their own caches.&lt;/p&gt;
&lt;h3 id=&quot;operating-system-cache&quot;&gt;&lt;strong&gt;Operating System Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The operating system also stores DNS responses.&lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Windows
Linux
macOS
Android
iOS
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;all implement DNS caching.&lt;/p&gt;
&lt;h3 id=&quot;router-cache&quot;&gt;&lt;strong&gt;Router Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many routers cache DNS responses.&lt;/p&gt;
&lt;p&gt;This includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Home routers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Office routers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise firewalls&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;isp-cache&quot;&gt;&lt;strong&gt;ISP Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Internet Service Providers often cache DNS records.&lt;/p&gt;
&lt;h3 id=&quot;recursive-resolver-cache&quot;&gt;&lt;strong&gt;Recursive Resolver Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Resolvers such as:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Google DNS
8.8.8.8
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Cloudflare DNS
1.1.1.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;maintain massive DNS caches.&lt;/p&gt;
&lt;p&gt;This is where most DNS propagation delays originate.&lt;/p&gt;
&lt;h3 id=&quot;why-dns-caching-exists&quot;&gt;&lt;strong&gt;Why DNS Caching Exists&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Caching solves several major problems.&lt;/p&gt;
&lt;h3 id=&quot;faster-performance&quot;&gt;&lt;strong&gt;Faster Performance&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Without caching:&lt;/p&gt;
&lt;p&gt;Every DNS lookup would require multiple network requests.&lt;/p&gt;
&lt;p&gt;Caching dramatically reduces lookup times.&lt;/p&gt;
&lt;h3 id=&quot;reduced-infrastructure-load&quot;&gt;&lt;strong&gt;Reduced Infrastructure Load&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS infrastructure handles billions of requests daily.&lt;/p&gt;
&lt;p&gt;Caching prevents unnecessary traffic.&lt;/p&gt;
&lt;h3 id=&quot;improved-reliability&quot;&gt;&lt;strong&gt;Improved Reliability&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Cached answers remain available even when upstream systems experience temporary issues.&lt;/p&gt;
&lt;p&gt;Caching is one of the reasons DNS scales globally.&lt;/p&gt;
&lt;h3 id=&quot;dns-ttl-explained&quot;&gt;&lt;strong&gt;DNS TTL Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;TTL stands for:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Time To Live&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;TTL determines how long a DNS response can remain cached before it must be refreshed.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com. 3600 IN A 203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;3600 seconds
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;equals:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;1 hour
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This means:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;A resolver may reuse this answer for one hour before requesting a fresh copy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;ttl-is-the-heart-of-dns-propagation&quot;&gt;&lt;strong&gt;TTL Is the Heart of DNS Propagation&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;When people ask:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Why hasn’t my DNS update appeared yet?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The answer is often:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;The previous TTL has not expired.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Resolvers continue trusting old information until the cache expires.&lt;/p&gt;
&lt;p&gt;Only then do they ask for new information.&lt;/p&gt;
&lt;h3 id=&quot;a-practical-example&quot;&gt;&lt;strong&gt;A Practical Example&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Imagine a website currently points to:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The DNS record has:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;TTL = 86400
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which equals:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;24 hours
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At 9:00 AM you update the record:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;203.0.113.50
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What happens?&lt;/p&gt;
&lt;p&gt;Many resolvers continue using:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;until their cached record expires.&lt;/p&gt;
&lt;p&gt;The new server may not become visible everywhere for many hours.&lt;/p&gt;
&lt;p&gt;This is normal.&lt;/p&gt;
&lt;h3 id=&quot;why-some-people-see-changes-before-others&quot;&gt;&lt;strong&gt;Why Some People See Changes Before Others&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A common source of confusion:&lt;/p&gt;
&lt;p&gt;Two people check the same domain.&lt;/p&gt;
&lt;p&gt;One sees the new website.&lt;/p&gt;
&lt;p&gt;The other sees the old website.&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;Because they are not necessarily using the same resolver.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;User A → Cloudflare DNS
User B → ISP Resolver
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If one cache expires earlier than another, different answers appear temporarily.&lt;/p&gt;
&lt;p&gt;This creates the illusion that DNS propagation is inconsistent.&lt;/p&gt;
&lt;p&gt;In reality, different caches are simply operating on different timelines.&lt;/p&gt;
&lt;h3 id=&quot;the-lifecycle-of-a-dns-change&quot;&gt;&lt;strong&gt;The Lifecycle of a DNS Change&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A DNS update generally follows this pattern:&lt;/p&gt;
&lt;h3 id=&quot;step-1&quot;&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A record changes on the authoritative nameserver.&lt;/p&gt;
&lt;h3 id=&quot;step-2&quot;&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Existing caches continue using older answers.&lt;/p&gt;
&lt;h3 id=&quot;step-3&quot;&gt;&lt;strong&gt;Step 3&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;TTL expires.&lt;/p&gt;
&lt;h3 id=&quot;step-4&quot;&gt;&lt;strong&gt;Step 4&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Resolvers request fresh information.&lt;/p&gt;
&lt;h3 id=&quot;step-5&quot;&gt;&lt;strong&gt;Step 5&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;New answers are cached.&lt;/p&gt;
&lt;h3 id=&quot;step-6&quot;&gt;&lt;strong&gt;Step 6&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Traffic gradually shifts to the new destination.&lt;/p&gt;
&lt;p&gt;This process is what people call:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DNS Propagation&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;why-lowering-ttl-before-migrations-matters&quot;&gt;&lt;strong&gt;Why Lowering TTL Before Migrations Matters&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Experienced infrastructure teams rarely make DNS changes without preparation.&lt;/p&gt;
&lt;p&gt;Suppose a website migration is scheduled for Friday.&lt;/p&gt;
&lt;p&gt;The existing record has:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;TTL = 86400
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One day before the migration:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;TTL = 300
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;is configured.&lt;/p&gt;
&lt;p&gt;This reduces cache duration to:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;5 minutes
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now when the migration occurs, resolvers refresh much faster.&lt;/p&gt;
&lt;p&gt;The transition becomes significantly smoother.&lt;/p&gt;
&lt;h3 id=&quot;the-most-common-dns-migration-mistake&quot;&gt;&lt;strong&gt;The Most Common DNS Migration Mistake&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A surprisingly common scenario:&lt;/p&gt;
&lt;h3 id=&quot;monday&quot;&gt;&lt;strong&gt;Monday&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;TTL remains:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;86400
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;tuesday&quot;&gt;&lt;strong&gt;Tuesday&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Migration begins.&lt;/p&gt;
&lt;h3 id=&quot;tuesday-afternoon&quot;&gt;&lt;strong&gt;Tuesday Afternoon&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Traffic appears inconsistent.&lt;/p&gt;
&lt;h3 id=&quot;tuesday-evening&quot;&gt;&lt;strong&gt;Tuesday Evening&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;People assume DNS is broken.&lt;/p&gt;
&lt;p&gt;In reality:&lt;/p&gt;
&lt;p&gt;The TTL strategy was never planned.&lt;/p&gt;
&lt;p&gt;The migration itself may be perfectly correct.&lt;/p&gt;
&lt;h3 id=&quot;dns-propagation-and-website-launches&quot;&gt;&lt;strong&gt;DNS Propagation and Website Launches&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Launching a new website often involves:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS updates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSL certificates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CDN configuration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Email setup&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search engine verification&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DNS propagation affects all of them.&lt;/p&gt;
&lt;p&gt;Many launch-day issues are actually cache-related issues.&lt;/p&gt;
&lt;p&gt;Understanding propagation helps avoid unnecessary panic.&lt;/p&gt;
&lt;h3 id=&quot;dns-propagation-and-email-systems&quot;&gt;&lt;strong&gt;DNS Propagation and Email Systems&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Email migrations are especially sensitive.&lt;/p&gt;
&lt;p&gt;A website outage is obvious.&lt;/p&gt;
&lt;p&gt;Email failures often aren’t.&lt;/p&gt;
&lt;p&gt;If MX records change:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN MX 10 mail.old-provider.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;becomes:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN MX 10 mail.new-provider.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;different mail servers may temporarily use different routes.&lt;/p&gt;
&lt;p&gt;Proper TTL planning becomes critical.&lt;/p&gt;
&lt;h3 id=&quot;dns-propagation-and-search-visibility&quot;&gt;&lt;strong&gt;DNS Propagation and Search Visibility&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Search engines rely on DNS continuously.&lt;/p&gt;
&lt;p&gt;They must:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Crawl websites&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify ownership&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Access resources&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Poorly planned DNS changes can temporarily impact accessibility.&lt;/p&gt;
&lt;p&gt;This doesn’t automatically harm rankings.&lt;/p&gt;
&lt;p&gt;However, prolonged outages or misconfigured migrations can create crawl issues.&lt;/p&gt;
&lt;p&gt;Infrastructure reliability remains an important foundation for search visibility.&lt;/p&gt;
&lt;h3 id=&quot;dns-propagation-and-geo&quot;&gt;&lt;strong&gt;DNS Propagation and GEO&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;As AI-powered discovery systems become more common, reliable infrastructure becomes increasingly important.&lt;/p&gt;
&lt;p&gt;Large language models, answer engines, and AI search platforms must access content consistently.&lt;/p&gt;
&lt;p&gt;DNS instability can affect:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Content accessibility&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Crawling consistency&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Service reliability&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Strong DNS practices contribute to long-term discoverability.&lt;/p&gt;
&lt;h3 id=&quot;how-to-check-dns-propagation&quot;&gt;&lt;strong&gt;How to Check DNS Propagation&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Several approaches exist.&lt;/p&gt;
&lt;h3 id=&quot;using-dig&quot;&gt;&lt;strong&gt;Using dig&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;dig example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;query-specific-resolvers&quot;&gt;&lt;strong&gt;Query Specific Resolvers&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;dig @8.8.8.8 example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;dig @1.1.1.1 example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Comparing results helps identify cache differences.&lt;/p&gt;
&lt;h3 id=&quot;online-dns-checkers&quot;&gt;&lt;strong&gt;Online DNS Checkers&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS propagation tools query multiple locations worldwide.&lt;/p&gt;
&lt;p&gt;These tools provide a useful snapshot of resolver behavior across regions.&lt;/p&gt;
&lt;h3 id=&quot;does-dns-propagation-really-take-48-hours-&quot;&gt;&lt;strong&gt;Does DNS Propagation Really Take 48 Hours?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One of the oldest myths in networking is:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DNS propagation takes 24 to 48 hours.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Historically, this was often true.&lt;/p&gt;
&lt;p&gt;Modern DNS infrastructure behaves differently.&lt;/p&gt;
&lt;p&gt;Most changes appear much faster.&lt;/p&gt;
&lt;p&gt;The real answer depends on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;TTL values&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resolver behavior&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cache state&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Network policies&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many updates become visible within minutes.&lt;/p&gt;
&lt;p&gt;Others may take significantly longer.&lt;/p&gt;
&lt;p&gt;The key variable is caching.&lt;/p&gt;
&lt;p&gt;Not geography.&lt;/p&gt;
&lt;p&gt;Not distance.&lt;/p&gt;
&lt;p&gt;Not internet speed.&lt;/p&gt;
&lt;p&gt;Caching.&lt;/p&gt;
&lt;h3 id=&quot;common-dns-propagation-myths&quot;&gt;&lt;strong&gt;Common DNS Propagation Myths&lt;/strong&gt;&lt;/h3&gt;
&lt;h3 id=&quot;myth-1&quot;&gt;&lt;strong&gt;Myth #1&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS changes spread slowly around the world.&lt;/p&gt;
&lt;p&gt;Reality:&lt;/p&gt;
&lt;p&gt;Resolvers refresh cached information when TTL expires.&lt;/p&gt;
&lt;h3 id=&quot;myth-2&quot;&gt;&lt;strong&gt;Myth #2&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS propagation always takes 48 hours.&lt;/p&gt;
&lt;p&gt;Reality:&lt;/p&gt;
&lt;p&gt;Many changes appear within minutes.&lt;/p&gt;
&lt;h3 id=&quot;myth-3&quot;&gt;&lt;strong&gt;Myth #3&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS propagation can be forced globally.&lt;/p&gt;
&lt;p&gt;Reality:&lt;/p&gt;
&lt;p&gt;You cannot instantly clear every cache on the internet.&lt;/p&gt;
&lt;h3 id=&quot;myth-4&quot;&gt;&lt;strong&gt;Myth #4&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS propagation means DNS is broken.&lt;/p&gt;
&lt;p&gt;Reality:&lt;/p&gt;
&lt;p&gt;Propagation is usually normal DNS behavior.&lt;/p&gt;
&lt;h3 id=&quot;best-practices-for-dns-changes&quot;&gt;&lt;strong&gt;Best Practices for DNS Changes&lt;/strong&gt;&lt;/h3&gt;
&lt;h3 id=&quot;reduce-ttl-before-major-changes&quot;&gt;&lt;strong&gt;Reduce TTL Before Major Changes&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Prepare caches before migrations.&lt;/p&gt;
&lt;h3 id=&quot;verify-records-before-updating&quot;&gt;&lt;strong&gt;Verify Records Before Updating&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Prevent avoidable mistakes.&lt;/p&gt;
&lt;h3 id=&quot;monitor-multiple-resolvers&quot;&gt;&lt;strong&gt;Monitor Multiple Resolvers&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Avoid relying on a single DNS source.&lt;/p&gt;
&lt;h3 id=&quot;plan-email-migrations-carefully&quot;&gt;&lt;strong&gt;Plan Email Migrations Carefully&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Email outages are often harder to detect than website outages.&lt;/p&gt;
&lt;h3 id=&quot;understand-cache-behavior&quot;&gt;&lt;strong&gt;Understand Cache Behavior&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Most propagation issues are cache issues.&lt;/p&gt;
&lt;h3 id=&quot;key-takeaways&quot;&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS propagation is primarily a caching phenomenon.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS records do not physically spread across the internet.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS TTL controls cache lifetime.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS cache exists in browsers, operating systems, routers, ISPs, and recursive resolvers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Different users may see different DNS answers during propagation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lower TTL values can simplify migrations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Most propagation issues are cache-related rather than DNS-related.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understanding propagation reduces downtime, confusion, and migration risk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reliable DNS practices support website availability, email delivery, and long-term discoverability.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/24532/dns-propagation-explained-why-dns-changes-take-time-what-actually-happens-behind-scenes</guid>
<pubDate>Wed, 12 Aug 2026 17:44:34 +0000</pubDate>
</item>
<item>
<title>DNS Records Explained: A, AAAA, CNAME, MX, TXT, NS, and SRV Records in Modern Internet Infrastructur</title>
<link>https://coderlegion.com/24396/dns-records-explained-aaaa-cname-mx-txt-ns-and-srv-records-modern-internet-infrastructur</link>
<description>&lt;p&gt;In the &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.aniksikder.me/articles/networking/dns-explained-complete-guide&quot;&gt;previous article&lt;/a&gt;, we explored how DNS translates human-friendly domain names into machine-friendly IP addresses and how a request travels through recursive resolvers, root servers, TLD servers, and authoritative nameservers before finally reaching a destination.&lt;/p&gt;
&lt;p&gt;That journey answers how DNS works.&lt;/p&gt;
&lt;p&gt;This article answers a different question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;What information is DNS actually returning?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When a DNS resolver contacts an authoritative nameserver, it isn’t simply asking for an IP address.&lt;/p&gt;
&lt;p&gt;It is asking for a specific record.&lt;/p&gt;
&lt;p&gt;Those records determine:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Where websites live&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Where email should be delivered&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which servers are authoritative&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How domains are verified&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How email is authenticated&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How cloud services are discovered&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How SaaS platforms connect custom domains&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How modern internet infrastructure operates&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In other words:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DNS resolution is the process.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;DNS records are the data.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Understanding DNS records is where DNS knowledge becomes practical.&lt;/p&gt;
&lt;p&gt;Whether you’re launching a website, migrating infrastructure, configuring email, deploying applications, implementing custom domains, or troubleshooting production systems, DNS records sit at the center of the operation.&lt;/p&gt;
&lt;h3 id=&quot;why-dns-records-matter-more-than-most-people-realize&quot;&gt;&lt;strong&gt;Why DNS Records Matter More Than Most People Realize&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many internet outages aren’t caused by application bugs.&lt;/p&gt;
&lt;p&gt;They aren’t caused by database failures.&lt;/p&gt;
&lt;p&gt;They aren’t caused by cloud providers.&lt;/p&gt;
&lt;p&gt;They’re caused by configuration mistakes.&lt;/p&gt;
&lt;p&gt;A misplaced DNS record can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Take an entire website offline&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stop customer emails from arriving&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Break API connectivity&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prevent SSL certificate issuance&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Disrupt SaaS onboarding&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cause search engines to lose access to content&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The irony is that DNS records are often configured once and forgotten until something breaks.&lt;/p&gt;
&lt;p&gt;That’s why understanding them matters.&lt;/p&gt;
&lt;h3 id=&quot;dns-records-the-source-of-truth-behind-every-domain&quot;&gt;&lt;strong&gt;DNS Records: The Source of Truth Behind Every Domain&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Imagine someone enters:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;into a browser.&lt;/p&gt;
&lt;p&gt;Eventually the request reaches the authoritative nameserver.&lt;/p&gt;
&lt;p&gt;The authoritative nameserver responds with records stored inside its DNS zone.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com. IN A 203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The response tells the internet:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com
       ↓
203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That single record determines where traffic goes.&lt;/p&gt;
&lt;p&gt;Without DNS records, DNS itself would be useless.&lt;/p&gt;
&lt;h3 id=&quot;understanding-dns-record-types&quot;&gt;&lt;strong&gt;Understanding DNS Record Types&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Modern DNS contains dozens of record types.&lt;/p&gt;
&lt;p&gt;However, seven records power the overwhelming majority of websites, applications, email systems, and cloud services.&lt;/p&gt;
&lt;p&gt;Record TypePrimary PurposeAMaps hostname to IPv4AAAAMaps hostname to IPv6CNAMECreates aliasesMXRoutes emailTXTVerification and securityNSDefines authoritative nameserversSRVService discovery&lt;/p&gt;
&lt;p&gt;These records form the foundation of modern internet infrastructure.&lt;/p&gt;
&lt;h3 id=&quot;a-record-explained&quot;&gt;&lt;strong&gt;A Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The A Record is the most fundamental DNS record.&lt;/p&gt;
&lt;p&gt;The “A” stands for:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Address&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It maps a hostname directly to an IPv4 address.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com. IN A 203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This creates a direct relationship:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com
       ↓
203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When someone visits the domain, traffic is sent to that server.&lt;/p&gt;
&lt;h3 id=&quot;why-a-records-are-so-important&quot;&gt;&lt;strong&gt;Why A Records Are So Important&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Every website needs a destination.&lt;/p&gt;
&lt;p&gt;The A Record provides that destination.&lt;/p&gt;
&lt;p&gt;Without it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Browsers cannot locate servers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applications cannot connect&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;APIs become unreachable&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even the most advanced infrastructure eventually depends on records that resolve to an IP address.&lt;/p&gt;
&lt;h3 id=&quot;where-a-records-are-commonly-used&quot;&gt;&lt;strong&gt;Where A Records Are Commonly Used&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Typical examples include:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;company.com
portfolio.com
store.com
api.company.com
app.company.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Almost every publicly accessible website uses A records somewhere in its architecture.&lt;/p&gt;
&lt;h3 id=&quot;production-reality-a-record-migrations&quot;&gt;&lt;strong&gt;Production Reality: A Record Migrations&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One of the most common infrastructure projects involves moving applications between servers.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Old Server
203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;becomes:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;New Server
203.0.113.50
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Updating the A Record redirects traffic globally without requiring users to change anything.&lt;/p&gt;
&lt;p&gt;This simple capability is one reason DNS remains such a powerful abstraction layer.&lt;/p&gt;
&lt;h3 id=&quot;aaaa-record-explained&quot;&gt;&lt;strong&gt;AAAA Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The AAAA Record performs the same role as an A Record.&lt;/p&gt;
&lt;p&gt;The difference is the addressing standard.&lt;/p&gt;
&lt;p&gt;RecordProtocolAIPv4AAAAIPv6&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com. IN AAAA 2001:db8::1
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;why-ipv6-exists&quot;&gt;&lt;strong&gt;Why IPv6 Exists&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;IPv4 provides approximately:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;4.3 Billion Addresses
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That seemed enormous in the early days of the internet.&lt;/p&gt;
&lt;p&gt;Today, it isn’t.&lt;/p&gt;
&lt;p&gt;Cloud computing, smartphones, IoT devices, smart vehicles, and connected infrastructure accelerated address consumption dramatically.&lt;/p&gt;
&lt;p&gt;IPv6 was created to solve that limitation.&lt;/p&gt;
&lt;h3 id=&quot;should-every-website-use-aaaa-records-&quot;&gt;&lt;strong&gt;Should Every Website Use AAAA Records?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Not necessarily.&lt;/p&gt;
&lt;p&gt;A common mistake is enabling IPv6 before infrastructure is ready.&lt;/p&gt;
&lt;p&gt;If an application doesn’t properly support IPv6, users may experience connectivity problems despite having perfectly functioning IPv4 infrastructure.&lt;/p&gt;
&lt;p&gt;IPv6 should be enabled deliberately rather than automatically.&lt;/p&gt;
&lt;h3 id=&quot;cname-record-explained&quot;&gt;&lt;strong&gt;CNAME Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;CNAME stands for:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Canonical Name&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Unlike an A Record, a CNAME does not point to an IP address.&lt;/p&gt;
&lt;p&gt;Instead, it points to another hostname.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com IN CNAME example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which effectively means:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com
         ↓
example.com
         ↓
203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;why-cname-records-exist&quot;&gt;&lt;strong&gt;Why CNAME Records Exist&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Imagine managing:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com
blog.example.com
docs.example.com
shop.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If each hostname pointed directly to an IP address, every infrastructure change would require updating multiple records.&lt;/p&gt;
&lt;p&gt;CNAME records eliminate that complexity.&lt;/p&gt;
&lt;p&gt;One change updates every dependent hostname.&lt;/p&gt;
&lt;h3 id=&quot;why-modern-saas-platforms-love-cname-records&quot;&gt;&lt;strong&gt;Why Modern SaaS Platforms Love CNAME Records&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Custom domains have become a standard expectation.&lt;/p&gt;
&lt;p&gt;Instead of:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;customer.platform.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;many organizations prefer:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;app.customer-domain.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The most common implementation relies on CNAME records.&lt;/p&gt;
&lt;p&gt;This approach allows millions of customer domains to connect to shared infrastructure while maintaining branding and flexibility.&lt;/p&gt;
&lt;h3 id=&quot;the-hidden-complexity-of-custom-domains&quot;&gt;&lt;strong&gt;The Hidden Complexity of Custom Domains&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;What appears simple on the surface often requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Domain ownership verification&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS validation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSL certificate provisioning&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Traffic routing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edge network configuration&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Behind a single CNAME record is often a surprisingly sophisticated platform architecture.&lt;/p&gt;
&lt;h3 id=&quot;cname-vs-a-record&quot;&gt;&lt;strong&gt;CNAME vs A Record&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One of the most common questions is:&lt;/p&gt;
&lt;h3 id=&quot;when-should-an-a-record-be-used-&quot;&gt;&lt;strong&gt;When should an A Record be used?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;When pointing directly to an IP address.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN A 203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;when-should-a-cname-be-used-&quot;&gt;&lt;strong&gt;When should a CNAME be used?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;When pointing to another hostname.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com IN CNAME example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;simple-rule&quot;&gt;&lt;strong&gt;Simple Rule&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Use:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;A Record
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for servers.&lt;/p&gt;
&lt;p&gt;Use:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;CNAME
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for aliases.&lt;/p&gt;
&lt;h3 id=&quot;mx-record-explained&quot;&gt;&lt;strong&gt;MX Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;MX stands for:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Mail Exchange&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;MX records tell the internet where incoming email should be delivered.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN MX 10 mail.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Without MX records:&lt;/p&gt;
&lt;p&gt;Email cannot function.&lt;/p&gt;
&lt;h3 id=&quot;why-mx-records-matter-more-than-most-websites&quot;&gt;&lt;strong&gt;Why MX Records Matter More Than Most Websites&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A website outage is visible.&lt;/p&gt;
&lt;p&gt;An email outage often isn’t.&lt;/p&gt;
&lt;p&gt;Messages simply disappear.&lt;/p&gt;
&lt;p&gt;Leads go unanswered.&lt;/p&gt;
&lt;p&gt;Support requests never arrive.&lt;/p&gt;
&lt;p&gt;Invoices are missed.&lt;/p&gt;
&lt;p&gt;Customers assume silence means neglect.&lt;/p&gt;
&lt;p&gt;The business impact can be substantial.&lt;/p&gt;
&lt;h3 id=&quot;understanding-mx-priority&quot;&gt;&lt;strong&gt;Understanding MX Priority&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;MX 10 mail-primary.example.com
MX 20 mail-backup.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lower values receive priority.&lt;/p&gt;
&lt;p&gt;If the primary server becomes unavailable, mail automatically flows to the backup system.&lt;/p&gt;
&lt;p&gt;This redundancy improves reliability.&lt;/p&gt;
&lt;h3 id=&quot;txt-record-explained&quot;&gt;&lt;strong&gt;TXT Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;TXT records are among the most flexible records in DNS.&lt;/p&gt;
&lt;p&gt;Historically they stored simple text.&lt;/p&gt;
&lt;p&gt;Today they support critical infrastructure functions.&lt;/p&gt;
&lt;h3 id=&quot;txt-records-power-modern-trust-systems&quot;&gt;&lt;strong&gt;TXT Records Power Modern Trust Systems&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many internet services rely on TXT records to verify ownership.&lt;/p&gt;
&lt;p&gt;Examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Google Search Console&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Microsoft 365&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud platforms&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Email providers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSL certificate services&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;google-site-verification=abc123
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This proves domain ownership without requiring direct server access.&lt;/p&gt;
&lt;h3 id=&quot;txt-records-and-email-security&quot;&gt;&lt;strong&gt;TXT Records and Email Security&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;TXT records are heavily used by:&lt;/p&gt;
&lt;h3 id=&quot;spf&quot;&gt;&lt;strong&gt;SPF&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Defines authorized email senders.&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;v=spf1 include:_spf.google.com ~all
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;dkim&quot;&gt;&lt;strong&gt;DKIM&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Provides cryptographic email signatures.&lt;/p&gt;
&lt;h3 id=&quot;dmarc&quot;&gt;&lt;strong&gt;DMARC&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Defines authentication policies.&lt;/p&gt;
&lt;p&gt;Together these technologies help reduce:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Email spoofing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Phishing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Domain impersonation&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In modern environments, email security is largely a DNS problem before it becomes an email problem.&lt;/p&gt;
&lt;h3 id=&quot;ns-record-explained&quot;&gt;&lt;strong&gt;NS Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;NS stands for:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Name Server&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;NS records define which nameservers hold authority over a domain.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN NS ns1.cloudflare.com
example.com IN NS ns2.cloudflare.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These records tell the internet:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;These servers contain the source of truth.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;why-ns-records-matter&quot;&gt;&lt;strong&gt;Why NS Records Matter&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Without NS records, the DNS hierarchy breaks.&lt;/p&gt;
&lt;p&gt;Resolvers would have no way of discovering where authoritative information lives.&lt;/p&gt;
&lt;p&gt;Every lookup ultimately depends on NS records.&lt;/p&gt;
&lt;p&gt;They form the bridge between domain ownership and DNS management.&lt;/p&gt;
&lt;h3 id=&quot;a-real-infrastructure-example&quot;&gt;&lt;strong&gt;A Real Infrastructure Example&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A domain may be registered through one provider.&lt;/p&gt;
&lt;p&gt;DNS may be hosted elsewhere.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Registrar:
Namecheap
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;DNS Provider:
Cloudflare
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;NS records connect those two systems.&lt;/p&gt;
&lt;h3 id=&quot;srv-record-explained&quot;&gt;&lt;strong&gt;SRV Record Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;SRV stands for:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Service Record&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;SRV records provide more information than a simple address.&lt;/p&gt;
&lt;p&gt;They specify:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Protocol&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Port&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Priority&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Weight&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;_sip._tcp.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;why-srv-records-exist&quot;&gt;&lt;strong&gt;Why SRV Records Exist&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many applications need more than an IP address.&lt;/p&gt;
&lt;p&gt;Examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SIP systems&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VoIP platforms&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Active Directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise applications&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gaming infrastructure&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;SRV records allow applications to discover services automatically.&lt;/p&gt;
&lt;p&gt;This reduces manual configuration and improves scalability.&lt;/p&gt;
&lt;h3 id=&quot;dns-records-every-modern-website-typically-uses&quot;&gt;&lt;strong&gt;DNS Records Every Modern Website Typically Uses&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A standard production setup often includes:&lt;/p&gt;
&lt;h3 id=&quot;website-access&quot;&gt;&lt;strong&gt;Website Access&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;A Record
CNAME Record
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;email-infrastructure&quot;&gt;&lt;strong&gt;Email Infrastructure&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;MX Record
SPF
DKIM
DMARC
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;security-and-verification&quot;&gt;&lt;strong&gt;Security and Verification&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;TXT Record
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;dns-authority&quot;&gt;&lt;strong&gt;DNS Authority&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;NS Record
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;dns-records-during-website-migrations&quot;&gt;&lt;strong&gt;DNS Records During Website Migrations&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Website migrations often fail because DNS planning is treated as an afterthought.&lt;/p&gt;
&lt;p&gt;Common mistakes include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Forgetting MX records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Removing TXT records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Incorrect TTL settings&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deleting verification records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Breaking email authentication&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Successful migrations involve auditing DNS before moving infrastructure.&lt;/p&gt;
&lt;h3 id=&quot;dns-records-and-search-visibility&quot;&gt;&lt;strong&gt;DNS Records and Search Visibility&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS records do not directly improve rankings.&lt;/p&gt;
&lt;p&gt;However, they influence systems that do.&lt;/p&gt;
&lt;p&gt;Reliable DNS supports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Website availability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search engine accessibility&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Email trust&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User experience&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Infrastructure reliability&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Poor DNS management can undermine otherwise excellent websites.&lt;/p&gt;
&lt;h3 id=&quot;quick-reference-table&quot;&gt;&lt;strong&gt;Quick Reference Table&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;GoalRecord TypeHost a WebsiteAEnable IPv6AAAACreate an AliasCNAMEReceive EmailMXVerify Domain OwnershipTXTConfigure SPFTXTConfigure DKIMTXTConfigure DMARCTXTDelegate DNS AuthorityNSDiscover ServicesSRV&lt;/p&gt;
&lt;h3 id=&quot;key-takeaways-1&quot;&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS records are the data layer of DNS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Records connect hostnames to IPv4 addresses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AAAA Records connect hostnames to IPv6 addresses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CNAME Records create aliases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MX Records control email routing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TXT Records power verification and security.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NS Records define authoritative nameservers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SRV Records support service discovery.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modern websites, cloud platforms, SaaS applications, and email systems depend on DNS records.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understanding DNS records helps prevent outages, improve reliability, and simplify infrastructure management.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/24396/dns-records-explained-aaaa-cname-mx-txt-ns-and-srv-records-modern-internet-infrastructur</guid>
<pubDate>Mon, 10 Aug 2026 16:35:02 +0000</pubDate>
</item>
<item>
<title>DNS Explained: The Complete Guide for Founders, Developers, and Modern Businesses</title>
<link>https://coderlegion.com/24303/dns-explained-the-complete-guide-for-founders-developers-and-modern-businesses</link>
<description>&lt;p&gt;Most people don’t think about DNS until something breaks.&lt;/p&gt;
&lt;p&gt;A founder launches a new website and suddenly email stops working.&lt;/p&gt;
&lt;p&gt;A developer migrates infrastructure and traffic starts disappearing.&lt;/p&gt;
&lt;p&gt;A marketing team changes a domain setting and the website becomes unreachable.&lt;/p&gt;
&lt;p&gt;A SaaS company adds custom domains and discovers that domain management is far more complicated than expected.&lt;/p&gt;
&lt;p&gt;The reality is simple:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DNS is one of the most critical systems on the internet, yet it’s one of the least understood.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Every website, API, SaaS platform, email service, mobile application, cloud platform, and online business depends on DNS.&lt;/p&gt;
&lt;p&gt;Google depends on DNS.&lt;/p&gt;
&lt;p&gt;Cloudflare depends on DNS.&lt;/p&gt;
&lt;p&gt;AWS depends on DNS.&lt;/p&gt;
&lt;p&gt;Your startup depends on DNS.&lt;/p&gt;
&lt;p&gt;And while DNS often appears simple from the outside, there is an incredible amount of engineering hidden beneath a single domain lookup.&lt;/p&gt;
&lt;p&gt;This article is designed for both founders and developers.&lt;/p&gt;
&lt;p&gt;If you’re a founder, you’ll understand how DNS impacts business continuity, SEO, security, email delivery, and customer experience.&lt;/p&gt;
&lt;p&gt;If you’re a developer, you’ll understand how DNS resolution actually works, why DNS records matter, how cloud platforms use DNS internally, and how production-grade systems are built around it.&lt;/p&gt;
&lt;p&gt;Let’s start at the beginning.&lt;/p&gt;
&lt;h3 id=&quot;what-is-dns-&quot;&gt;&lt;strong&gt;What Is DNS?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS stands for:&lt;/p&gt;
&lt;p&gt;Domain Name System&lt;/p&gt;
&lt;p&gt;The easiest explanation is:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;DNS translates human-friendly names into machine-friendly addresses.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Humans prefer:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;openai.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Computers prefer:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;104.18.33.45
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;DNS acts as the translation layer between those two worlds.&lt;/p&gt;
&lt;p&gt;Without DNS, every website visit would require memorizing numerical IP addresses.&lt;/p&gt;
&lt;p&gt;Instead of typing:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;google.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you would need to type something similar to:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;142.250.190.78
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for every website you wanted to visit.&lt;/p&gt;
&lt;p&gt;Clearly, that wouldn’t scale.&lt;/p&gt;
&lt;p&gt;DNS solves this problem by creating a globally distributed naming system.&lt;/p&gt;
&lt;h3 id=&quot;dns-is-the-internet-s-directory-service&quot;&gt;&lt;strong&gt;DNS Is the Internet’s Directory Service&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Imagine the internet as a massive city.&lt;/p&gt;
&lt;p&gt;Every building has a street address.&lt;/p&gt;
&lt;p&gt;Computers only understand addresses.&lt;/p&gt;
&lt;p&gt;Humans prefer names.&lt;/p&gt;
&lt;p&gt;DNS functions like a directory service that translates:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Company Name
        ↓
Street Address
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Domain Name
        ↓
IP Address
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The idea sounds simple.&lt;/p&gt;
&lt;p&gt;The engineering required to make this work globally, reliably, and within milliseconds is not.&lt;/p&gt;
&lt;h3 id=&quot;why-founders-should-care-about-dns&quot;&gt;&lt;strong&gt;Why Founders Should Care About DNS&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many founders think DNS is purely a technical concern.&lt;/p&gt;
&lt;p&gt;That’s a mistake.&lt;/p&gt;
&lt;p&gt;DNS directly affects:&lt;/p&gt;
&lt;h3 id=&quot;website-availability&quot;&gt;&lt;strong&gt;Website Availability&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;If DNS fails:&lt;/p&gt;
&lt;p&gt;Your website disappears.&lt;/p&gt;
&lt;p&gt;Not slow.&lt;/p&gt;
&lt;p&gt;Not degraded.&lt;/p&gt;
&lt;p&gt;Gone.&lt;/p&gt;
&lt;p&gt;Users can’t reach it.&lt;/p&gt;
&lt;p&gt;Search engines can’t crawl it.&lt;/p&gt;
&lt;p&gt;Customers can’t buy from it.&lt;/p&gt;
&lt;h3 id=&quot;email-delivery&quot;&gt;&lt;strong&gt;Email Delivery&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many businesses discover DNS only after email breaks.&lt;/p&gt;
&lt;p&gt;DNS controls:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Google Workspace&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Microsoft 365&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Zoho Mail&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom email servers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A single DNS mistake can prevent:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Sales emails&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customer support&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Password resets&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transactional notifications&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;from reaching users.&lt;/p&gt;
&lt;h3 id=&quot;seo-performance&quot;&gt;&lt;strong&gt;SEO Performance&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS impacts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Availability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Website speed&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Crawlability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User experience&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Search engines cannot rank websites they cannot consistently access.&lt;/p&gt;
&lt;h3 id=&quot;brand-trust&quot;&gt;&lt;strong&gt;Brand Trust&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Imagine a customer visiting:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;yourbusiness.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and seeing:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;This site can't be reached
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Trust disappears instantly.&lt;/p&gt;
&lt;p&gt;DNS is part of your brand infrastructure.&lt;/p&gt;
&lt;h3 id=&quot;why-developers-must-understand-dns&quot;&gt;&lt;strong&gt;Why Developers Must Understand DNS&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Modern development isn’t just writing code.&lt;/p&gt;
&lt;p&gt;Today developers manage:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;APIs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud infrastructure&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Containers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Load balancers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSL certificates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SaaS platforms&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multi-region deployments&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DNS sits in the middle of all of them.&lt;/p&gt;
&lt;p&gt;A surprising number of production incidents ultimately trace back to DNS.&lt;/p&gt;
&lt;p&gt;Understanding DNS turns infrastructure troubleshooting from guesswork into engineering.&lt;/p&gt;
&lt;h3 id=&quot;the-dns-resolution-process&quot;&gt;&lt;strong&gt;The DNS Resolution Process&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;When a user enters:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;inside a browser, what actually happens?&lt;/p&gt;
&lt;p&gt;Most people imagine:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Browser
    ↓
Website
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reality is significantly more complex.&lt;/p&gt;
&lt;h3 id=&quot;step-1-browser-cache&quot;&gt;&lt;strong&gt;Step 1: Browser Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The browser first asks:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Have I looked up this domain recently?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If yes:&lt;/p&gt;
&lt;p&gt;The browser already knows the answer.&lt;/p&gt;
&lt;p&gt;No external DNS request is needed.&lt;/p&gt;
&lt;p&gt;The website loads immediately.&lt;/p&gt;
&lt;p&gt;This is called DNS caching.&lt;/p&gt;
&lt;h3 id=&quot;step-2-operating-system-cache&quot;&gt;&lt;strong&gt;Step 2: Operating System Cache&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;If the browser doesn’t know the answer, it asks the operating system.&lt;/p&gt;
&lt;p&gt;Windows, Linux, macOS, Android, and iOS maintain DNS caches.&lt;/p&gt;
&lt;p&gt;Again:&lt;/p&gt;
&lt;p&gt;If the answer exists locally, the process ends here.&lt;/p&gt;
&lt;h3 id=&quot;step-3-recursive-resolver&quot;&gt;&lt;strong&gt;Step 3: Recursive Resolver&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;If no cached answer exists, the request reaches a recursive DNS resolver.&lt;/p&gt;
&lt;p&gt;Examples include:&lt;/p&gt;
&lt;p&gt;Cloudflare DNS:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;1.1.1.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Google DNS:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;8.8.8.8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your ISP’s DNS servers.&lt;/p&gt;
&lt;p&gt;The resolver’s job is:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Find the answer on behalf of the user.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;step-4-root-nameservers&quot;&gt;&lt;strong&gt;Step 4: Root Nameservers&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The resolver begins at the top of the DNS hierarchy.&lt;/p&gt;
&lt;p&gt;The internet contains root DNS servers.&lt;/p&gt;
&lt;p&gt;These servers don’t know the IP address of every website.&lt;/p&gt;
&lt;p&gt;Instead they know:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Which servers are responsible for top-level domains.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;.com
.org
.net
.io
.dev
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;step-5-top-level-domain-servers&quot;&gt;&lt;strong&gt;Step 5: Top-Level Domain Servers&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Suppose you’re looking for:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The root server responds:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Ask the .com nameservers.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The resolver now contacts the .com infrastructure.&lt;/p&gt;
&lt;h3 id=&quot;step-6-authoritative-nameservers&quot;&gt;&lt;strong&gt;Step 6: Authoritative Nameservers&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The .com servers respond:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;The authoritative DNS servers for&lt;/em&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://example.com&quot;&gt;&lt;em&gt;example.com&lt;/em&gt;&lt;/a&gt; &lt;em&gt;are located here.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now the resolver knows exactly where to find the truth.&lt;/p&gt;
&lt;h3 id=&quot;step-7-final-answer&quot;&gt;&lt;strong&gt;Step 7: Final Answer&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The authoritative DNS server returns:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The resolver caches the answer.&lt;/p&gt;
&lt;p&gt;The browser receives the answer.&lt;/p&gt;
&lt;p&gt;The website loads.&lt;/p&gt;
&lt;p&gt;All of this often happens in less than 100 milliseconds.&lt;/p&gt;
&lt;h3 id=&quot;the-dns-hierarchy&quot;&gt;&lt;strong&gt;The DNS Hierarchy&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS is not a giant database.&lt;/p&gt;
&lt;p&gt;It’s a distributed hierarchy.&lt;/p&gt;
&lt;p&gt;Think of it as:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Root
 ├── .com
 ├── .org
 ├── .net
 ├── .io
 └── .dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Under each TLD:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com
openai.com
github.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Under each domain:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com
api.example.com
mail.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This hierarchical design is one reason DNS scales globally.&lt;/p&gt;
&lt;h3 id=&quot;understanding-dns-records&quot;&gt;&lt;strong&gt;Understanding DNS Records&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS records are instructions.&lt;/p&gt;
&lt;p&gt;Different record types solve different problems.&lt;/p&gt;
&lt;p&gt;Understanding them is essential for production systems.&lt;/p&gt;
&lt;h3 id=&quot;a-record&quot;&gt;&lt;strong&gt;A Record&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Maps a hostname to an IPv4 address.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com. IN A 203.0.113.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the most common DNS record.&lt;/p&gt;
&lt;h3 id=&quot;aaaa-record&quot;&gt;&lt;strong&gt;AAAA Record&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Maps a hostname to an IPv6 address.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com. IN AAAA 2001:db8::1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;IPv6 adoption continues growing across cloud providers and ISPs.&lt;/p&gt;
&lt;h3 id=&quot;cname-record&quot;&gt;&lt;strong&gt;CNAME Record&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Creates an alias.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;www.example.com IN CNAME example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Useful when multiple hostnames point to the same service.&lt;/p&gt;
&lt;h3 id=&quot;mx-record&quot;&gt;&lt;strong&gt;MX Record&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Controls email routing.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN MX 10 mail.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Without MX records:&lt;/p&gt;
&lt;p&gt;Email fails.&lt;/p&gt;
&lt;h3 id=&quot;txt-records&quot;&gt;&lt;strong&gt;TXT Records&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One of the most versatile DNS record types.&lt;/p&gt;
&lt;p&gt;Used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Domain verification&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SPF&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DKIM&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DMARC&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Third-party integrations&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Founders often encounter TXT records when connecting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Google Workspace&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Microsoft 365&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search Console&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud providers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ns-records&quot;&gt;&lt;strong&gt;NS Records&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;NS records define authoritative nameservers.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;example.com IN NS ns1.provider.com
example.com IN NS ns2.provider.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These servers become responsible for your DNS zone.&lt;/p&gt;
&lt;h3 id=&quot;why-dns-propagation-takes-time&quot;&gt;&lt;strong&gt;Why DNS Propagation Takes Time&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One of the most common questions:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Why isn’t my DNS change working?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Usually because of caching.&lt;/p&gt;
&lt;h3 id=&quot;understanding-ttl&quot;&gt;&lt;strong&gt;Understanding TTL&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;TTL means:&lt;/p&gt;
&lt;p&gt;Time To Live&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;TTL = 3600
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This means:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Cache for 1 hour
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Resolvers keep answers cached until TTL expires.&lt;/p&gt;
&lt;h3 id=&quot;the-truth-about-dns-propagation&quot;&gt;&lt;strong&gt;The Truth About DNS Propagation&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS doesn’t actually “spread” changes.&lt;/p&gt;
&lt;p&gt;Resolvers simply stop trusting cached data and ask again.&lt;/p&gt;
&lt;p&gt;This process creates the appearance of propagation.&lt;/p&gt;
&lt;p&gt;Understanding this distinction helps developers troubleshoot DNS issues more effectively.&lt;/p&gt;
&lt;h3 id=&quot;dns-and-website-performance&quot;&gt;&lt;strong&gt;DNS and Website Performance&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS is the first network request most users make.&lt;/p&gt;
&lt;p&gt;Before:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HTML&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;APIs&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DNS must succeed.&lt;/p&gt;
&lt;p&gt;Slow DNS creates slower websites.&lt;/p&gt;
&lt;h3 id=&quot;measuring-dns-performance&quot;&gt;&lt;strong&gt;Measuring DNS Performance&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Common metrics include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS lookup time&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TTFB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Latency&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Availability&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A slow DNS provider adds measurable delays before page rendering begins.&lt;/p&gt;
&lt;h3 id=&quot;dns-and-seo&quot;&gt;&lt;strong&gt;DNS and SEO&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Many SEO guides barely discuss DNS.&lt;/p&gt;
&lt;p&gt;That’s unfortunate because DNS indirectly impacts search performance.&lt;/p&gt;
&lt;h3 id=&quot;availability-matters&quot;&gt;&lt;strong&gt;Availability Matters&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Search engines need consistent access.&lt;/p&gt;
&lt;p&gt;If DNS failures occur:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Crawling suffers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Indexing suffers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rankings may suffer&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;performance-matters&quot;&gt;&lt;strong&gt;Performance Matters&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Google increasingly rewards user experience.&lt;/p&gt;
&lt;p&gt;Fast DNS contributes to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Faster page loads&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better engagement&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved performance metrics&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;reliability-matters&quot;&gt;&lt;strong&gt;Reliability Matters&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Enterprise-grade DNS infrastructure improves uptime.&lt;/p&gt;
&lt;p&gt;Uptime improves trust.&lt;/p&gt;
&lt;p&gt;Trust improves long-term search visibility.&lt;/p&gt;
&lt;h3 id=&quot;dns-and-geo-generative-engine-optimization-&quot;&gt;&lt;strong&gt;DNS and GEO (Generative Engine Optimization)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A new challenge is emerging.&lt;/p&gt;
&lt;p&gt;Users increasingly discover businesses through AI systems.&lt;/p&gt;
&lt;p&gt;Large language models, AI search engines, and answer engines rely heavily on accessible infrastructure.&lt;/p&gt;
&lt;p&gt;Reliable DNS contributes to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Consistent crawling&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better accessibility&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reliable content retrieval&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As GEO evolves, infrastructure quality becomes increasingly important.&lt;/p&gt;
&lt;h3 id=&quot;dns-security-explained&quot;&gt;&lt;strong&gt;DNS Security Explained&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS is also a major attack surface.&lt;/p&gt;
&lt;h3 id=&quot;dns-spoofing&quot;&gt;&lt;strong&gt;DNS Spoofing&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Attackers attempt to redirect users toward malicious destinations.&lt;/p&gt;
&lt;p&gt;The victim enters:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;bank.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but reaches:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;attacker-site.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;without realizing it.&lt;/p&gt;
&lt;h3 id=&quot;dns-cache-poisoning&quot;&gt;&lt;strong&gt;DNS Cache Poisoning&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Attackers inject false DNS responses into caches.&lt;/p&gt;
&lt;p&gt;Users receive incorrect answers.&lt;/p&gt;
&lt;p&gt;This can lead to phishing and credential theft.&lt;/p&gt;
&lt;h3 id=&quot;dnssec&quot;&gt;&lt;strong&gt;DNSSEC&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNSSEC adds cryptographic signatures.&lt;/p&gt;
&lt;p&gt;Benefits include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Authenticity&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integrity&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Protection against spoofing&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DNSSEC doesn’t encrypt DNS.&lt;/p&gt;
&lt;p&gt;It verifies DNS.&lt;/p&gt;
&lt;p&gt;That’s an important distinction.&lt;/p&gt;
&lt;h3 id=&quot;email-authentication-and-dns&quot;&gt;&lt;strong&gt;Email Authentication and DNS&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Email security relies heavily on DNS.&lt;/p&gt;
&lt;p&gt;Three records are especially important.&lt;/p&gt;
&lt;h3 id=&quot;spf-1&quot;&gt;&lt;strong&gt;SPF&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Defines which servers can send email.&lt;/p&gt;
&lt;h3 id=&quot;dkim-1&quot;&gt;&lt;strong&gt;DKIM&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Provides cryptographic email signatures.&lt;/p&gt;
&lt;h3 id=&quot;dmarc-1&quot;&gt;&lt;strong&gt;DMARC&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Defines enforcement policies.&lt;/p&gt;
&lt;p&gt;Together they reduce:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Spoofing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Phishing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Email fraud&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;how-cloud-providers-use-dns&quot;&gt;&lt;strong&gt;How Cloud Providers Use DNS&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Cloud infrastructure relies heavily on DNS.&lt;/p&gt;
&lt;p&gt;AWS.&lt;/p&gt;
&lt;p&gt;Azure.&lt;/p&gt;
&lt;p&gt;Google Cloud.&lt;/p&gt;
&lt;p&gt;Cloudflare.&lt;/p&gt;
&lt;p&gt;DigitalOcean.&lt;/p&gt;
&lt;p&gt;All use DNS extensively.&lt;/p&gt;
&lt;h3 id=&quot;load-balancing&quot;&gt;&lt;strong&gt;Load Balancing&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DNS can distribute traffic.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;app.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;might resolve to multiple servers.&lt;/p&gt;
&lt;p&gt;Benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scalability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redundancy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reliability&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;geographic-routing&quot;&gt;&lt;strong&gt;Geographic Routing&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Users in Singapore may reach Asian infrastructure.&lt;/p&gt;
&lt;p&gt;Users in Germany may reach European infrastructure.&lt;/p&gt;
&lt;p&gt;Users in New York may reach US infrastructure.&lt;/p&gt;
&lt;p&gt;DNS can make these routing decisions automatically.&lt;/p&gt;
&lt;h3 id=&quot;dns-for-saas-applications&quot;&gt;&lt;strong&gt;DNS for SaaS Applications&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This is where things become particularly interesting.&lt;/p&gt;
&lt;p&gt;Suppose you’re building a SaaS platform.&lt;/p&gt;
&lt;p&gt;Your customers want:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;client-company.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of:&lt;/p&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;client.yourapp.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This requires custom domain support.&lt;/p&gt;
&lt;p&gt;Custom domain support requires DNS verification.&lt;/p&gt;
&lt;p&gt;DNS verification requires ownership validation.&lt;/p&gt;
&lt;p&gt;DNS becomes part of your product architecture.&lt;/p&gt;
&lt;p&gt;Many SaaS founders underestimate this complexity.&lt;/p&gt;
&lt;h3 id=&quot;common-dns-mistakes-in-production&quot;&gt;&lt;strong&gt;Common DNS Mistakes in Production&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Over the years, the same mistakes appear repeatedly.&lt;/p&gt;
&lt;h3 id=&quot;deleting-records-accidentally&quot;&gt;&lt;strong&gt;Deleting Records Accidentally&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Migration projects frequently break email because MX records were forgotten.&lt;/p&gt;
&lt;h3 id=&quot;ignoring-ttl&quot;&gt;&lt;strong&gt;Ignoring TTL&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Developers make changes expecting instant results.&lt;/p&gt;
&lt;p&gt;DNS doesn’t work that way.&lt;/p&gt;
&lt;h3 id=&quot;no-dns-monitoring&quot;&gt;&lt;strong&gt;No DNS Monitoring&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Businesses discover outages from customers instead of monitoring systems.&lt;/p&gt;
&lt;h3 id=&quot;no-redundancy&quot;&gt;&lt;strong&gt;No Redundancy&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Single-provider DNS creates unnecessary risk.&lt;/p&gt;
&lt;h3 id=&quot;missing-email-security-records&quot;&gt;&lt;strong&gt;Missing Email Security Records&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;SPF, DKIM, and DMARC are often ignored until deliverability problems appear.&lt;/p&gt;
&lt;h3 id=&quot;practical-dns-tools-every-developer-should-know&quot;&gt;&lt;strong&gt;Practical DNS Tools Every Developer Should Know&lt;/strong&gt;&lt;/h3&gt;
&lt;h3 id=&quot;dig&quot;&gt;&lt;strong&gt;dig&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;dig example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The gold standard for DNS troubleshooting.&lt;/p&gt;
&lt;h3 id=&quot;nslookup&quot;&gt;&lt;strong&gt;nslookup&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;nslookup example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Widely available across operating systems.&lt;/p&gt;
&lt;h3 id=&quot;host&quot;&gt;&lt;strong&gt;host&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;host example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Quick and simple DNS lookups.&lt;/p&gt;
&lt;h3 id=&quot;whois&quot;&gt;&lt;strong&gt;whois&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;code&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;whois example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Useful for domain ownership and registration information.&lt;/p&gt;
&lt;h3 id=&quot;key-takeaways-2&quot;&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS is the internet’s naming system.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every website, API, email service, and cloud platform relies on DNS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS translates domain names into IP addresses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS is hierarchical and globally distributed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS records control websites, email, security, and service routing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS impacts performance, reliability, SEO, and user experience.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNSSEC improves DNS trust and authenticity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SaaS applications often depend heavily on DNS architecture.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understanding DNS is valuable for founders and essential for developers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;final-thoughts&quot;&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The best infrastructure is often invisible.&lt;/p&gt;
&lt;p&gt;Users never think about DNS when everything works.&lt;/p&gt;
&lt;p&gt;Yet every successful online business depends on it.&lt;/p&gt;
&lt;p&gt;Founders view DNS as a domain setting.&lt;/p&gt;
&lt;p&gt;Developers eventually realize it’s a foundational internet protocol.&lt;/p&gt;
&lt;p&gt;The deeper you go into cloud architecture, distributed systems, SaaS platforms, cybersecurity, and modern software engineering, the more often you’ll encounter DNS.&lt;/p&gt;
&lt;p&gt;Understanding DNS isn’t just about configuring records.&lt;/p&gt;
&lt;p&gt;It’s about understanding how the internet itself finds, trusts, and connects systems together.&lt;/p&gt;
&lt;p&gt;And once you understand that, you’ll start seeing DNS everywhere.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/24303/dns-explained-the-complete-guide-for-founders-developers-and-modern-businesses</guid>
<pubDate>Sat, 08 Aug 2026 17:06:27 +0000</pubDate>
</item>
<item>
<title>Your domain can expire while your uptime monitor stays green</title>
<link>https://coderlegion.com/24097/your-domain-can-expire-while-your-uptime-monitor-stays-green</link>
<description>&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;TL;DR.&lt;/strong&gt; One HTTP check on your homepage is not enough to know your site works. It cannot tell you when your domain expires, because an expired domain still returns 200 OK from a parking page. Mail dies at the same time, just as quietly, and you keep losing money while every monitor stays green. The fix is not one clever check. It is a few plain ones, starting with the two that fail on a known date: domain and TLS expiry.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Two checks green, the server behind them is down. A status check cannot tell the difference.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I keep seeing new products treat reliability as something that takes care of itself. You ship the site, you watch it load once, and you assume it will keep loading. Hosted once, up forever. That is the most expensive assumption a young team can make, because nobody is watching on the day it stops being true.&lt;/p&gt;
&lt;p&gt;So ask one honest question. Is one HTTP check on your homepage enough to know your whole site works?&lt;/p&gt;
&lt;p&gt;For most teams it is not. Here is a real case that shows why.&lt;/p&gt;
&lt;h3 id=&quot;the-site-was-gone-but-it-answered-200-ok&quot;&gt;The site was gone, but it answered 200 OK&lt;/h3&gt;
&lt;p&gt;I was looking at a startup's site last week and it would not load right. Not an error, not a timeout, just the wrong page. The domain had expired two days earlier.&lt;/p&gt;
&lt;p&gt;When a domain lapses, the registrar does not switch the site off. It points the domain at its own parking page, the &quot;this domain may be for sale&quot; one. That page is a normal web page. It returns &lt;code&gt;200 OK&lt;/code&gt; and loads fast. It stays that way for a while too, because an expired domain is not deleted the next morning.&lt;/p&gt;
&lt;p&gt;So the monitor sees a healthy site. Green light, no alert, everyone asleep. What could be wrong?&lt;/p&gt;
&lt;p&gt;Your domain expired. You knew the date once, on the day you bought it a year or two ago. You told yourself you would renew closer to the time, and then you forgot. The card on file lapsed, or the reminder went to an inbox you no longer read.&lt;/p&gt;
&lt;p&gt;Now your customers cannot get in. They panic. They email to ask whether you are still in business. And they get no answer, because the mail died with the domain too.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Why the mail dies with it&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The registration carries your MX records, so when it lapses, mail to every address on the domain starts bouncing. The website looks up and the inbox goes silent, and the two failures do not obviously connect. That is why the angry email never reaches you.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;The front page still answers. Behind it, nothing is running.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And the meter keeps running. While the page says 200, your ads keep sending paid clicks to a parking lander, signups never arrive, and recovery is not fully in your hands. Two days down is not a rounding error either, because &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/blog/is-98-uptime-good?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=domain-expiry&amp;amp;utm_content=inline&quot;&gt;downtime adds up faster than the percentages suggest&lt;/a&gt;. Once a domain enters redemption after expiry, getting it back can cost far more than a renewal, and the registry sets the clock, not you.&lt;/p&gt;
&lt;h3 id=&quot;the-clock-after-expiry&quot;&gt;The clock after expiry&lt;/h3&gt;
&lt;p&gt;For a gTLD like a .com, the sequence is roughly this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Grace period.&lt;/strong&gt; The registrar parks the domain. The site is gone but the name still answers, usually for around 30 days, and a normal renewal still works.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redemption, 30 days.&lt;/strong&gt; Now it really goes dark. You can still get it back, but through a restore fee that is many times the renewal price.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pending delete, about 5 days.&lt;/strong&gt; Nothing you can do. At the end it drops to whoever is waiting.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;ICANN's &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.icann.org/resources/pages/domain-name-renewal-expiration-faqs-2018-12-07-en&quot;&gt;renewal and expiration FAQ&lt;/a&gt; and its &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.icann.org/resources/pages/grace-2013-05-03-en&quot;&gt;grace period notes&lt;/a&gt; have the exact stages. The practical takeaway is that the first month, the one where an uptime monitor is happily reporting 200, is the cheap month. Everything after that costs money or the domain.&lt;/p&gt;
&lt;h3 id=&quot;my-own-uptime-check-would-miss-it-too&quot;&gt;My own uptime check would miss it too&lt;/h3&gt;
&lt;p&gt;I build an uptime monitor, so here is the uncomfortable part. My own HTTP check would have called that dead site up too. A 200 is a 200. A status-code check cannot tell a real page from a parking page, and it should not pretend that it can.&lt;/p&gt;
&lt;p&gt;That is the trap. One HTTP check on the homepage, the most common setup there is, is blind by design. The site answers, the code is green, and the part that pays your bills is broken behind it.&lt;/p&gt;
&lt;p&gt;You can bolt on body matching, and it helps a bit. Assert that the response contains a string only your app renders, and a parking page fails it. But a keyword check is still guessing at the cause after the fact. The registration date is a fact you can read months in advance, so read it.&lt;/p&gt;
&lt;h3 id=&quot;one-check-is-not-enough-set-up-several&quot;&gt;One check is not enough, set up several&lt;/h3&gt;
&lt;p&gt;So how do you avoid reading about your own outage in a customer's email? Not with one cleverer check. With a few plain ones, each watching a different way to fail. Start with the two that hand you a date instead of a surprise.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Domain expiry.&lt;/strong&gt; Reads the registration record and warns you weeks before the day it lapses.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TLS certificate expiry.&lt;/strong&gt; The same shape, a full outage with the date printed on it in advance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then cover the failures a homepage check never sees: a TCP check on your database port, a DNS check that reads the answer from outside your own network, and a heartbeat for the backup job that dies without a sound. The full list is in &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/blog/do-i-need-an-uptime-monitor?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=domain-expiry&amp;amp;utm_content=inline&quot;&gt;do I need an uptime monitor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Six checks you trust beat one that only ever watches the front door.&lt;/p&gt;
&lt;h3 id=&quot;how-to-set-up-domain-expiry-with-an-alert&quot;&gt;How to set up domain expiry with an alert&lt;/h3&gt;
&lt;p&gt;Two minutes now buys you weeks of warning later. The shape is the same in any tool that supports it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a monitor and choose the &lt;strong&gt;Domain expiry&lt;/strong&gt; type.&lt;/li&gt;
&lt;li&gt;Enter the registered domain, for example &lt;code&gt;yourbusiness.com&lt;/code&gt;, not a subdomain.&lt;/li&gt;
&lt;li&gt;Set the thresholds in days. A common choice is a warning at 30 days and a critical alert at 7.&lt;/li&gt;
&lt;li&gt;Attach a notification channel you actually read. Telegram, Slack, PagerDuty, SMS, a webhook, or email all work. Pick the one that reaches you at night.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From then on it checks once a day, warns you when the date crosses your line, and reminds you as it gets close. No page-watching, no false green.&lt;/p&gt;
&lt;p&gt;If you would rather not add a service for it, a cron job that runs &lt;code&gt;whois&lt;/code&gt; and greps the expiry date will get you most of the way. The point is the date, not the tool. What you must not do is leave the only reminder in a registrar email going to a founder's old inbox.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Key takeaways&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One HTTP check on the homepage is not enough. It stays green while the domain, the certificate, DNS, or a background job is broken.&lt;/li&gt;
&lt;li&gt;An expired domain serves a parking page that returns 200 OK, so status-code monitors report it as healthy.&lt;/li&gt;
&lt;li&gt;Email dies at the same time and even more quietly, because the MX records lapse with the registration.&lt;/li&gt;
&lt;li&gt;You keep losing money the whole time: paid clicks to a dead page, lost signups, and a slow, costly recovery.&lt;/li&gt;
&lt;li&gt;Add the checks that fail on a known date first, domain and TLS expiry, then the rest.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;common-questions&quot;&gt;Common questions&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Why does an expired domain still return 200 OK?&lt;/strong&gt; The registrar parks it on a lander page instead of taking it offline. The old server is gone, but the parking page is a real web page that answers normally, so a check that only reads the status code sees success.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How long before an expired domain is gone for good?&lt;/strong&gt; You usually get a month or two. Grace period, then a 30-day redemption where the site is dark but recoverable for a fee, then a short pending-delete stage before it is released to anyone.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What else breaks when a domain expires?&lt;/strong&gt; Your email, at the same moment and more quietly. The MX records go with the registration, so mail starts bouncing while you are still looking at a page that loads.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Is a keyword check enough instead?&lt;/strong&gt; It catches the parking page, which is better than nothing, but only once you are already down. The expiry date is knowable months ahead. Use both if you like, but do not skip the date.&lt;/p&gt;
&lt;p&gt;I build &lt;a rel=&quot;nofollow&quot; href=&quot;https://uptimepage.dev/?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=domain-expiry&amp;amp;utm_content=cta&quot;&gt;Uptimepage&lt;/a&gt; because I wanted checks like this for my own services: domain and TLS expiry, HTTP, TCP, ping and DNS, heartbeats for background jobs, and browser flows for logins, from several regions. It is AGPL-3.0 open source, so you can run it on your own server if you prefer.&lt;/p&gt;
&lt;p&gt;Now the question I actually want answered in the comments: what is the dumbest green check you have been burned by? I have seen a health endpoint that returned 200 with a hardcoded &lt;code&gt;{&quot;status&quot;:&quot;ok&quot;}&lt;/code&gt; while the database behind it was unreachable for six hours. I suspect yours is better.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/24097/your-domain-can-expire-while-your-uptime-monitor-stays-green</guid>
<pubDate>Tue, 04 Aug 2026 14:19:13 +0000</pubDate>
</item>
<item>
<title>Network Performance for Web Teams: DNS, TLS, HTTP, CDN, and Cache Rules</title>
<link>https://coderlegion.com/22845/network-performance-for-web-teams-dns-tls-http-cdn-and-cache-rules</link>
<description>&lt;p&gt;A PageSpeed Insights run flags a high Time to First Byte. The ticket lands on the theme backlog. Hosting gets upgraded. A CDN is added. The next lab run still shows a slow first byte on the same priority URL. In our experience the miss is often earlier in the path: DNS, TLS, HTTP version, connection reuse, edge routing, or cache policy. Theme and plugin work still matter, but they sit after the network and delivery stack has done its job. If first byte is already late, paint and interactivity inherit that delay.&lt;/p&gt;&lt;p&gt;What follows walks that request in order for teams who need to reduce TTFB before another theme rewrite. We stay on the network and delivery layers. For WordPress cases where code on the stack beats a bigger hosting plan, see &lt;a rel=&quot;nofollow&quot; href=&quot;https://apogeewatcher.com/blog/wordpress-site-slow-not-always-hosting&quot;&gt;Why Your WordPress Site Is Slow (It Is Not Always Hosting)&lt;/a&gt;. For LCP levers once first byte is under control, see &lt;a rel=&quot;nofollow&quot; href=&quot;https://apogeewatcher.com/blog/quick-way-to-fix-lcp&quot;&gt;A Quick Way to Fix LCP: Four Changes That Cut Time to Paint&lt;/a&gt;.&lt;/p&gt;&lt;h2 id=&quot;what-ttfb-includes-when-you-measure-first-byte-in-lab-tools&quot; class=&quot;scroll-mt-24&quot;&gt;What TTFB includes when you measure first byte in lab tools&lt;/h2&gt;&lt;p&gt;Time to First Byte (TTFB) measures how long the browser waits from the start of the navigation request until the first byte of the response arrives. In &lt;a rel=&quot;nofollow&quot; href=&quot;https://pagespeed.web.dev/&quot;&gt;PageSpeed Insights&lt;/a&gt; and Lighthouse, it appears as a diagnostic timing. In WebPageTest and similar waterfall tools, you can split the same wait into DNS, TCP connect, TLS, and waiting (server or edge processing). That split is what makes network work actionable for delivery teams.&lt;/p&gt;&lt;p&gt;TTFB is not a &lt;a rel=&quot;nofollow&quot; href=&quot;https://apogeewatcher.com/blog/what-are-core-web-vitals-a-practical-guide-for-2026&quot;&gt;Core Web Vital&lt;/a&gt;, but it feeds Largest Contentful Paint and overall load feel. A page that spends 800 ms waiting for first byte has already used a large share of a mobile LCP budget before the hero image or heading can paint. Field data from Chrome UX Report may show Time to First Byte as a supporting metric. Lab tools remain the fastest way to prove a DNS or CDN change after a release, because you control the URL, location, and cache state of the run.&lt;/p&gt;&lt;p&gt;When you read TTFB in a report, ask which hop dominated. Resolver delay looks different from a cold TLS handshake. A cache miss at the CDN looks different from an origin that regenerates HTML on every request. The sections below map each hop to what you change and what you re-test on the same priority URL.&lt;/p&gt;&lt;h2 id=&quot;how-dns-lookup-performance-affects-first-byte&quot; class=&quot;scroll-mt-24&quot;&gt;How DNS lookup performance affects first byte&lt;/h2&gt;&lt;p&gt;Before any TLS or HTTP work starts, the client must resolve the hostname. DNS lookup performance is the time from query to answer. On a cold visit with an empty cache, that cost sits at the front of TTFB. On a warm visit with a cached answer inside TTL, the lookup may be near zero and the problem moves downstream to connect, TLS, or waiting.&lt;/p&gt;&lt;p&gt;Common DNS causes of slow first byte:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Cause&lt;/th&gt;&lt;th&gt;What you see&lt;/th&gt;&lt;th&gt;Practical fix&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Slow or distant resolver path&lt;/td&gt;&lt;td&gt;High DNS ms in WebPageTest before connect&lt;/td&gt;&lt;td&gt;Prefer resolvers and authoritative DNS with low latency for your audience regions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Long CNAME chains&lt;/td&gt;&lt;td&gt;Extra lookups before the final A/AAAA&lt;/td&gt;&lt;td&gt;Flatten CNAMEs where the CDN or DNS vendor allows it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Very short TTL with frequent expiry&lt;/td&gt;&lt;td&gt;Repeated lookups on every cold session&lt;/td&gt;&lt;td&gt;Raise TTL for stable records once cutovers are rare&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Geo DNS mis-routing&lt;/td&gt;&lt;td&gt;Fast DNS, wrong PoP or origin later&lt;/td&gt;&lt;td&gt;Align geo policies with real user regions, not office Wi-Fi&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Do not treat “add a CDN” as a DNS fix by itself. The CDN hostname still needs clean resolution. After any nameserver, record, or CNAME change, run lab tests from more than one region on the same priority URL. A London-only pass can hide resolver pain for users in another continent. Document the DNS owner per client (registrar, Cloudflare, Route 53, hosting DNS), because ownership confusion often delays the one change that would cut cold-start TTFB more than another plugin audit.&lt;/p&gt;&lt;h2 id=&quot;how-tls-handshake-timing-shows-up-in-web-ttfb&quot; class=&quot;scroll-mt-24&quot;&gt;How TLS handshake timing shows up in web TTFB&lt;/h2&gt;&lt;p&gt;After TCP connect, the TLS handshake establishes a secure session. TLS handshake cost on the web includes certificate validation, key exchange, and optional stapled OCSP data. TLS 1.3 shortens the handshake compared with older versions. Session resumption and TLS tickets reduce work on repeat connections to the same host.&lt;/p&gt;&lt;p&gt;When TLS shows up as a TTFB problem:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;The certificate chain is incomplete or forces extra round trips to fetch intermediates.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The edge or origin still offers TLS 1.2 only, or a weak cipher suite set that clients negotiate poorly.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;OCSP stapling is missing and clients block while checking revocation.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Every asset subdomain forces a fresh handshake because connection reuse and HTTP/2 multiplexing never kick in.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Fixes are usually platform configuration, not theme code: enable TLS 1.3 at the edge, staple OCSP, serve a complete chain, and consolidate hosts so the browser can reuse connections. After certificate renewals or CDN SSL mode changes (flexible versus full), re-run lab tests. A misconfigured SSL mode can add redirects that look like “slow TTFB” in a single waterfall row.&lt;/p&gt;&lt;p&gt;Keep handshake tuning separate from application latency. A perfect TLS setup still waits on an origin that takes 1.5 seconds to build HTML. Use the waterfall: if TLS is 40 ms and Waiting is 900 ms, move to CDN and cache rules next instead of chasing another certificate setting.&lt;/p&gt;&lt;h2 id=&quot;how-http2-http3-and-connection-setup-affect-ttfb&quot; class=&quot;scroll-mt-24&quot;&gt;How HTTP/2, HTTP/3, and connection setup affect TTFB&lt;/h2&gt;&lt;p&gt;HTTP version choice changes how requests share connections. HTTP/2 multiplexes many streams over one TLS connection and removes most head-of-line blocking at the HTTP layer. HTTP/3 runs over QUIC and can reduce connection setup cost on lossy mobile networks, with different trade-offs for middleboxes and debugging. Monitoring nuances for HTTP/2 and HTTP/3 belong in a later industry piece. The operational question here is simpler: is the edge speaking a modern protocol to real browsers, and are you wasting connections on cold handshakes?&lt;/p&gt;&lt;p&gt;Connection setup details that still matter for TTFB:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Keep-alive and connection reuse: cold connects pay DNS, TCP, and TLS again; warm navigations on the same origin should reuse.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Preconnect: use it for third-party or CDN hosts that must be ready before LCP work; do not spray preconnect across every tag manager domain.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Connection limits: too many distinct origins fragment work and multiply handshakes.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Origin versus edge: browsers talk to the CDN hostname; the CDN opens or reuses a connection to origin on miss. Origin shield and keep-alive between PoP and origin cut repeated cold connects on miss paths.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If lab tests from a single region look fine but mobile field users complain, check whether HTTP/3 is enabled at the edge and whether your synthetic tool’s protocol path matches what Chrome does for that audience. Protocol upgrades rarely fix a 2-second origin render. They do remove avoidable setup cost when you are chasing the last few hundred milliseconds of TTFB on an otherwise healthy document response.&lt;/p&gt;&lt;h2 id=&quot;how-cdn-routing-and-pop-selection-change-cache-hit-ttfb&quot; class=&quot;scroll-mt-24&quot;&gt;How CDN routing and PoP selection change cache hit TTFB&lt;/h2&gt;&lt;p&gt;CDN routing decides which point of presence answers the request and whether the response is served from cache or fetched from origin. Cache hit versus miss is often the largest swing in TTFB for cacheable HTML and static assets. A hit can return in tens of milliseconds from a nearby PoP. A miss pays PoP-to-origin latency plus origin compute, which is why “we turned on a CDN” does not guarantee a lower first byte on HTML documents.&lt;/p&gt;&lt;p&gt;Checklist for CDN-related TTFB work:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Confirm the URL under test is the public hostname users hit, not a bypass origin URL used only in staging.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Inspect &lt;code&gt;Age&lt;/code&gt;, &lt;code&gt;CF-Cache-Status&lt;/code&gt;, &lt;code&gt;X-Cache&lt;/code&gt;, or vendor-equivalent headers on the HTML response and on the LCP asset.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Separate “CDN configured” from “HTML cacheable.” Many stacks cache CSS and images while every HTML document is &lt;code&gt;private, no-store&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Enable origin shield or regional shielding when miss traffic repeatedly cold-starts the same origin from many PoPs.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Prefer stale-while-revalidate (or vendor equivalent) for pages that can tolerate brief staleness so users are not blocked on origin regeneration.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;PoP selection mistakes show up as geography-specific TTFB spikes. A campaign aimed at Australia served primarily from a European PoP will look healthy in a default US or EU lab profile and poor for the real audience. Align synthetic locations with the client’s traffic share, then set &lt;a rel=&quot;nofollow&quot; href=&quot;https://apogeewatcher.com/blog/performance-budget-thresholds-template&quot;&gt;performance budget thresholds&lt;/a&gt; on those same URLs so regressions after DNS or CDN edits are visible in the next scheduled run.&lt;/p&gt;&lt;h2 id=&quot;how-cdn-cache-rules-differ-from-browser-cache&quot; class=&quot;scroll-mt-24&quot;&gt;How CDN cache rules differ from browser cache&lt;/h2&gt;&lt;p&gt;CDN cache rules decide what the edge may store and for how long. Browser cache rules decide what a returning visitor may reuse without another network hop. Mixing the two is a common source of tickets that say “we purged but TTFB did not move,” because the team purged the wrong layer or expected browser cache to fix cold document requests.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Layer&lt;/th&gt;&lt;th&gt;Typical policy intent&lt;/th&gt;&lt;th&gt;TTFB effect&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Browser cache (static assets)&lt;/td&gt;&lt;td&gt;Long `max-age` / immutable hashed filenames&lt;/td&gt;&lt;td&gt;Helps repeat views; little effect on cold TTFB for HTML&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CDN cache (static assets)&lt;/td&gt;&lt;td&gt;Long TTL at edge, purge on deploy of that asset set&lt;/td&gt;&lt;td&gt;Cuts miss cost for CSS, JS, images, fonts&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CDN cache (HTML)&lt;/td&gt;&lt;td&gt;Short TTL, SWR, or selective caching for anonymous pages&lt;/td&gt;&lt;td&gt;Often the main lever to reduce TTFB on document requests&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Origin&lt;/td&gt;&lt;td&gt;Correct `Cache-Control` / `CDN-Cache-Control` so the edge is allowed to store&lt;/td&gt;&lt;td&gt;Without this, CDN rules never engage&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Purge discipline matters as much as TTL length. Blanket purges on every content edit can collapse hit ratio and return every visitor to origin cost. Prefer purge-by-URL or purge-by-tag for the templates you changed. After a purge storm, expect temporary TTFB regressions until the edge repopulates. Tell clients that pattern is expected, then prove recovery with scheduled lab runs rather than a single screenshot.&lt;/p&gt;&lt;p&gt;A deeper pass on Cache-Control header design belongs in a dedicated how-to later on the calendar. For day-to-day delivery, decide per content type whether the browser, the CDN, or only the origin may cache. Write that policy down. Verify headers on the live URL after each CDN or platform change.&lt;/p&gt;&lt;h2 id=&quot;how-to-diagnose-network-ttfb-in-pagespeed-insights-and-webpagetest&quot; class=&quot;scroll-mt-24&quot;&gt;How to diagnose network TTFB in PageSpeed Insights and WebPageTest&lt;/h2&gt;&lt;p&gt;Use one cold lab run to see the full path, then one repeat view if your tool supports it. Cold runs expose DNS and TLS. Repeat views show whether connection reuse and cache headers behave as you expect.&lt;/p&gt;&lt;h3&gt;PageSpeed Insights and Lighthouse&lt;/h3&gt;&lt;p&gt;Read the TTFB-related diagnostic and the document request in the network breakdown when available. Treat a high TTFB with a green LCP as unstable: the next slower network or colder cache will expose the wait. Compare mobile and desktop profiles; connection and CPU throttling change how much TTFB dominates the timeline.&lt;/p&gt;&lt;h3&gt;WebPageTest waterfalls&lt;/h3&gt;&lt;p&gt;Expand the first document request: DNS, connect, TLS, Waiting. Note protocol (h2 / h3), CDN cache headers, and redirect count before the final document. Run the same URL from two locations that match the client’s audience so geography-specific PoP and DNS issues are not invisible.&lt;/p&gt;&lt;h3&gt;Decision order we use in delivery&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Redirects and wrong hostname (fix before tuning TLS).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;DNS and TLS setup cost on cold load.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;CDN miss versus hit on HTML and on the LCP asset.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Origin compute and application time (hand off to code or hosting diagnosis as in the WordPress guide linked above).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Protocol and connection reuse for the last stretch of budget.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Manual one-off checks catch the first regression. They do not prove the CDN change still holds next week. Pair diagnosis with &lt;a rel=&quot;nofollow&quot; href=&quot;https://apogeewatcher.com/blog/how-to-schedule-pagespeed-monitoring-test-frequency-priority-portfolio&quot;&gt;scheduled PageSpeed monitoring&lt;/a&gt; on priority URLs. Keep &lt;a rel=&quot;nofollow&quot; href=&quot;https://apogeewatcher.com/blog/pagespeed-insights-vs-automated-monitoring-when-manual-checks-arent-enough&quot;&gt;PageSpeed Insights versus automated monitoring&lt;/a&gt; in mind when a stakeholder wants a single green screenshot as proof that the edge is healthy.&lt;/p&gt;&lt;h2 id=&quot;what-to-re-test-after-dns-tls-or-cdn-changes&quot; class=&quot;scroll-mt-24&quot;&gt;What to re-test after DNS, TLS, or CDN changes&lt;/h2&gt;&lt;p&gt;Ship network changes with the same discipline you use for theme releases. After nameserver cuts, SSL mode edits, HTTP/3 toggles, cache rule updates, or purge policy changes, treat the edge the way you treat a theme deploy: prove the URL still meets budget before you close the ticket.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Lab-test the homepage and at least one high-intent template (product, pricing, or primary landing URL).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Capture cache status headers and TTFB from a location that matches traffic.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Compare against the budget you already set for that URL.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Watch the next few scheduled runs for hit-ratio recovery after purges.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Only then reopen theme or plugin tickets that assumed “hosting was fine.”&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Apogee Watcher fits as the continuous layer on top of this checklist: multi-site schedules, device splits, and alerts when TTFB or LCP leave budget after an edge change. It layers onto your DNS and CDN vendors; it does not replace them. Network fixes stay verified without someone remembering to open PageSpeed Insights after every Cloudflare or Fastly edit.&lt;/p&gt;&lt;h2 id=&quot;faq&quot; class=&quot;scroll-mt-24&quot;&gt;FAQ&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Does reducing TTFB always improve Core Web Vitals?&lt;/strong&gt;Often for LCP, when first byte was a large share of the delay and the LCP element was waiting on the document or a late resource discovery. Not always for INP or CLS, which depend on main-thread work and layout stability. Treat TTFB as a supporting budget with its own threshold, then confirm LCP on the same URLs after the network change lands.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Should we cache HTML at the CDN for logged-in or personalised pages?&lt;/strong&gt;Usually no for fully personalised HTML. Prefer caching anonymous shells or use edge strategies your platform supports without leaking private content. Wrong HTML caching creates security and correctness incidents that dwarf a TTFB win, so write the exception list into the cache policy before you enable document caching at the edge.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Is a CDN enough to fix DNS lookup performance?&lt;/strong&gt;No. The CDN improves delivery after resolution. Flatten CNAME chains, set sensible TTLs, and confirm geo DNS still points users at a sensible PoP. Re-test cold loads from more than one region after DNS ownership or nameserver changes.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;When is origin compute the real TTFB problem?&lt;/strong&gt;When the waterfall Waiting phase dominates after DNS, connect, and TLS are small, and cache headers show misses or bypass. Then audit application time, database work, and cron load rather than another TLS tweak. That hand-off is where the WordPress hosting-versus-code diagnosis usually starts.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;How soon should we re-run lab tests after a DNS cutover?&lt;/strong&gt;As soon as TTL and resolver caches allow the new answers to appear, then again from a second region. Do not wait for a monthly report cycle to learn the cutover raised TTFB for half the audience. Put the same URLs on a short schedule for the first week after the cutover so hit-ratio and geo routing surprises show up while ownership is still clear.&lt;/p&gt;&lt;h2 id=&quot;put-priority-urls-on-a-schedule-after-network-changes&quot; class=&quot;scroll-mt-24&quot;&gt;Put priority URLs on a schedule after network changes&lt;/h2&gt;&lt;p&gt;Pick one priority URL with a high lab TTFB. Export or screenshot the waterfall split for DNS, TLS, Waiting, and cache status. Fix the largest hop first, re-test from a relevant location, then put that URL on a schedule so the next DNS or CDN change cannot silently undo the gain. If you manage many client hostnames, use Watcher’s portfolio schedules and budgets so edge regressions surface the same way application regressions do.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/22845/network-performance-for-web-teams-dns-tls-http-cdn-and-cache-rules</guid>
<pubDate>Fri, 17 Jul 2026 04:25:10 +0000</pubDate>
</item>
<item>
<title>How to Configure Nginx as an HTTPS Proxy Server?</title>
<link>https://coderlegion.com/18996/how-to-configure-nginx-as-an-https-proxy-server</link>
<description>
&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In previous article we could able to setup basic nginx server and server simple html page. &lt;/p&gt;

&lt;p&gt;Now let's setup https for our nginx server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Before we start setting up https we should do the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Buy a domain name from any registrar.&lt;/li&gt;
&lt;li&gt;Set up dns records to point to our server ip.&lt;/li&gt;
&lt;li&gt;Setup Certificate for our domain name.&lt;/li&gt;
&lt;li&gt;Install nginx on our server.&lt;/li&gt;
&lt;li&gt;Set up nginx server to serve our website.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Buying Domain Name
&lt;/h2&gt;

&lt;p&gt;We can buy domain name from any registrar like Namecheap, GoDaddy, etc. &lt;/p&gt;

&lt;p&gt;It depends on which name it is and the charges will be around &lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up DNS Records
&lt;/h2&gt;

&lt;p&gt;Once buy setup the dns records to point to our server ip.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
For your server the ip address is [IP_ADDRESS]. &lt;br&gt;
And your domain name is [EMAIL_ADDRESS]&lt;/p&gt;

&lt;p&gt;So, you need to set up a dns record to point to your server ip.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up Certificate
&lt;/h2&gt;

&lt;p&gt;Now let's setup certificate for our domain name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;example.com&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;so, we setup&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;certbot &lt;span class=&quot;nt&quot;&gt;--nginx&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;example.com&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--email&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;EMAIL_ADDRESS] &lt;span class=&quot;nt&quot;&gt;--agree-tos&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--no-eff-email&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is simple workflow on how certificate is fetched and how &lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fftruvgc7r97ocn2ggu19.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fftruvgc7r97ocn2ggu19.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key generation&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The Certbot generates a private key and a CSR (Certificate Signing Request) entirely on your machine. &lt;/p&gt;

&lt;p&gt;The private key is the core security guarantee.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP-01 Challenge&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Let's Encrypt needs to verify you actually control &lt;code&gt;example.com&lt;/code&gt;. It sends Certbot a random token. &lt;/p&gt;

&lt;p&gt;Certbot places it at:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;/var/www/html/.well-known/acme-challenge/&amp;lt;random-token&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nginx (already running on port 80) serves this file publicly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's Encrypt fetches the token&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;LE makes a plain HTTP request to &lt;code&gt;&lt;a href=&quot;http://example.com/.well-known/acme-challenge/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/.well-known/acme-challenge/&lt;/a&gt;&amp;lt;token&amp;gt;&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;If it gets the right response back, it's satisfied that you own the domain. &lt;/p&gt;

&lt;p&gt;This is why DNS must be pointing to your server before you run Certbot &amp;mdash; if the domain pointed elsewhere, LE would fetch the token from the wrong machine and the challenge would fail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Certificate issued &amp;amp; saved&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;LE signs and returns your certificate. &lt;/p&gt;

&lt;p&gt;Certbot saves four files to &lt;code&gt;/etc/letsencrypt/live/example.com/&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fullchain.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your cert + intermediate CA chain (this is what Nginx uses)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;privkey.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your private key (Nginx uses this too)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cert.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Just your cert alone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;chain.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Just the CA chain alone&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Nginx config is rewritten&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Certbot patches your &lt;code&gt;server&lt;/code&gt; block to add the &lt;code&gt;listen 443 ssl&lt;/code&gt; lines and the cert paths, and adds a new &lt;code&gt;server { listen 80; }&lt;/code&gt; block that redirects all HTTP traffic to HTTPS. &lt;/p&gt;

&lt;p&gt;Then it reloads Nginx for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up with nginx
&lt;/h2&gt;

&lt;p&gt;Assuming your application running in local host 8090. and you are setting up https for your domain name example.com.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight conf&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt; {
    &lt;span class=&quot;n&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;443&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ssl&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http2&lt;/span&gt;;
    &lt;span class=&quot;n&quot;&gt;server_name&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;example&lt;/span&gt;.&lt;span class=&quot;n&quot;&gt;com&lt;/span&gt;;

    &lt;span class=&quot;n&quot;&gt;ssl_certificate&lt;/span&gt;     /&lt;span class=&quot;n&quot;&gt;etc&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;letsencrypt&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;live&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;example&lt;/span&gt;.&lt;span class=&quot;n&quot;&gt;com&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;fullchain&lt;/span&gt;.&lt;span class=&quot;n&quot;&gt;pem&lt;/span&gt;;
    &lt;span class=&quot;n&quot;&gt;ssl_certificate_key&lt;/span&gt; /&lt;span class=&quot;n&quot;&gt;etc&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;letsencrypt&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;live&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;example&lt;/span&gt;.&lt;span class=&quot;n&quot;&gt;com&lt;/span&gt;/&lt;span class=&quot;n&quot;&gt;privkey&lt;/span&gt;.&lt;span class=&quot;n&quot;&gt;pem&lt;/span&gt;;

    &lt;span class=&quot;c&quot;&gt;# All requests &amp;mdash; public, no auth
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;location&lt;/span&gt; / {
        &lt;span class=&quot;n&quot;&gt;proxy_pass&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http&lt;/span&gt;://&lt;span class=&quot;n&quot;&gt;localhost&lt;/span&gt;:&lt;span class=&quot;m&quot;&gt;8090&lt;/span&gt;;
        &lt;span class=&quot;n&quot;&gt;proxy_set_header&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Host&lt;/span&gt; $&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;;
        &lt;span class=&quot;n&quot;&gt;proxy_set_header&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;X&lt;/span&gt;-&lt;span class=&quot;n&quot;&gt;Real&lt;/span&gt;-&lt;span class=&quot;n&quot;&gt;IP&lt;/span&gt; $&lt;span class=&quot;n&quot;&gt;remote_addr&lt;/span&gt;;
        &lt;span class=&quot;n&quot;&gt;proxy_set_header&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;X&lt;/span&gt;-&lt;span class=&quot;n&quot;&gt;Forwarded&lt;/span&gt;-&lt;span class=&quot;n&quot;&gt;For&lt;/span&gt; $&lt;span class=&quot;n&quot;&gt;proxy_add_x_forwarded_for&lt;/span&gt;;
        &lt;span class=&quot;n&quot;&gt;proxy_set_header&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;X&lt;/span&gt;-&lt;span class=&quot;n&quot;&gt;Forwarded&lt;/span&gt;-&lt;span class=&quot;n&quot;&gt;Proto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;https&lt;/span&gt;;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add to symlink to sites enabled&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restarting nginx&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;nginx &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We could get https for our domain name example.com.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabn6nl3iehrohehnxgje.png&quot; alt=&quot;git-lrc&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It&amp;rsquo;s online, source-available, and ready for anyone to use. &lt;br&gt;
&amp;#11088; Star it on GitHub: &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;


</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/18996/how-to-configure-nginx-as-an-https-proxy-server</guid>
<pubDate>Tue, 02 Jun 2026 16:03:57 +0000</pubDate>
</item>
<item>
<title>Why Are There Only 13 DNS Root Servers For The Whole World? Is that a problem</title>
<link>https://coderlegion.com/16890/why-are-there-only-13-dns-root-servers-for-the-whole-world-is-that-a-problem</link>
<description>&lt;p&gt;If you are studying for a networking or cloud certification (like AWS Solutions Architect), you will eventually hit a question that stops you in your tracks:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;&quot;How many DNS Root Servers are there?&quot;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Answer: 13.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At first glance, this sounds terrifying. We have billions of devices, trillions of websites, and the entire global economy running on the internet. How can the whole thing rely on just &lt;strong&gt;13 computers&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;The answer lies in a fascinating mix of 1980s history, hard math, and a clever routing trick called &quot;Anycast.&quot; Here is everything you need to know about the 13 Root Servers—and why the internet is stronger than it looks.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://rdjarbeng.com/assets/images/dns_root_servers_cover.jpg&quot; alt=&quot;Map of the world with red markers to signify DNS servers with number 13&quot; title=&quot;Mock DNS Map of the world with red markers&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;1-the-history-lesson-the-512-byte-box&quot;&gt;1. The History Lesson: The 512-Byte Box&lt;/h3&gt;
&lt;p&gt;To understand why we have 13 servers, you have to go back to the early days of the internet (IPv4).&lt;/p&gt;
&lt;p&gt;In the 1980s, the engineers building the Domain Name System (DNS) faced a strict physical constraint: &lt;strong&gt;The UDP Packet Limit.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Data travels across the internet in &quot;packets.&quot; Back then, the maximum safe size for a UDP packet (the protocol used for fast, lightweight messages) was &lt;strong&gt;512 bytes&lt;/strong&gt;. As detailed in &lt;a rel=&quot;nofollow&quot; href=&quot;https://datatracker.ietf.org/doc/html/rfc1035&quot;&gt;RFC 1035&lt;/a&gt;, if a packet was bigger than that, old routers would chop it into pieces (fragmentation), causing data loss, or force the connection to switch to TCP (which is reliable but much slower).&lt;/p&gt;
&lt;h4 id=&quot;the-math-problem&quot;&gt;The Math Problem&lt;/h4&gt;
&lt;p&gt;Engineers had to fit the &quot;map&quot; of the internet's root into that tiny 512-byte box. They needed to list the server &lt;strong&gt;Names&lt;/strong&gt; (e.g., &lt;code&gt;a.root-servers.net&lt;/code&gt;). They needed the &lt;strong&gt;IP Addresses&lt;/strong&gt;. They needed protocol overhead (headers, flags, etc.). &lt;/p&gt;
&lt;p&gt;When you added up the byte cost for the headers and the addresses, they hit a hard limit. They could fit exactly &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.cloudflare.com/learning/dns/glossary/dns-root-server/&quot;&gt;13 addresses into the packet&lt;/a&gt; before it overflowed.&lt;/p&gt;
&lt;p&gt;So, the limit isn't political or arbitrary; it’s basically the digital equivalent of fitting people into a small elevator. The 14th person just wouldn't fit.&lt;/p&gt;
&lt;h3 id=&quot;2-the-myth-of-the-kill-switch-&quot;&gt;2. The Myth of the &quot;Kill Switch&quot;&lt;/h3&gt;
&lt;p&gt;A common fear is that if these 13 servers are destroyed, the internet turns off. This fear is amplified when you look at &lt;em&gt;who&lt;/em&gt; runs them.&lt;/p&gt;
&lt;p&gt;The 13 IP addresses (&lt;code&gt;A&lt;/code&gt; through &lt;code&gt;M&lt;/code&gt;) are managed by &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.iana.org/domains/root/servers&quot;&gt;12 different organizations&lt;/a&gt; (Verisign manages two). The list reads like a &quot;Who's Who&quot; of the US establishment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NASA&lt;/strong&gt; (Yes, the &lt;a rel=&quot;nofollow&quot; href=&quot;https://e.root-servers.org/&quot;&gt;space agency manages the E-Root&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The US Army Research Lab&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The US Department of Defense&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;University of Southern California&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;University of Maryland&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It looks incredibly US-centric. This leads to the &quot;Doomsday Scenario&quot;: &lt;em&gt;What if the US Government decides to shut off the internet?&lt;/em&gt; &lt;em&gt;Or what if a disaster takes the US offline?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is where the distinction between &lt;strong&gt;Logical&lt;/strong&gt; and &lt;strong&gt;Physical&lt;/strong&gt; becomes crucial.&lt;/p&gt;
&lt;h3 id=&quot;3-the-cheat-code-anycast&quot;&gt;3. The &quot;Cheat Code&quot;: Anycast&lt;/h3&gt;
&lt;p&gt;Here is the secret: &lt;strong&gt;There are not 13 servers.&lt;/strong&gt; There are 13 &lt;strong&gt;IP Addresses&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In reality, there are &lt;strong&gt;thousands&lt;/strong&gt; of physical servers scattered around the globe (over &lt;a rel=&quot;nofollow&quot; href=&quot;https://root-servers.org/&quot;&gt;1,900 sites as of 2026&lt;/a&gt;). They use a routing technology called &lt;strong&gt;Anycast&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;how-anycast-works&quot;&gt;How Anycast Works&lt;/h4&gt;
&lt;p&gt;Imagine you call the emergency number &lt;strong&gt;911&lt;/strong&gt; (or &lt;strong&gt;112&lt;/strong&gt;).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There is only one phone number.&lt;/li&gt;
&lt;li&gt;But thousands of operators exist across the country.&lt;/li&gt;
&lt;li&gt;The telephone network automatically routes your call to the &lt;em&gt;closest&lt;/em&gt; call center to your physical location.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Root Servers work the exact same way.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you are in &lt;strong&gt;Nairobi, Kenya&lt;/strong&gt;, and your computer queries the &quot;E-Root&quot; (managed by NASA), your request doesn't travel under the ocean to Washington D.C..&lt;/li&gt;
&lt;li&gt;Instead, it travels to a local data center in Nairobi where NASA has placed a physical copy of the server. (You can check the &lt;a rel=&quot;nofollow&quot; href=&quot;https://root-servers.org/&quot;&gt;interactive map of all root servers here&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;why-this-is-doomsday-proof-&quot;&gt;Why this is &quot;Doomsday Proof&quot;&lt;/h4&gt;
&lt;p&gt;If the entire North American continent went dark tomorrow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Decentralization:&lt;/strong&gt; The physical servers in Europe, Africa, and Asia would keep running because they have a local copy of the database (the &quot;Root Zone&quot;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jurisdiction:&lt;/strong&gt; While many operators are US-based, others are international. &lt;strong&gt;Netnod&lt;/strong&gt; is in Sweden, &lt;strong&gt;RIPE&lt;/strong&gt; is in the Netherlands, and &lt;strong&gt;WIDE&lt;/strong&gt; is in Japan.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Result:&lt;/strong&gt; Your local internet would keep resolving DNS queries just fine.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;4-why-does-this-matter-for-aws-&quot;&gt;4. Why Does This Matter for AWS?&lt;/h3&gt;
&lt;p&gt;If you are studying for a cloud certification, you won't be managing root servers. However, understanding them is the key to understanding &lt;strong&gt;Route 53&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;AWS Route 53 is an &quot;Authoritative&quot; DNS service. It uses the exact same principles as the Root Servers to keep your application online:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;High Availability:&lt;/strong&gt; Just like the Root Servers, &lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/route53/faqs/&quot;&gt;AWS Route 53 uses Anycast&lt;/a&gt;. When you create a domain, AWS propagates that record to thousands of servers globally.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Latency:&lt;/strong&gt; By understanding that users connect to the &lt;em&gt;closest&lt;/em&gt; server (not a central master server), you understand how to lower latency for your customers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TTL (Time To Live):&lt;/strong&gt; The reason DNS changes take time to &quot;propagate&quot; is that the Root and TLD servers cache information. You are at the mercy of the hierarchy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;
&lt;p&gt;The &quot;13 Root Servers&quot; are a relic of 1980s packet limits, but they have evolved into one of the most robust distributed systems on Earth.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Limit:&lt;/strong&gt; 512 Bytes (&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.netnod.se/i-root/what-are-root-name-servers&quot;&gt;UDP Packet Size&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Managers:&lt;/strong&gt; 12 organizations (Heavy US military/university presence + International partners).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Reality:&lt;/strong&gt; Thousands of physical servers using &lt;strong&gt;Anycast&lt;/strong&gt; to ensure that even if nations go offline, the network stays up.&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/16890/why-are-there-only-13-dns-root-servers-for-the-whole-world-is-that-a-problem</guid>
<pubDate>Thu, 07 May 2026 10:40:00 +0000</pubDate>
</item>
<item>
<title>Istio ServiceEntry Explained: External Services, DNS, and Traffic Control</title>
<link>https://coderlegion.com/14650/istio-serviceentry-explained-external-services-dns-and-traffic-control</link>
<description>
&lt;a href=&quot;https://alexandre-vazquez.com/istio-serviceentry-explained/&quot; title=&quot;Istio ServiceEntry Explained: External Services, DNS, and Traffic Control&quot; rel=&quot;nofollow&quot;&gt;&lt;img width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://mlk5tkvgfeoa.i.optimole.com/cb:s8WW.68/w:1536/h:1024/q:mauto/f:best/https://alexandre-vazquez.com/wp-content/uploads/2026/04/0372cff9-defc-4162-9b75-42730f112ebf.avif&quot; class=&quot;webfeedsFeaturedVisual wp-post-image&quot; alt=&quot;Istio ServiceEntry Explained: External Services, DNS, and Traffic Control&quot; style=&quot;display: block; margin: auto; margin-bottom: 5px;max-width: 100%;&quot; title=&quot;Istio ServiceEntry Explained: External Services, DNS, and Traffic Control 4&quot;&gt;&lt;/a&gt;&amp;lt;!--
SEO Title: Istio ServiceEntry Explained: External Services, DNS, and Traffic Control
Meta Description: Complete guide to Istio ServiceEntry. Control how your mesh reaches external APIs, databases, and third-party services. With production YAML examples and DNS resolution patterns.
Focus Keywords: istio serviceentry,istio service entry,istio external service,istio dns resolution
Suggested Slug: istio-serviceentry-explained
--&amp;gt;


&lt;p&gt;Every production Kubernetes cluster talks to the outside world. Your services call payment APIs, connect to managed databases, push events to SaaS analytics platforms, and reach legacy systems that will never run inside the mesh. By default, Istio lets all outbound traffic flow freely &amp;mdash; or blocks it entirely if you flip &lt;code&gt;outboundTrafficPolicy&lt;/code&gt; to &lt;code&gt;REGISTRY_ONLY&lt;/code&gt;. Neither extreme gives you what you actually need: &lt;strong&gt;selective, observable, policy-controlled access to external services&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;That is exactly what &lt;strong&gt;Istio ServiceEntry&lt;/strong&gt; solves. It registers external endpoints in the mesh&amp;rsquo;s internal service registry so that Envoy sidecars can apply the same traffic management, security, and observability features to outbound calls that you already enjoy for east-west traffic. No new proxies, no egress gateways required for the basic case &amp;mdash; just a YAML resource that tells the mesh &amp;ldquo;this external thing exists, and here is how to reach it.&amp;rdquo;&lt;/p&gt;



&lt;p&gt;In this guide, I will walk through every field of the ServiceEntry spec, explain the four DNS resolution modes with real-world use cases, and show production-ready patterns for external APIs, databases, TCP services, and legacy workloads. We will also cover how to combine ServiceEntry with DestinationRule and VirtualService to get circuit breaking, retries, connection pooling, and even sticky sessions for external dependencies.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;What Is a ServiceEntry&lt;/h2&gt;



&lt;p&gt;Istio maintains an internal service registry that merges Kubernetes Services with any additional entries you declare. When a sidecar proxy needs to decide how to route a request, it consults this registry. Services inside the mesh are automatically registered. Services &lt;em&gt;outside&lt;/em&gt; the mesh are not &amp;mdash; unless you create a &lt;strong&gt;ServiceEntry&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;A ServiceEntry is a custom resource that adds an entry to the mesh&amp;rsquo;s service registry. Once registered, the external service becomes a first-class citizen: Envoy generates clusters, routes, and listeners for it, which means you get metrics (&lt;code&gt;istio_requests_total&lt;/code&gt;), access logs, distributed traces, mTLS origination, retries, timeouts, circuit breaking &amp;mdash; the full Istio feature set.&lt;/p&gt;



&lt;p&gt;Without a ServiceEntry, outbound traffic to an external host either passes through as a raw TCP connection (in &lt;code&gt;ALLOW_ANY&lt;/code&gt; mode) with no telemetry, or gets dropped with a 502/503 (in &lt;code&gt;REGISTRY_ONLY&lt;/code&gt; mode). Both outcomes are undesirable in production. The ServiceEntry bridges that gap.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;ServiceEntry Anatomy: All Fields Explained&lt;/h2&gt;



&lt;p&gt;Let us look at a complete ServiceEntry and then break down each field.&lt;/p&gt;



&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: external-api
  namespace: production
spec:
  hosts:
    - api.stripe.com
  location: MESH_EXTERNAL
  ports:
    - number: 443
      name: https
      protocol: TLS
  resolution: DNS
  exportTo:
    - &quot;.&quot;
    - &quot;istio-system&quot;&lt;/code&gt;&lt;/pre&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;hosts&lt;/h3&gt;



&lt;p&gt;A list of hostnames associated with the service. For external services, this is typically the DNS name your application uses (e.g., &lt;code&gt;api.stripe.com&lt;/code&gt;). For services using &lt;code&gt;HTTP&lt;/code&gt; protocols, the &lt;code&gt;hosts&lt;/code&gt; field is matched against the HTTP Host header. For non-HTTP protocols and services without a DNS name, you can use a synthetic hostname and pair it with &lt;code&gt;addresses&lt;/code&gt; or static &lt;code&gt;endpoints&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;addresses&lt;/h3&gt;



&lt;p&gt;Optional virtual IP addresses associated with the service. Useful for TCP services where you want to assign a VIP that the sidecar will intercept. Not required for HTTP/HTTPS services that use hostname-based routing.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;ports&lt;/h3&gt;



&lt;p&gt;The ports on which the external service is exposed. Each port needs a &lt;code&gt;number&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, and &lt;code&gt;protocol&lt;/code&gt;. The protocol matters: setting it to &lt;code&gt;TLS&lt;/code&gt; tells Envoy to perform SNI-based routing without terminating TLS. Setting it to &lt;code&gt;HTTPS&lt;/code&gt; means HTTP over TLS. For databases, you&amp;rsquo;ll typically use &lt;code&gt;TCP&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;location&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;MESH_EXTERNAL&lt;/code&gt; or &lt;code&gt;MESH_INTERNAL&lt;/code&gt;. Use &lt;code&gt;MESH_EXTERNAL&lt;/code&gt; for services outside your cluster (third-party APIs, managed databases). Use &lt;code&gt;MESH_INTERNAL&lt;/code&gt; for services inside your infrastructure that are not part of the mesh &amp;mdash; for example, VMs running in the same VPC that do not have a sidecar, or a Kubernetes Service in a namespace without injection enabled. The location affects how mTLS is applied and how metrics are labeled.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;resolution&lt;/h3&gt;



&lt;p&gt;How the sidecar resolves the endpoint addresses. This is the most critical field and I will dedicate the next section to it. Options: &lt;code&gt;NONE&lt;/code&gt;, &lt;code&gt;STATIC&lt;/code&gt;, &lt;code&gt;DNS&lt;/code&gt;, &lt;code&gt;DNS_ROUND_ROBIN&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;endpoints&lt;/h3&gt;



&lt;p&gt;An explicit list of network endpoints. Required when resolution is &lt;code&gt;STATIC&lt;/code&gt;. Optional with &lt;code&gt;DNS&lt;/code&gt; resolution to provide labels or locality information. Each endpoint can have an &lt;code&gt;address&lt;/code&gt;, &lt;code&gt;ports&lt;/code&gt;, &lt;code&gt;labels&lt;/code&gt;, &lt;code&gt;network&lt;/code&gt;, &lt;code&gt;locality&lt;/code&gt;, and &lt;code&gt;weight&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;exportTo&lt;/h3&gt;



&lt;p&gt;Controls the visibility of this ServiceEntry across namespaces. Use &lt;code&gt;&quot;.&quot;&lt;/code&gt; for the current namespace only, &lt;code&gt;&quot;*&quot;&lt;/code&gt; for all namespaces. In multi-team clusters, restrict exports to avoid namespace pollution.&lt;/p&gt;

&amp;lt;!-- /wp:post-content --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Resolution Types: NONE vs STATIC vs DNS vs DNS_ROUND_ROBIN&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;The &lt;code&gt;resolution&lt;/code&gt; field determines how Envoy discovers the IP addresses behind the service. Getting this wrong is the number one cause of ServiceEntry misconfigurations. Here is a clear breakdown.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:table --&amp;gt;
&lt;figure class=&quot;wp-block-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Resolution&lt;/th&gt;&lt;th&gt;How It Works&lt;/th&gt;&lt;th&gt;Best For&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;NONE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy uses the original destination IP from the connection. No DNS lookup by the proxy.&lt;/td&gt;&lt;td&gt;Wildcard entries, pass-through scenarios, services where the application already resolved the IP.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;STATIC&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy routes to the IPs listed in the &lt;code&gt;endpoints&lt;/code&gt; field. No DNS involved.&lt;/td&gt;&lt;td&gt;Services with stable, known IPs (e.g., on-prem databases, VMs with fixed IPs).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;DNS&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy resolves the hostname at connection time and creates an endpoint per returned IP. Uses async DNS with health checking per IP.&lt;/td&gt;&lt;td&gt;External APIs behind load balancers, managed databases with DNS endpoints (RDS, CloudSQL).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;DNS_ROUND_ROBIN&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy resolves the hostname and uses a single logical endpoint, rotating across returned IPs. No per-IP health checking.&lt;/td&gt;&lt;td&gt;Simple external services, services where you do not need per-endpoint circuit breaking.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&amp;lt;!-- /wp:table --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use NONE&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;NONE&lt;/code&gt; when you want to register a range of external IPs or wildcard hosts without Envoy performing any address resolution. This is common for broad egress policies: &amp;ldquo;allow traffic to &lt;code&gt;*.googleapis.com&lt;/code&gt; on port 443.&amp;rdquo; Envoy will simply forward traffic to whatever IP the application resolved via kube-dns. The downside: Envoy has limited ability to apply per-endpoint policies.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use STATIC&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;STATIC&lt;/code&gt; when the external service has known, stable IP addresses that rarely change. This avoids DNS dependencies entirely. You define the IPs in the &lt;code&gt;endpoints&lt;/code&gt; list. Classic use case: a legacy Oracle database on a fixed IP in your data center.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use DNS&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;DNS&lt;/code&gt; for most external API integrations. Envoy performs asynchronous DNS resolution and creates a cluster endpoint for each returned IP address. This enables per-endpoint health checking and circuit breaking &amp;mdash; critical for production reliability. This is the mode you want for services like &lt;code&gt;api.stripe.com&lt;/code&gt; or your RDS instance endpoint.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use DNS_ROUND_ROBIN&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;DNS_ROUND_ROBIN&lt;/code&gt; when the external hostname returns many IPs and you do not need per-IP circuit breaking. Envoy treats all resolved IPs as a single logical endpoint and round-robins across them. This is lighter weight than &lt;code&gt;DNS&lt;/code&gt; mode and avoids creating a large number of endpoints in Envoy&amp;rsquo;s cluster configuration.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Practical Patterns&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 1: External HTTP API (api.stripe.com)&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;The most common ServiceEntry pattern. Your application calls a third-party HTTPS API. You want Istio telemetry, and optionally retries and timeouts.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: stripe-api
  namespace: payments
spec:
  hosts:
    - api.stripe.com
  location: MESH_EXTERNAL
  ports:
    - number: 443
      name: tls
      protocol: TLS
  resolution: DNS&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Note the protocol is &lt;code&gt;TLS&lt;/code&gt;, not &lt;code&gt;HTTPS&lt;/code&gt;. Since your application initiates the TLS handshake directly, Envoy handles this as opaque TLS using SNI-based routing. If you were terminating TLS at the sidecar and doing TLS origination via a DestinationRule, you would set the protocol to &lt;code&gt;HTTP&lt;/code&gt; and handle the upgrade separately &amp;mdash; but for most external APIs, let the application manage its own TLS.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 2: External Managed Database (RDS / CloudSQL)&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Managed databases expose a DNS endpoint that resolves to one or more IPs. During failover, the DNS record changes. You need Envoy to respect DNS TTLs and route to the current primary.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: orders-database
  namespace: orders
spec:
  hosts:
    - orders-db.abc123.us-east-1.rds.amazonaws.com
  location: MESH_EXTERNAL
  ports:
    - number: 5432
      name: postgres
      protocol: TCP
  resolution: DNS&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;For TCP services, Envoy cannot use HTTP headers to route, so it relies on IP-based matching. The &lt;code&gt;DNS&lt;/code&gt; resolution mode ensures Envoy periodically re-resolves the hostname and updates its endpoint list. This is critical for RDS multi-AZ failover scenarios where the DNS endpoint flips to a new IP.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 3: Legacy Internal Service Not in the Mesh&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;You have a monitoring service running on a set of VMs at known IP addresses inside your VPC. It is not part of the mesh, but your meshed services need to talk to it.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: legacy-monitoring
  namespace: observability
spec:
  hosts:
    - legacy-monitoring.internal
  location: MESH_INTERNAL
  ports:
    - number: 8080
      name: http
      protocol: HTTP
  resolution: STATIC
  endpoints:
    - address: 10.0.5.10
    - address: 10.0.5.11
    - address: 10.0.5.12&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Key differences: &lt;code&gt;location&lt;/code&gt; is &lt;code&gt;MESH_INTERNAL&lt;/code&gt; because the service lives inside your network, and &lt;code&gt;resolution&lt;/code&gt; is &lt;code&gt;STATIC&lt;/code&gt; because we know the IPs. The hostname &lt;code&gt;legacy-monitoring.internal&lt;/code&gt; is synthetic &amp;mdash; your application uses it, and Istio&amp;rsquo;s DNS proxy (or a CoreDNS entry) resolves it to one of the listed endpoints.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 4: TCP Services with Multiple Ports&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Some external services expose multiple TCP ports &amp;mdash; for example, an Elasticsearch cluster with both data (9200) and transport (9300) ports.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: external-elasticsearch
  namespace: search
spec:
  hosts:
    - es.example.com
  location: MESH_EXTERNAL
  ports:
    - number: 9200
      name: http
      protocol: HTTP
    - number: 9300
      name: transport
      protocol: TCP
  resolution: DNS&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Each port gets its own Envoy listener configuration. The HTTP port benefits from full Layer 7 telemetry and traffic management. The TCP port gets Layer 4 metrics and connection-level policies.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Combining ServiceEntry with DestinationRule&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;A ServiceEntry alone registers the external service. To apply traffic policies &amp;mdash; connection pooling, circuit breaking, TLS origination, load balancing &amp;mdash; you pair it with a &lt;strong&gt;DestinationRule&lt;/strong&gt;. This is where things get powerful.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Connection Pooling and Circuit Breaking&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;External APIs have rate limits. Your managed database has a maximum connection count. Protecting these dependencies at the mesh level prevents cascading failures.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: stripe-api
  namespace: payments
spec:
  hosts:
    - api.stripe.com
  location: MESH_EXTERNAL
  ports:
    - number: 443
      name: tls
      protocol: TLS
  resolution: DNS
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: stripe-api-dr
  namespace: payments
spec:
  host: api.stripe.com
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 50
        connectTimeout: 5s
      http:
        h2UpgradePolicy: DO_NOT_UPGRADE
        maxRequestsPerConnection: 100
    outlierDetection:
      consecutive5xxErrors: 3
      interval: 30s
      baseEjectionTime: 60s
      maxEjectionPercent: 100&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;This configuration caps outbound connections to Stripe at 50, sets a 5-second connection timeout, and ejects endpoints that return 3 consecutive 5xx errors. In production, this prevents a degraded third-party API from consuming all your connection slots and causing a domino effect across your services.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;TLS Origination&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Sometimes your application speaks plain HTTP, but the external service requires HTTPS. Instead of modifying application code, you can offload TLS origination to the sidecar.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: external-api
  namespace: default
spec:
  hosts:
    - api.external-service.com
  location: MESH_EXTERNAL
  ports:
    - number: 80
      name: http
      protocol: HTTP
    - number: 443
      name: https
      protocol: TLS
  resolution: DNS
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: external-api-tls
  namespace: default
spec:
  host: api.external-service.com
  trafficPolicy:
    portLevelSettings:
      - port:
          number: 443
        tls:
          mode: SIMPLE&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Your application sends HTTP to port 80. A VirtualService (shown in the next section) redirects that to port 443. The DestinationRule initiates TLS to the external endpoint. The application never knows TLS happened.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Combining ServiceEntry with VirtualService&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;VirtualService gives you Layer 7 traffic management for external services: retries, timeouts, fault injection, header-based routing, and traffic shifting. This is invaluable when you are migrating between API providers or need resilience policies for unreliable external dependencies.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Retries and Timeouts&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
  name: stripe-api-vs
  namespace: payments
spec:
  hosts:
    - api.stripe.com
  http:
    - route:
        - destination:
            host: api.stripe.com
            port:
              number: 443
      timeout: 10s
      retries:
        attempts: 3
        perTryTimeout: 3s
        retryOn: connect-failure,refused-stream,unavailable,cancelled,retriable&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/14650/istio-serviceentry-explained-external-services-dns-and-traffic-control</guid>
<pubDate>Tue, 14 Apr 2026 20:49:24 +0000</pubDate>
</item>
<item>
<title>Reverse DNS Lookup — Free IP to Hostname</title>
<link>https://coderlegion.com/12953/reverse-dns-lookup-free-ip-to-hostname</link>
<description>&lt;p&gt;Instantly resolve any IP address to its corresponding hostname with our free &lt;a rel=&quot;nofollow&quot; href=&quot;https://beingoptimist.in/tools/dns-tools/reverse-dns-lookup/&quot;&gt;Reverse DNS Lookup tool&lt;/a&gt;. Enter an IPv4 or IPv6 address to perform quick rDNS checks, verify PTR records, and troubleshoot network issues—perfect for webmasters, sysadmins, and SEO pros.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/12953/reverse-dns-lookup-free-ip-to-hostname</guid>
<pubDate>Mon, 16 Mar 2026 20:39:14 +0000</pubDate>
</item>
<item>
<title>Instant CNAME Lookup Tool – Check DNS Al</title>
<link>https://coderlegion.com/12799/instant-cname-lookup-tool-check-dns-al</link>
<description>&lt;p&gt;Use this free &lt;a rel=&quot;nofollow&quot; href=&quot;https://beingoptimist.in/tools/dns-tools/cname-lookup-tool/&quot;&gt;CNAME Lookup Tool&lt;/a&gt; to quickly find the canonical name (CNAME) records for any domain or subdomain. It helps you verify DNS aliases, troubleshoot configuration issues, and ensure your domains are pointing to the correct targets without using complex command-line tools.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/12799/instant-cname-lookup-tool-check-dns-al</guid>
<pubDate>Wed, 11 Mar 2026 21:25:19 +0000</pubDate>
</item>
<item>
<title>DNS Lookup &amp; Records Viewer</title>
<link>https://coderlegion.com/12124/dns-lookup-records-viewer</link>
<description>&lt;p&gt;This &lt;a rel=&quot;nofollow&quot; href=&quot;https://beingoptimist.in/tools/dns-tools/dns-lookup-tool/&quot;&gt;DNS Lookup Tool&lt;/a&gt; instantly pulls every public DNS record for your domain into a single, easy‑to‑scan table—A, AAAA, NS, MX, TXT and more, complete with TTL values. Just enter a domain, click “Run DNS Lookup,” and see exactly how your DNS is configured so you can debug email issues, verify CDN or nameserver changes, and confirm that everything is resolving correctly worldwide.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/12124/dns-lookup-records-viewer</guid>
<pubDate>Tue, 24 Feb 2026 08:28:11 +0000</pubDate>
</item>
<item>
<title>DNS LookUp Tool</title>
<link>https://coderlegion.com/11884/dns-lookup-tool</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://beingoptimist.in/tools/dns-tools/dns-lookup-tool/&quot;&gt;DNS Lookup Tool&lt;/a&gt; lets you instantly query A, AAAA, MX, TXT, CNAME, NS, and other DNS records for any domain, helping you verify configuration, troubleshoot issues, and understand how your domain is mapped on the internet.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/11884/dns-lookup-tool</guid>
<pubDate>Wed, 18 Feb 2026 14:46:50 +0000</pubDate>
</item>
<item>
<title>Global DNS Propagation Checker</title>
<link>https://coderlegion.com/11751/global-dns-propagation-checker</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://beingoptimist.in/tools/dns-tools/dns-propagation-checker/&quot;&gt;DNS Propagation Checker&lt;/a&gt; lets you instantly see how your domain’s DNS records resolve from multiple global locations, so you can verify updates, spot issues, and confirm your site is live everywhere.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/11751/global-dns-propagation-checker</guid>
<pubDate>Mon, 16 Feb 2026 09:05:31 +0000</pubDate>
</item>
<item>
<title>Internal Engineering Standard</title>
<link>https://coderlegion.com/11451/internal-engineering-standard</link>
<description>&lt;h2 id=&quot;dns-first-connectivity-for-distributed-systems&quot;&gt;DNS-First Connectivity for Distributed Systems&lt;/h2&gt;
&lt;h3 id=&quot;1-mandatory-rule&quot;&gt;1. Mandatory Rule&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;All services must be addressed by DNS/service name.
localhost, 127.0.0.1, or static IPs are forbidden outside single-process unit tests.
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;2-scope&quot;&gt;2. Scope&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;Applies to:

Applications

ETL / MDM jobs

Kafka producers &amp;amp; consumers

Kafka Connect

CI/CD pipelines

Batch jobs, CronJobs, sidecars
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;3-environment-specific-naming-policy&quot;&gt;3. Environment-Specific Naming Policy&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;Local (Docker / Compose)

kafka:9092
zookeeper:2181
elasticsearch:9200
connect:8083
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;Kubernetes

kafka.&amp;lt;namespace&amp;gt;.svc.cluster.local:9092
elasticsearch.&amp;lt;namespace&amp;gt;.svc.cluster.local:9200
connect.&amp;lt;namespace&amp;gt;.svc.cluster.local:8083
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;rule-&quot;&gt;Rule:&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;Service name stays constant.
Only the DNS suffix changes per environment.
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;4-prohibited-patterns&quot;&gt;4. Prohibited Patterns&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;The following are architecture violations:

localhost:*

127.0.0.1:*

Hard-coded pod IPs

Node IPs

Hostnames tied to machines
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;5-configuration-requirements&quot;&gt;5. Configuration Requirements&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;All endpoints must be externalized (env vars, config files, Helm values)

No environment-specific logic in code

No string replacement during deployment
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;6-ci-cd-enforcement&quot;&gt;6. CI/CD Enforcement&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;Pipelines must fail if:

localhost appears in configs

IP literals are detected

Environment-specific rewrites are required

Static scans are mandatory.
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;7-kafka-specific-rules&quot;&gt;7. Kafka-Specific Rules&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;bootstrap.servers must use DNS

Kafka Connect REST must be addressed via service DNS

No broker IPs in configs

No advertised.listeners pointing to localhost
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;8-kubernetes-requirements&quot;&gt;8. Kubernetes Requirements&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;All services exposed via Service objects

Stateful systems use headless services when required

Pods may never reference other pods directly by IP
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;9-reliability-amp-audit-rationale&quot;&gt;9. Reliability &amp;amp; Audit Rationale&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;This standard ensures:

Zero config rewrites across environments

Predictable scaling

Restart tolerance

CI/CD portability

MDM lineage stability

Audit-safe deployments
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;10-non-compliance-impact&quot;&gt;10. Non-Compliance Impact&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;Violations will cause:

Deployment rejection

CI/CD failure

Architecture review

Mandatory refactor before promotion
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;final-principle&quot;&gt;Final Principle&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-code&quot;&gt;DNS is not networking detail — it is system architecture.
If a component is not reachable by DNS, it is not production-ready.
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/11451/internal-engineering-standard</guid>
<pubDate>Wed, 11 Feb 2026 12:27:38 +0000</pubDate>
</item>
</channel>
</rss>