/// article

Selective Hydration: Loading Only The Network Intelligence You Need

A DNS steering platform may have access to a large amount of information. It may know about: Hundreds or thousands of DNS zones Routing policies Destination pools IP prefixes ASN mappings Geographic classifications Resolver groups Health-check results Historical policies Disabled destinations Old configuration versions The authoritative DNS process does n...

By lordfrancs3

A DNS steering platform may have access to a large amount of information. It may know about: Hundreds or thousands of DNS zones Routing policies Destination pools IP prefixes ASN mappings Geographic classifications Resolver groups Health-check results Historical policies Disabled destinations Old configuration versions The authoritative DNS process does not necessarily need all of that information. It needs the information that can affect the DNS answers it is currently responsible for serving. That distinction leads to an architectural pattern we will call selective hydration. Selective hydration means preparing only the active serving state required for live DNS decisions. Conceptually: Complete control dataset | v Determine active DNS configuration | v Follow required dependencies | v Prepare serving state | v Authoritative DNS The goal is simple: Give the DNS query path everything it needs, while keeping unrelated, inactive, and historical data outside the serving process. Selective hydration is not a DNS protocol defined by an RFC. It is an engineering pattern for organizing DNS steering runtime state. It also does not mean that the authoritative server should fetch missing data during each DNS query. The serving state should already be prepared before the query arrives. The Problem Consider an organization operating many DNS zones. Its control system contains: example.com example.net example.org service.example api.example cdn.example ... Each zone may reference different routing policies. Those policies may reference: Pools Destinations Prefixes ASN groups Country groups Resolver groups Health checks Weights Fallback rules The complete dataset might look like this: CONTROL DATA +----------------------+ | 500 zones | +----------+-----------+ | +----------+-----------+ | | v v 1,200 policies 300 pools | | +-----------+----------+ | v 10,000 prefixes | +---------+---------+ | | v v ASN groups Resolver groups | v Geo mappings Plus: Historical policies Disabled zones Old destination pools Audit records Previous imports Old health results Now imagine one authoritative server is responsible for only: 40 active zones Those zones use: 70 active policies 20 destination pools 400 relevant prefixes 12 resolver groups 60 active destination health records Why should that server also load the hundreds of inactive zones, thousands of unrelated prefixes, old policy versions, and historical objects? It usually should not. Core Concept Selective hydration starts from the objects that are actively served. Then it loads the objects those active objects depend on. For example: Active Zone | v Routing Policy | +----------+----------+ | | | v v v Prefixes Resolver Pool Groups | v Destinations | v Health If www.example.com references Policy A, and Policy A references Pool A, then those objects belong in the serving state. If another inactive zone references Policy Z and Pool Z, those objects may not need to exist in this server’s active runtime. The important concept is reachability from active configuration. Ask: Can this object affect an answer that this DNS process can currently return? If yes, load it. If no, there should be a clear reason for keeping it in memory. DNS Already Uses a Similar Principle DNS itself was designed around distributed responsibility. RFC 1034 explains that the size and update frequency of DNS data made centralized copies increasingly expensive, which led to a distributed database model with caching. A particular name server generally has complete information for the parts of the namespace for which it is authoritative rather than keeping the entire DNS database. RFC 1034 describes authoritative information as being organized into zones and notes that a name server normally keeps local copies of some zones while continuing to process resolver queries. Selective hydration applies a related idea inside a DNS steering system. Instead of: Every DNS worker | v Every zone Every policy Every prefix Every historical object use: DNS worker | v Zones this worker serves | v Policies those zones use | v Network intelligence those policies need The runtime becomes a focused view of the larger control dataset. What Does “Hydration” Mean Here? In this article, hydration means turning stored configuration into live serving state. The source information may exist in: Database records Configuration files Management APIs Policy repositories Network datasets Health systems Those objects are not necessarily stored in the same format the authoritative server should use. A preparation process may convert them into smaller runtime structures. Conceptually: CONTROL DATA Zones Policies Pools Prefixes Resolver groups Health configuration | v Select active | v Resolve dependencies | v Validate | v Prepare runtime form | v DNS STATE Active zones Active policies Required pools Required prefixes Required resolver groups Current health That final collection is the hydrated serving state. Selective Hydration Is Not Lazy DNS Resolution This distinction is important. A poorly designed implementation might do this: DNS Query | v Need policy? | v Fetch from database | v Need ASN? | v Call another service | v Need health? | v Call monitoring service | v Return DNS answer That creates external dependencies directly inside the DNS query path. If any dependency becomes slow, DNS can become slow. Selective hydration means the required serving state is prepared before queries depend on it. CONTROL SIDE Database | v Prepare serving state | v Validate | v Activate -------------------------------- QUERY SIDE DNS Query | v Read local serving state | v Choose answer | v Respond The query path stays local and predictable. Start With Active Zones The first useful filter is the set of zones that this authoritative instance should serve. Imagine the management system contains: 500 total zones but the current server handles: 40 active zones Selective hydration begins with those 40. ALL ZONES | +--> Active on this server? | | | yes | | | v | Hydrate | +--> no | v Remain outside serving state This prevents unrelated zone configuration from entering the runtime simply because it exists in the control database. Then Load Only Active Policies Suppose those 40 zones reference 70 routing policies. The control system might contain 1,200 policies in total. You do not automatically need: 1,200 runtime policy objects You may need: 70 active policy objects Conceptually: 500 zones | v 40 active zones | v Referenced policies | v 70 active policies Old, disabled, draft, or unrelated policies can stay in the control system. Follow Policies to Their Pools Consider: www.example.com | v Policy A | +--------+--------+ | | v v Pool A Pool B Pool A contains: 192.0.2.10 192.0.2.20 Pool B contains: 198.51.100.10 203.0.113.10 Those pools are needed because Policy A can choose them. Now imagine Pool Z exists in the configuration database but is referenced only by an inactive policy. There is no obvious reason for Pool Z to occupy active serving memory. The dependency chain should determine what gets prepared: Active zone | v Active policy | v Referenced pool | v Pool members Health State Should Follow Active Destinations Health state is another good candidate for selective hydration. Imagine the overall platform knows about: 5,000 destinations but this DNS instance currently serves policies referencing: 60 destinations The runtime may need current health information for those 60. It probably does not need live health objects for the remaining 4,940 if they cannot affect any current answer. Conceptually: Active pools | v Referenced destinations | v Health state needed This creates a useful relationship: Runtime health state = Destinations that can currently participate in DNS decisions rather than: Runtime health state = Every destination the organization has ever created Prefixes Should Be Policy Relevant Prefix-aware routing can create large datasets. Imagine the network-intelligence source contains: 2,000,000 prefixes Your active policies may explicitly care about only: 3,000 prefixes A naive system may load all two million because they are available. Selective hydration asks whether each prefix participates in the active policy graph. For example: Policy A | +--> 198.51.100.0/24 | +--> 203.0.113.0/24 | +--> Default Only those configured prefixes may need explicit policy objects. Other classification data may still be needed depending on geo or ASN behavior, but the runtime should carry the smallest dataset that supports the actual decisions. ASN Classification Needs Similar Thinking Suppose the platform has network data covering a large number of autonomous systems. But the current steering policy has special treatment for only a few network groups. Example: ASN Group A -> Site A ASN Group B -> Site B All others -> Default The runtime needs enough information to decide whether a request belongs to Group A, Group B, or the default class. It does not automatically need every administrative field associated with every ASN. This is an important difference. The control system might contain: ASN Organization name Registration data Country Source Import timestamp Notes Historical mappings The serving process might require only: Prefix Group ID or: ASN ID Policy Group ID depending on the design. Runtime state should represent the decision. It does not need to reproduce the entire source database. Resolver Groups Can Be Hydrated the Same Way Resolver classification can also become large. Suppose the platform contains resolver groups such as: Public Resolver Group ISP Resolver Group A ISP Resolver Group B Enterprise Resolver Group Special Testing Group Only some groups may appear in current policy. If Policy A uses: ISP Resolver Group A and Policy B uses: Public Resolver Group then those classifications belong in the runtime dependency set. An unused resolver group does not automatically need to exist in the DNS process. Geographic Policy Needs Only the Required Resolution Imagine the source geographic database contains: Country Region City Postal code Latitude Longitude Timezone Additional metadata But the active DNS policy is: PH -> Site A SG -> Site B JP -> Site B Everything else -> Site C The query decision needs country-level information. It does not need: Postal code Latitude Longitude City name to evaluate that policy. The hydration process can create a smaller serving representation. RICH GEO DATA | v Extract country classification | v Compact runtime mapping This reduces runtime state without changing the policy result. ECS Makes Careful Selection More Important EDNS Client Subnet can provide a network prefix that allows DNS systems to return network-sensitive answers. RFC 7871 defines the ECS option and the relationship between the source prefix and the scope for which an answer applies. Network-specific answers have a cost. RFC 7871 notes that ECS can significantly increase cache size, reduce cache reuse, and increase load. It recommends considering storage formats that allow answer information to be shared across multiple prefixes. The same lesson applies to steering runtime design. Do not automatically turn every observed ECS value into permanent state. For example: ECS 198.51.100.0/24 | v Look up prepared classification | v Apply policy This is safer than: Every new ECS prefix | v Create permanent runtime object | v Keep forever ECS should provide information for a decision. It should not automatically become a state-growth mechanism. Think in Terms of Dependencies A useful generic dependency structure looks like this: ACTIVE ZONE | v DNS RECORD | v STEERING POLICY | +------------+------------+ | | | v v v PREFIXES GROUPS POOLS | | +-------+------+ v | | DESTINATIONS v v | ASN RESOLVER v GROUPS GROUPS HEALTH Selective hydration begins at the top. Load only objects reachable from active serving configuration. The result is a smaller state graph: Full configuration graph | v Find active roots | v Follow required references | v Hydrated serving graph This is a general architecture pattern. It is not a requirement of DNS itself. Practical Example Consider: www.example.com api.example.com downloads.example.com The authoritative server handles these three names. Available destinations: Site A 192.0.2.10 Site B 198.51.100.10 Site C 203.0.113.10 The control system contains much more information. Imagine: Total zones: 500 Total policies: 1,200 Total pools: 300 Total explicit prefixes: 50,000 Total resolver groups: 200 Total destinations: 5,000 Historical policies: 20,000 These are example numbers. The active DNS configuration uses: Zones: 3 Policies: 5 Pools: 4 Prefixes: 120 Resolver groups: 3 Destinations: 8 A selective hydration process might conceptually work like this: CONTROL DATA | v Find zones assigned to this DNS node | v 3 active zones | v Find referenced policies | v 5 policies | v Find referenced pools | v 4 pools | v Find destination members | v 8 destinations | +------------------------+ | | v v Load health Load required for 8 destinations network groups | v 120 prefixes 3 resolver groups | v Validate everything | v Publish serving state The resulting authoritative process sees a much smaller dataset. What Happens When a New Zone Becomes Active? Suppose: shop.example.com is activated. It uses: Policy F Pool E Pool F Resolver Group 7 350 additional prefixes 4 destinations The hydration system should prepare those dependencies before the zone becomes live. Conceptually: Activate zone request | v Find dependencies | v Load Policy F | v Load Pool E + Pool F | v Load required network mappings | v Load current health | v Validate references | v Build next serving snapshot | v Activate The critical rule is: Do not publish the zone before its required serving state is ready. Otherwise queries can arrive before their policy dependencies exist. Hydration Should Be Atomic From the Query’s Point of View Imagine the current runtime is: Snapshot 41 A new configuration is being prepared: Snapshot 42 Queries should not see a half-loaded configuration. Bad: Query 1 -> old policy Query 2 -> new policy but old pool Query 3 -> new prefix table but missing health Query 4 -> partially loaded zone A cleaner conceptual model is: BUILD SIDE Configuration | v Build Snapshot 42 | v Validate Snapshot 42 | v Ready -------------------------------- SERVING SIDE Snapshot 41 | | queries continue | v Snapshot 42 ready? | yes | v Switch active reference | v Snapshot 42 From the query’s perspective, it sees one valid serving state or the next valid serving state. It does not need to understand the transition. Validate Before Activation Selective hydration introduces dependencies. Those dependencies must be checked. Suppose: Policy A | v Pool A | v Destination X If Destination X does not exist, the snapshot is incomplete. Possible checks include: Zone references valid policy? Policy references valid pool? Pool contains destinations? Destination has valid address? Prefix is valid? Weight is valid? Fallback exists? Required resolver group exists? Health configuration exists? Do the checks before publication when practical. A bad configuration should not gradually discover missing objects through production queries. Missing Optional Intelligence Still Needs Safe Defaults Selective hydration does not remove the need for Article 12’s safe-default rules. Suppose the policy supports country routing. The required country mapping for a particular request is unavailable. The answer should not become unpredictable. Conceptually: Country classification available? | +--+--+ | | yes no | | v v Geo policy General policy Similarly: ASN known? | +--> yes -> ASN policy | +--> no -> broader policy Selective hydration should prepare the information required for precise decisions. Safe defaults remain necessary when a signal cannot be determined. Selective Hydration and Bounded Runtime State Article 13 introduced the idea of bounded runtime state. Selective hydration helps create those bounds. Without selection: Runtime size | v Depends on entire control database With selection: Runtime size | v Depends mainly on active serving configuration This is much easier to reason about. For example: Maximum active zones per node: 1,000 Maximum policies per zone: 10 Maximum pool members per policy: 20 Maximum active resolver groups: 100 These limits can help define an expected operating range. The exact numbers depend on the service. The key difference is that the runtime is tied to the workload the server is intentionally configured to serve. Selective Hydration and Article 14 Article 14 asked: Why are we loading the whole Internet into memory? Article 15 answers: Load the subset needed for current decisions. The relationship is: AVAILABLE DATA +--------------------------------+ | Zones | | Policies | | Pools | | Prefixes | | ASN data | | Resolver groups | | Geo data | | Health | | History | +---------------+----------------+ | v SELECTIVE HYDRATION | v ACTIVE SERVING STATE +--------------------------------+ | Active zones | | Active policies | | Referenced pools | | Relevant network mappings | | Required resolver groups | | Active destination health | +--------------------------------+ This turns an architectural warning into a concrete design pattern. What Should Stay Outside the Serving State? Typical examples include: Disabled zones Draft policies Unused pools Deleted destination history Old health results Audit logs Import metadata Historical configuration versions Administrative comments Unused network classifications Analytics history These may still be important. They simply serve different purposes. For example: Operational DNS state | v Current answers Historical database | v Auditing and analysis Do not force one process to do both jobs. Control Plane and Serving Plane A useful conceptual split is: CONTROL SIDE Rich configuration | Policy editing | Historical data | Network intelligence | Health sources | v Prepare snapshot | v -------------------------------------------- SERVING SIDE Hydrated snapshot | v Query | v Policy lookup | v Health filter | v Answer This does not require separate physical servers. The separation is about responsibilities. The control side can handle richer and slower operations. The serving side should remain focused on answering DNS. Hydration Can Also Reduce Update Work Imagine the network-intelligence source publishes an update affecting: 10,000 prefixes But none of those prefixes are referenced by the active DNS policy. Should every authoritative worker rebuild its serving state? Not necessarily. If the changed information cannot affect current answers, the active runtime may not need to change. Conceptually: Source update | v Does it affect hydrated dependencies? / \ yes no | | v v Prepare No serving update change needed This can reduce unnecessary runtime churn. Be Careful With Shared Dependencies Selective hydration is not simply deleting everything that is not directly attached to one zone. Dependencies may be shared. Suppose: Zone A ----\ \ >---- Policy X ---- Pool A / Zone B ----/ Policy X must remain hydrated as long as either Zone A or Zone B needs it. Likewise: Pool A | +--> Destination 1 | +--> Destination 2 If several policies use Pool A, removing one policy does not necessarily mean Pool A can disappear. The lifecycle needs to follow actual dependency usage. Removal Matters as Much as Loading Selective hydration also means removing state that is no longer needed. Suppose Zone A is disabled. Before: Zone A | v Policy A | v Pool A If no other active zone references Policy A or Pool A, those objects can eventually leave the serving state. Conceptually: Zone disabled | v Recalculate active dependencies | v Build next snapshot | v Unused objects absent | v Activate new snapshot Without this removal path, selective hydration becomes: Load selectively but never unload Eventually that becomes another form of unbounded accumulation. Health State Needs Freshness Rules Hydrating health information raises another question: How fresh must it be? Imagine: Site A = healthy last update = 10:00 At 10:30, the health source cannot be reached. Should the DNS server keep believing the 10:00 result forever? No. Article 12 discussed why unknown health should be different from healthy and unhealthy. A selective hydration design should therefore include health freshness limits. Fresh health | v Use normally Health age exceeds limit | v Apply unknown-health policy This keeps the serving snapshot from turning stale information into permanent truth. Hydration Failure Needs a Policy What happens if the next serving snapshot cannot be built? Suppose: Current Snapshot 41 = valid New configuration arrives | v Build Snapshot 42 | v Missing Pool B | v Validation fails A safe conceptual response is: Keep serving Snapshot 41 Reject Snapshot 42 Report error rather than: Destroy Snapshot 41 Attempt Snapshot 42 Fail halfway Stop answering correctly A new configuration should normally earn its way into the serving path by passing validation. Practical Testing Selective hydration should be tested like any production subsystem. Useful tests include: Activate one zone Activate many zones Disable a zone Change one policy Add a pool member Remove a pool member Change a prefix rule Change a resolver group Health update Missing dependency Invalid configuration Repeated reloads Measure: Serving-state size Memory usage Hydration time Snapshot activation time Query latency during update Objects added Objects removed Useful Linux Checks Suppose the authoritative server has PID 12345. Check memory before hydration: ps -o pid,rss,vsz,%mem,%cpu,cmd -p 12345 Then check again after loading the active serving state. You can also inspect: grep -E 'VmRSS|VmSize|VmPeak' /proc/12345/status Useful test points include: Minimal serving state 100 active zones 500 active zones Maximum expected active zones During snapshot preparation During activation After removing zones After repeated policy changes A useful result would be that memory roughly follows the intentionally active serving set rather than every historical object in the control system. Compare Two Designs Design A: Load Everything Startup | v Load all zones | v Load all policies | v Load all pools | v Load all prefixes | v Load all resolver groups | v Load all health history | v Serve queries Advantages: Simple mental model Everything is locally available Costs: Higher memory use More startup work More reload work Larger serving state More stale information More unrelated failure paths Design B: Selective Hydration Startup | v Find active zones | v Find referenced policies | v Find referenced pools | v Find required network data | v Load current health | v Validate | v Publish snapshot Advantages: Smaller serving state Clear dependency scope Less unrelated data in memory Easier capacity reasoning Potentially cheaper updates Cleaner separation of history and live state Costs: Dependency tracking is more complicated Activation requires validation Shared dependencies need careful lifecycle management Removal logic must be correct Operators need visibility into what was hydrated There is real engineering work involved. Selective hydration is not free. The benefit is more controlled serving behavior. Design Risks 1. Missing a Required Dependency If Policy A references Pool B but Pool B is not hydrated, live queries can fail. Validate the complete dependency chain before activation. 2. Hydrating Too Little Reducing runtime state should not remove information required for correct policy evaluation. Correctness comes before memory savings. 3. Hydrating Too Much If the selection process eventually includes every object anyway, selective hydration provides little value. Measure the hydrated set. 4. Per-Query Hydration Do not turn: Query arrives into: Fetch missing configuration Prepare serving state before activation. 5. Stale Health Information Current policy with old health information can still produce poor decisions. Give health data freshness rules. 6. Dependency Leaks When zones or policies are removed, unreferenced objects should eventually disappear from active state. Otherwise runtime memory can still grow over time. 7. Partial Activation Queries should not observe half of the old state and half of the new state. Prepare and validate a complete serving snapshot before switching where practical. 8. Confusing Historical Need With Serving Need Audit data is important. That does not mean it needs to live in every authoritative worker. 9. Loading Full Source Objects A serving process may require only a few fields from a much larger source record. Use a runtime representation suited to DNS decisions. 10. No Visibility Into Hydration Operators should be able to answer: How many zones are hydrated? How many policies? How many pools? How many prefixes? How many resolver groups? How many health records? How much memory do they use? Without visibility, selective hydration becomes difficult to troubleshoot. Operator Rules Rule 1: Start From Active Serving Objects Begin with: Active zones Then follow their dependencies. Do not begin with the entire network-intelligence database. Rule 2: Follow References Explicitly A simple conceptual dependency chain is: Zone | Policy | Pool | Destination | Health Network rules may add: Policy | +--> Prefix group | +--> ASN group | +--> Country group | +--> Resolver group Know how each runtime object became necessary. Rule 3: Prepare Before Serving Do not make production queries responsible for loading their own policy dependencies. Hydration belongs before activation. Rule 4: Validate the Complete Serving Set Verify that references resolve before publishing the snapshot. A missing dependency should fail preparation rather than surprise a live query. Rule 5: Keep History Elsewhere Keep: Old policies Audit records Old health data Import logs Configuration history in systems intended for historical storage. Rule 6: Hydrate Only the Fields the Query Needs If routing uses only a region identifier, do not carry an entire geographic source record into the query process without a reason. Rule 7: Remove Unused State When an object stops affecting live answers, allow it to leave the active serving set. Loading and unloading are both parts of selective hydration. Rule 8: Keep Safe Defaults Missing ECS, ASN, country, resolver classification, or health data must still have defined fallback behavior. Selective hydration should not make incomplete signals fatal. Rule 9: Measure Hydration Size Useful counters might include: active_zones active_policies active_pools active_destinations active_prefixes active_resolver_groups health_records Choose metric dimensions carefully to avoid unnecessary cardinality. Rule 10: Measure Hydration Time Track how long it takes to: Read configuration Resolve dependencies Build indexes Validate Publish A serving-state update should have known operational cost. Rule 11: Test Maximum Expected State Test at: Normal active configuration Expected growth Maximum supported active configuration Selective hydration does not eliminate capacity planning. It makes capacity easier to relate to actual service scope. Rule 12: Keep the Query Path Boring The best result is a query path that looks like: DNS Query | v Read prepared state | v Evaluate policy | v Filter by health | v Return answer The complicated work should already have happened. Common Mistakes Mistake 1: “Selective Hydration Means Fetch Data When Needed” Not during the DNS request. That is lazy dependency loading. Selective hydration should prepare the needed state before live queries depend on it. Mistake 2: “Load Every Prefix Because Prefix Lookups Must Be Fast” Fast lookup and unlimited runtime data are different requirements. Build a serving representation appropriate to the policies actually being evaluated. Mistake 3: “Inactive Zones Are Cheap” One zone may be cheap. Thousands of inactive zones can bring policies, pools, prefixes, and health objects with them. Think about dependency cost. Mistake 4: “Historical Policies Might Be Needed for Rollback” Keep the versions needed for immediate rollback. Store deeper history outside the hot path. Mistake 5: “Everything in the Database Is Serving Data” A database often contains administrative and historical information that never participates in a DNS answer. Separate the two responsibilities. Mistake 6: “Hydration Happens Only at Startup” Serving state also changes when: Zones activate Zones deactivate Policies change Pools change Network mappings change Health information changes The update process needs the same discipline as startup. Mistake 7: “If a Dependency Disappears, Remove It Immediately” Check whether another active zone or policy still references it. Shared dependencies require proper lifecycle handling. Mistake 8: “Health Is Just Another Static Object” Health changes much more frequently than most configuration. Treat freshness and update behavior separately. Mistake 9: “Smaller State Automatically Means Correct State” No. A tiny runtime missing necessary policy information is useless. The goal is: Small enough to control + Complete enough to answer correctly Mistake 10: “The Hydrated State Can Grow Forever” That recreates the problem from Article 13. Hydrated state should still have capacity limits. What DNS Can Influence With prepared steering state, authoritative DNS can influence: Which IP address is returned. Which destination pool participates. Which healthy destinations remain eligible. Which network prefixes receive specific answers. Which ASN or resolver groups receive particular routing behavior. How geographic policies affect new DNS resolutions. How weighted policies distribute DNS selections. Selective hydration changes how the authoritative service prepares the information required to make those decisions. It does not expand DNS control beyond DNS itself. What DNS Cannot Fully Control DNS still cannot guarantee: The route BGP selects after resolution. Whether ECS will be present. Exact client location. Exact HTTP traffic percentages. Resolver cache refresh timing. Existing TCP connection movement. HTTP connection reuse. Packet latency. Packet loss. Application sessions. RFC 7871 also makes clear that ECS carries prefix information rather than necessarily exposing or identifying the entire end-user address, and its use involves privacy and cache-resource considerations. Recursive resolvers can also serve stale cached data under conditions described by RFC 8767. This means changing the active authoritative serving state does not guarantee every resolver immediately stops returning an older answer. HTTP operates above DNS and has its own semantics under RFC 9110. TCP maintains connection state independently under RFC 9293. A new DNS answer therefore does not relocate an already established TCP connection. Key Takeaways Selective hydration means preparing the subset of network intelligence needed for live DNS decisions. The process can be summarized as: COMPLETE DATA Zones Policies Pools Prefixes ASN information Resolver information Health History | v Find active serving roots | v Follow required dependencies | v Validate | v Build compact serving state | v AUTHORITATIVE DNS Remember these principles: Start with active zones. Load only the policies those zones use. Load only the pools referenced by those policies. Load current health only for destinations that can participate in live answers. Keep only the prefix, ASN, geographic, and resolver information required by active policies. Prepare runtime state before the DNS query arrives. Validate dependencies before activation. Keep historical and administrative information outside the serving path. Remove state when it is no longer referenced. Retain safe defaults for missing network signals. Measure the size and preparation cost of the hydrated state. Keep the resulting runtime bounded. Selective hydration gives us a useful middle ground: Too much: Load everything | v Large serving state Too little: Fetch everything per query | v External dependencies Preferred: Prepare what active queries need | v Local bounded serving state The objective is not to use the least memory possible. The objective is to keep the authoritative DNS process supplied with exactly the information required to make correct, fast, predictable decisions. This provides a foundation for the remaining articles in the series, where production concerns such as state refresh, policy publication, observability, failure handling, and readiness become increasingly important. A DNS steering engine should not need to understand the entire history of its configuration to answer the next query. It needs a correct, current, bounded view of the information that can affect that answer. That is the purpose of selective hydration. Sources RFC 1034: Domain Names, Concepts and Facilities Defines the foundational DNS architecture. It explains the distributed DNS database model, zones, authoritative servers, caching, and why collecting a consistent copy of the complete database becomes increasingly expensive as DNS grows. https://www.rfc-editor.org/rfc/rfc1034.html RFC 1035: Domain Names, Implementation and Specification Defines DNS protocol implementation details, including message formats, queries, responses, and resource records. https://www.rfc-editor.org/rfc/rfc1035.html RFC 6891: Extension Mechanisms for DNS, EDNS(0) Defines EDNS, which provides the extension framework used by DNS options such as EDNS Client Subnet. https://www.rfc-editor.org/rfc/rfc6891.html RFC 7871: Client Subnet in DNS Queries Defines EDNS Client Subnet. It also discusses prefix scope, cache behavior, privacy, and the additional cache and memory costs associated with network-specific DNS answers. https://www.rfc-editor.org/rfc/rfc7871.html RFC 8767: Serving Stale Data to Improve DNS Resiliency Defines conditions under which recursive resolvers may return stale cached DNS information when fresh information cannot be obtained. https://www.rfc-editor.org/rfc/rfc8767.html RFC 2308: Negative Caching of DNS Queries Defines caching behavior for negative DNS responses such as NXDOMAIN and NODATA. https://www.rfc-editor.org/rfc/rfc2308.html RFC 9110: HTTP Semantics Defines HTTP semantics and helps distinguish authoritative DNS decisions from later application-layer behavior. https://www.rfc-editor.org/rfc/rfc9110.html RFC 9293: Transmission Control Protocol, TCP Defines TCP operation and connection state, explaining why changes to DNS answers do not relocate connections that are already established. https://www.rfc-editor.org/rfc/rfc9293.html