﻿<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-fu-memdns-pivoting-01" submissionType="independent" category="info" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true">

<front>
<title abbrev="Automated Pivoting in Big Memory Systems">DNS for Automated Pivoting in Big Memory Systems</title><seriesInfo value="draft-fu-memdns-pivoting-01" stream="independent" status="informational" name="Internet-Draft"></seriesInfo>
<author initials="Y." surname="Fu" fullname="Yongquan Fu"><organization abbrev="NUDT">PDL, College of Computer Science and Technology, NUDT</organization><address><postal><street></street>
</postal><email>yongquanf@nudt.edu.cn</email>
</address></author><author initials="Z." surname="Lai" fullname="Zhiquan Lai"><organization abbrev="NUDT">PDL, College of Computer Science and Technology, NUDT</organization><address><postal><street></street>
</postal><email>zqlai@nudt.edu.cn</email>
</address></author><author initials="D." surname="Li" fullname="Dongsheng Li"><organization abbrev="NUDT">PDL, College of Computer Science and Technology, NUDT</organization><address><postal><street></street>
</postal><email>dsli@nudt.edu.cn</email>
</address></author><date year="2026" month="August" day="26"></date>
<area>Internet</area>
<workgroup></workgroup>
<keyword>memory</keyword>
<keyword>DNS</keyword>
<keyword>CXL</keyword>
<keyword>big memory</keyword>

<abstract>
<t>Heterogeneous memory networks (CXL pools, HBM/DDR/SRAM hierarchies,
processing-in-memory arrays) form a big memory system, which exposes
fragmented addressing to ML inference runtimes.  This document
describes Memory DNS (MemDNS), a semantic-addressing framework that
applies DNS principles -- domain names, hierarchical delegation,
caching, TTL, and authoritative records -- to tensor data placement in
Big Memory Systems (BMS), deployed as limited domains (RFC 8799).  The
focus is &quot;automated pivoting&quot;: the resolution and control machinery
that automatically switches data access paths (replica selection),
migrates data across media (placement pivoting), and recovers from
faults (failover pivoting), driven by closed-form decision models
(Appendix A; key logic pseudo-code in Appendix C) instead of ad-hoc
thresholds.  The document specifies record semantics, resolution flow,
cache/TTL behavior, delegation, pivot decision models, and protocol
considerations, together with a reference implementation summary.</t>
</abstract>

</front>

<middle>

<section anchor="intro"><name>Introduction</name>
<t>Machine-learning inference systems are dominated by data movement
rather than compute.  Tensors must be placed across and accessed from
a hierarchy of memory media -- registers, SRAM, HBM, DDR, and
CXL-attached pools -- whose bandwidth and latency differ by orders of
magnitude.  Existing abstractions (distributed shared memory, CXL.mem
unified addressing, device meshes) hide physical heterogeneity behind
a uniform address space; this hides exactly the structure that
placement optimizers need, and it prevents the runtime from
automatically pivoting data access between media as access patterns and
load evolve.</t>
<t>This document proposes Memory DNS (MemDNS; not to be confused with
Multicast DNS (mDNS) <xref target="RFC6762"></xref>): an application of the Domain Name
System's machinery -- hierarchical names, delegation, caching, TTL, and
authoritative resource records -- to the addressing of tensor data in
big memory systems (BMS).  A tensor shard is named by a domain such as
&quot;model/encoder/layer3/weight/shard2&quot;; resolution returns a set of
physical placement records (node, medium, physical coordinates,
replicas, read/write attributes).  The emphasis is AUTOMATED PIVOTING:
the resolver and its control loop automatically switch the data access
path among replicas (runtime pivot), migrate data across media on
hot/cold changes (placement pivot), and fall over to surviving replicas
on faults (fault pivot), using closed-form decision models (Appendix A;
key logic pseudo-code in Appendix C) instead of ad-hoc thresholds.</t>
<t>The design intentionally reuses DNS semantics where they transfer
(hierarchical names, TTL-based freshness, per-resolver caching, zone
delegation) and extends them where memory requires it (replica-aware
records, physical-coordinate exposure, medium-aware selection, and
migration as a first-class operation).  MemDNS targets big memory
systems operated as limited domains <xref target="RFC8799"></xref> -- for example, a CXL
fabric within a single data center -- and does not address
Internet-scale interoperability.  The relationship to the Internet DNS
is discussed in <xref target="dns-rel"></xref>.  <xref target="impl"></xref> summarizes a reference
implementation (C library, 38 test suites, guest-kernel validation)
that exercises every mechanism described here.</t>
</section>

<section anchor="terminology"><name>Terminology</name>
<t>This document uses DNS terminology as defined in <xref target="RFC8499"></xref> where
applicable.  Additional terms:</t>

<dl spacing="compact">
<dt>Big Memory System (BMS):</dt>
<dd>a system in which compute nodes access memory over a network (e.g.,
CXL), or a hierarchy of media with network-like latency
characteristics.</dd>
<dt>Domain:</dt>
<dd>a hierarchical name identifying a tensor shard or a memory region,
e.g., &quot;model/encoder/layer3/weight/shard2&quot;.</dd>
<dt>Placement record:</dt>
<dd>a resource record mapping a domain to one or more physical placements
(node, medium, physical coordinates, replica set).</dd>
<dt>Pivot:</dt>
<dd>an automatic switch of the data access path, the data placement, or
the serving replica, driven by the resolution machinery rather than by
application code.</dd>
</dl>
</section>

<section anchor="bms"><name>Background: Big Memory Systems (BMS)</name>
<t>A BMS exposes several tiers:</t>

<ul spacing="compact">
<li>node-local fast media (HBM/SRAM): high bandwidth, low latency,
limited capacity;</li>
<li>node-local bulk media (DDR): larger capacity, higher latency;</li>
<li>pooled/remote media (CXL pools <xref target="cxl"></xref>): large capacity, network-scale
latency (typically 2-10x HBM latency, 10-100x lower bandwidth);</li>
<li>processing-in-memory arrays (optional <xref target="pim-facil"></xref>): compute-capable
storage where data movement can be avoided entirely.</li>
</ul>
<t>A BMS is a tiered system; each compute node sees:</t>

<artwork><![CDATA[      +------------+    +-----------------------------+
      |  compute   |    | node-local fast (HBM/SRAM)  |
      |  node(s)   |<-->| node-local bulk (DDR)       |
      +------------+    | pooled remote (CXL)         |
            |           | PIM arrays (optional)       |
            |           +-----------------------------+
            +--> memory network (e.g., CXL fabric)
]]></artwork>
<t>Three properties make static placement inadequate:</t>

<ol spacing="compact">
<li>Access patterns drift: expert hotness in mixture-of-experts models,
embedding popularity in recommendation models, and KV cache working
sets all change over time.  Data must pivot between tiers
automatically.</li>
<li>Replicas create choice: a tensor may have a fast local copy and a
slow remote copy; the runtime must pivot to the cheapest reachable
replica per request source.</li>
<li>Faults are local: a failed node or region must not break the whole
system; resolution must pivot to surviving replicas.</li>
</ol>
<t>Existing addressing (DSM/CXL unified addresses, device meshes) does not
expose the medium/placement structure needed for these pivots; MemDNS
makes it explicit and machine-resolvable.</t>
</section>

<section anchor="design"><name>Memory DNS (MemDNS) Design</name>

<section anchor="domain"><name>Domain Space and Records</name>
<t>The domain space D is a prefix-ordered hierarchy of names over a
character set of [a-zA-Z0-9_/.-], without empty components.  A domain
identifies a tensor shard or a memory region.  The mapping from logical
index space to physical coordinates is an affine homomorphism:</t>

<artwork><![CDATA[   lambda(x) = (S . x + b) mod m
]]></artwork>
<t>where S is a k-by-r stride matrix, b a bias, and m the modulus vector
of the physical coordinate group (e.g., bank/row/column moduli).
Resolution exposes these coordinates so that placement optimizers can
eliminate bank conflicts structurally.</t>
<t>A placement record (type MEM-A) contains:</t>

<ul spacing="compact">
<li>owner domain name;</li>
<li>TTL (authoritative freshness, see <xref target="cache"></xref>);</li>
<li>read/write mode (RO / WO / RW);</li>
<li>one or more shards, each with an index range and a replica set; each
replica carries node id, medium type, bandwidth, latency, load, and
the affine map to physical coordinates.</li>
</ul>
<t>The record is a tree (data structure):</t>

<artwork><![CDATA[   MEM-A record
    +-- owner: domain name
    +-- ttl:   authoritative freshness window (Section 4.3)
    +-- rw:    RO | WO | RW
    +-- shards[1..n]
         +-- range: index range (lo, hi per dimension)
         +-- replicas[1..m]
              +-- node, medium, bandwidth, latency, load
              +-- affine: lambda(x) = (S . x + b) mod m
]]></artwork>
<t>In a C-like notation:</t>

<sourcecode type="c"><![CDATA[struct placement_record {       /* MEM-A */
  domain_name owner;
  uint32      ttl;              /* seconds */
  uint8       rw;               /* 0x01 RO | 0x02 WO | 0x03 RW */
  shard       shards[];
};
struct shard {
  index_range range;            /* lo/hi per dimension */
  replica     replicas[];
};
struct replica {
  uint32      node;
  uint8       medium;           /* registry, Section 9 */
  uint32      bandwidth;        /* GB/s x 1000 */
  uint32      latency;          /* ns */
  float       load;             /* 0..1 */
  affine_map  affine;           /* S (k x r), b (k), m (k) */
};
]]></sourcecode>
<t>CNAME records can alias one tensor name to another (e.g., a model
checkpoint to its deployed version).  NS-type records express zone
delegation (<xref target="delegation"></xref>).</t>
</section>

<section anchor="resflow"><name>Resolution Flow</name>
<t>A resolver answers a query (domain, index range, request source node)
as follows:</t>

<ol spacing="compact">
<li>local cache lookup (<xref target="cache"></xref>); on hit, return;</li>
<li>direct regional server lookup; on hit, cache and return;</li>
<li>root delegation lookup (longest-prefix match over delegated zones,
<xref target="delegation"></xref>); query the target regional server; on hit, cache and
return;</li>
<li>otherwise, resolution fails cleanly (NODATA-like <xref target="RFC8499"></xref>).</li>
</ol>
<t>The resolution workflow:</t>

<artwork><![CDATA[      query (domain, index range, src)
         |
         v
      +-----------------+ hit   +------------------------+
      | 1. local cache  |------>| return cached record   |
      +-----------------+       +------------------------+
         | miss
         v
      +-----------------+ hit   +------------------------+
      | 2. regional     |------>| cache and return       |
      |    server       |       +------------------------+
      +-----------------+
         | miss
         v
      +-----------------+ no zone +------------------------+
      | 3. root         |-------->| 4. fail cleanly       |
      |    delegation   |         |    (NODATA-like)      |
      +-----------------+         +------------------------+
         | longest-prefix match
         v
      +-----------------+ hit   +------------------------+
      | target regional |------>| cache and return       |
      +-----------------+       +------------------------+
         | miss
         v
      +------------------------+
      | 4. fail cleanly        |
      |    (NODATA-like)       |
      +------------------------+
]]></artwork>
<t>An A-type placement record with zero replicas is unreachable data:
resolution fails rather than returns the record (otherwise stage-2
mapping silently produces no entries).  The clean-failure exit is the
analogue of negative caching in the DNS <xref target="RFC2308"></xref>, materialized as
bounded MEM-FAIL records (<xref target="rectypes"></xref>).  Failure reasons can be
reported in the style of Extended DNS Errors <xref target="RFC8914"></xref>.</t>
<t>Full resolution additionally performs shard matching (splitting the
requested index window at shard boundaries), replica selection
(<xref target="runtime-pivot"></xref>), and physical-coordinate mapping (lambda above),
returning the chosen node, medium, and coordinates together with an
estimated access latency.</t>
<t>Full resolution is a four-stage data-plane workflow:</t>

<ol spacing="compact">
<li>shard matching: split the index window against each shard's range;
collect the non-empty sub-ranges;</li>
<li>replica selection: per matched shard, pick the replica minimizing
cost(r) (<xref target="runtime-pivot"></xref>);</li>
<li>coordinate mapping: apply the shard's affine map to the sub-range,
then coalesce adjacent coordinates into segments;</li>
<li>transfer and return: execute the DMA (Direct Memory Access) batch
and reassemble the data in logical order with an estimated access
latency.</li>
</ol>
</section>

<section anchor="cache"><name>Caching and TTL Semantics</name>
<t>Local caches are per-resolver, full-associative FIFO by default, with
an optional clock-style second-chance mode (recently-hit entries
survive one extra eviction pass).  Insertion and eviction use a
preallocated node pool (size equal to the cache capacity) to avoid
allocator cost on the hot path.</t>
<t>TTL is the authoritative freshness window of a record: a record created
at time t0 with TTL T is authoritative while current_time &lt;= t0 + T
(G-19).  On expiry the resolver evicts the cached copy and re-queries
upstream.  Publishing a new version of a record requires invalidating
the cached entry first (upstream replace destroys the old record; a
cached borrowed pointer would dangle).  Consequently, staleness is
excluded by the update contract: after invalidation the new version is
visible on the next resolve.  TTL semantics follow the
authoritative-freshness view of the DNS <xref target="RFC2181"></xref>.  Unlike
serving-stale designs <xref target="RFC8767"></xref>, this design excludes staleness by
construction through the update contract.  The failure window of a
record within a publish period P is exactly max(0, 1 - T/P) of queries
(Appendix A.1).</t>
</section>

<section anchor="delegation"><name>Delegation and Scalability</name>
<t>Zones delegate to regional servers by prefix.  The delegation table is
kept sorted; resolution binary-searches per domain-prefix depth (only
the domain's own prefixes can match), giving O(depth * log N) lookup
instead of a linear scan.  Bulk registration appends in O(1) and lazily
re-sorts once (O(N log N) amortized).  Delegation is idempotent
(re-delegating a prefix replaces the regional pointer) and supports
undelegation (performed before destroying a regional server to avoid
dangling pointers).</t>
<t>For scale, a hierarchical network topology (cards -&gt; leaf switches -&gt;
spines -&gt; racks) yields closed-form hop counts (same leaf 2, same spine
4, same rack 6, cross rack 7 in the four-layer model), enabling
topology-aware replica selection and migration without dense distance
matrices.</t>
</section>
</section>

<section anchor="pivot"><name>Automated Pivoting</name>
<t>Pivoting is the resolver/controller's automatic switching of data
access.  Three pivots are specified; all are driven by closed-form
models (Appendix A) and can be overridden by policy.</t>
<t>The pivoting control loop:</t>

<artwork><![CDATA[      +------------------+  per-domain freq,    +------------------+
      | agent statistics |  latency, source     | closed-form      |
      | (observe)        |--------------------->| decision (plan)  |
      +------------------+                      +------------------+
                                                 |
              +------------------+---------------+------------------+
              v                  v                                  v
      +------------------+  +------------------+  +------------------+
      | runtime pivot:   |  | placement pivot: |  | fault pivot:     |
      | replica select   |  | hot/cold migrate |  | failover         |
      +------------------+  +------------------+  +------------------+
]]></artwork>

<section anchor="runtime-pivot"><name>Runtime Pivot: Replica Selection</name>
<t>For each matched shard, the resolver selects the replica minimizing</t>

<artwork><![CDATA[   cost(r) = lat(r) + data_size / bw(r) + net(src, node(r))
]]></artwork>
<t>where net() is the network latency from the request source to the
replica's node (closed-form hops x per-hop latency in hierarchical
topologies).  This is a per-request pivot: as the request source
distribution changes, the chosen replica changes automatically.
Selection prefers the cheapest reachable replica; ties are broken
deterministically (e.g., first in record order).  Source-dependent
resolution has a direct precedent in the DNS: the EDNS Client Subnet
option <xref target="RFC7871"></xref>, which likewise makes the answer depend on the
requester's location.</t>
<t>Placement of replicas themselves (the k-median objective over access
sources) is a control-plane function; on hop-metric topologies the cost
is constant within a leaf, so leaf-aggregated k-median is exactly
equivalent to card-level k-median and costs O(N + k*L^2) instead of
O(N^2) (Appendix A.4).</t>
</section>

<section anchor="placement-pivot"><name>Placement Pivot: Hot/Cold Migration</name>
<t>A control loop observes per-domain access frequency and latency (or
accepts injected observations) and plans a migration when the
frequency-weighted benefit exceeds the one-time DMA cost plus
hysteresis:</t>

<artwork><![CDATA[   benefit = f * (cost(current) - cost(dest)) > dma_time * 1.1
]]></artwork>
<t>The destination minimizes dma_time + f * cost(dest) among candidates;
the request source is taken into account (src-aware destination
choice).  On success the controller adds the new replica, sets the old
record's TTL, performs the copy, and removes the old replica (DNS
update contract, <xref target="cache"></xref>).</t>
<t>The migration workflow is:</t>

<ol spacing="compact">
<li>observe per-domain access frequency and latency (or accept injected
observations);</li>
<li>plan: compute benefit (above); if benefit &gt; dma_time * 1.1, choose
the src-aware destination minimizing dma_time + f * cost(dest);</li>
<li>execute: add the new replica; set the old replica's TTL; perform the
DMA copy; remove the old replica;</li>
<li>update: invalidate cached copies, then replace the record <xref target="cache"></xref>;
the new version is visible on the next resolve.</li>
</ol>
<t>Migration is unidirectional (hot -&gt; fast tier) by default; a
near-zero-frequency shard on an expensive medium can be demoted to the
pool (cold demotion).  Write amplification is bounded: with no
cool-back path and 10% hysteresis, each domain migrates at most once
per hot period, so WA &lt;= number of domains (one pass each), independent
of drift frequency (Appendix A.2).</t>
</section>

<section anchor="fault-pivot"><name>Fault Pivot: Failover</name>
<t>Replica redundancy provides failover: with two replicas, removal of one
leaves resolution serving the other; removal of all replicas makes the
record unreachable and resolution fails.  Zone-level faults are
isolated: a failed zone's records resolve to failure while other zones
continue to serve.  Resolver restart reconnects to the same
authoritative tree; zone rebuild (undelegate -&gt; destroy -&gt; recreate -&gt;
re-delegate) restores service.  Rebuild is preceded by local-cache
invalidation (the cache holds borrowed record pointers, <xref target="cache"></xref>).</t>
<t>The zone-rebuild workflow is:</t>

<ol spacing="compact">
<li>invalidate local caches holding borrowed record pointers;</li>
<li>undelegate the zone prefix;</li>
<li>destroy the regional server;</li>
<li>recreate the regional server;</li>
<li>re-delegate the prefix; resolvers reconnect to the same tree on
restart.</li>
</ol>
</section>

<section anchor="cache-pivot"><name>Cache-Benefit Pivot (Closed Form)</name>
<t>Whether the local cache should even serve a domain depends on the miss
cost M (in-process ~0.2 us; networked/remote up to milliseconds).  With
hit cost H, maintenance cost m, and hit rate h, the cached average
latency is</t>

<artwork><![CDATA[   avg = h*H + (1-h)*(M + m)
]]></artwork>
<t>The cache is net-positive iff M &gt; M* = H + m<em>(1-h)/h (Appendix A.3).
Resolvers expose M</em> to the control plane so that caching can be
disabled when the miss path is cheap (small in-process systems) and
enabled when it is expensive (distributed BMS), pivoting the caching
policy itself.</t>
</section>
</section>

<section anchor="proto"><name>Protocol Considerations</name>

<section anchor="rectypes"><name>Record Types</name>
<t>This document defines the following conceptual record types.  No wire
encoding is standardized; <xref target="wire"></xref> sketches one for illustration only.</t>

<ul spacing="compact">
<li>MEM-A: placement record (owner, TTL, RW mode, shards, replicas with
node/medium/bandwidth/latency/affine map).</li>
<li>MEM-NS: zone delegation (prefix -&gt; regional server).</li>
<li>MEM-CNAME: tensor-name alias.</li>
<li>MEM-MIGRATE: control record for a planned migration (src replica,
dest replica, data size, benefit estimate); created by the
controller, consumed by the executor.</li>
<li>MEM-FAIL: transient negative record marking a zone/record as
unreachable (failure pivot cache).</li>
</ul>

<section anchor="wire"><name>Wire Encoding Sketch (Illustrative)</name>
<t>This section sketches a Type-Length-Value (TLV) wire encoding for the
conceptual records of <xref target="rectypes"></xref>, for illustration only; it is not
normative.  A future standards-track encoding could use CBOR
<xref target="RFC8949"></xref> instead.  All multi-octet fields are in network byte order.
A record is a sequence of TLVs; the first TLV is the record header.</t>
<t>The record header layout:</t>

<artwork><![CDATA[     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | type = 0x0001                | length                         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | rtype | ttl (4 octets, seconds)                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | ttl (cont.)   | rw  | owner (1-octet length + octets)         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
<t>Header fields:</t>

<ul spacing="compact">
<li>rtype (1 octet): 0x01 MEM-A | 0x02 MEM-NS | 0x03 MEM-CNAME | 0x04
MEM-MIGRATE | 0x05 MEM-FAIL;</li>
<li>ttl (4 octets): authoritative freshness, seconds;</li>
<li>rw (1 octet): 0x01 RO | 0x02 WO | 0x03 RW;</li>
<li>owner (variable): domain name, octets of the canonical &quot;a/b/c&quot; form,
length-prefixed (1 octet).</li>
</ul>
<t>Body TLVs:</t>

<ul spacing="compact">
<li>0x02 shard: lo/hi index range (each 4 octets) per dimension,
dimension count (1 octet) first;</li>
<li>0x03 replica: node (4 octets), medium (1 octet, registry <xref target="iana"></xref>),
bandwidth (4 octets, GB/s x 1000), latency (4 octets, ns), affine
stride matrix (k*r*8 octets), modulus vector (k*8 octets);</li>
<li>0x04 src-replica: node (4) + medium (1);</li>
<li>0x05 dest-replica: node (4) + medium (1);</li>
<li>0x06 data-size (8 octets) + benefit (8 octets, ns);</li>
<li>0x07 fail-window (4 octets, seconds; bounded, <xref target="security"></xref>).</li>
</ul>
<t>Unrecognized TLV types are skipped (their length is known); a
malformed record (length overflow, unknown rtype) causes the whole
record to be rejected (fail closed).</t>
</section>
</section>

<section anchor="dns-rel"><name>Relationship to the DNS Protocol</name>
<t>MemDNS reuses DNS concepts (hierarchy, delegation, caching, TTL,
CNAME/NS semantics) but is NOT the Internet DNS: domains are memory
tensor names, records carry physical placement, and resolution is an
in-process or in-network function with microsecond budgets rather than
a global distributed database.  MemDNS deployments are limited domains
<xref target="RFC8799"></xref>, and the acronym MemDNS (Memory DNS) is unrelated to
Multicast DNS (mDNS) <xref target="RFC6762"></xref>.  Interoperability with the Internet
DNS is neither required nor precluded; a MemDNS root could in principle
be served by a DNS server with an extended record type, but latency
budgets make that deployment-specific.</t>
</section>
</section>

<section anchor="impl"><name>Reference Implementation</name>
<t>A reference implementation (&quot;MemDNS&quot; <xref target="memdns-impl"></xref>, C library +
framework integration) exercises every mechanism in this document:</t>

<ul spacing="compact">
<li>resolver hierarchy with per-resolver caches, pooled nodes, clock
eviction, TTL contract, prefix invalidation;</li>
<li>delegation with lazy sorting, per-depth binary search, idempotent
re-delegation, undelegation;</li>
<li>shard matching, replica selection (src-aware), coordinate mapping
(incremental + wrap-free segment fill);</li>
<li>migration controller (frequency-weighted, hysteresis, cold demotion),
fault injection suite (remove/restore, zone isolation, replica
failover, resolver restart, zone rebuild);</li>
<li>validation: guest-kernel (qemu + Linux 6.6 + devdax) resolution and
data-plane runs; third-party simulator cross-checks.</li>
</ul>
<t>The closed-form models (Appendix A) and key logics (Appendix C) are
empirically verified: TTL failure window bit-exact against
max(0,1-T/P); miss-cost threshold M* = 0.217 us with benefit converging
to the hit rate at millisecond miss costs; WA upper bound = domain
count.</t>
</section>

<section anchor="security"><name>Security Considerations</name>
<t>This section follows the guidelines of <xref target="RFC3552"></xref>.  The threat model is
a multi-tenant big memory system in which an attacker can observe or
inject resolution traffic, publish forged records, or issue
unauthorized migration requests; the objectives are layout
confidentiality, resolution integrity, and availability against cache
thrashing.  The mitigations below mirror the defenses for DNS cache
poisoning <xref target="RFC5452"></xref>.</t>
<t>MemDNS records describe physical memory placement; exposure of these
records to unauthorized parties reveals memory layout and access
patterns.  Deployments authenticate resolver-to-server and
server-to-server communication in multi-tenant settings, and encrypt
record payloads where layout secrecy matters.  The update contract
<xref target="cache"></xref> requires invalidate-before-replace; an attacker able to
inject invalidation can force resolution churn (denial of service via
cache thrashing).  Control records (MEM-MIGRATE) are accepted only from
authorized controllers to prevent malicious migration (data movement
attacks, media wear amplification).  Fault-pivot negative caching
(MEM-FAIL) is bounded in time to avoid permanent black-holing of a
recovered zone.</t>
</section>

<section anchor="iana"><name>IANA Considerations</name>
<t>This document has no IANA actions.  The registries below are included
for illustration only; should a future standards-track document
standardize the encoding of <xref target="wire"></xref>, an Expert Review registry could be
defined along these lines:</t>
<t>Registry name: Memory DNS Record Types (illustrative)</t>
<table>
<thead>
<tr>
<th align="left">Type</th>
<th align="left">Name</th>
<th align="left">Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td align="left">0x01</td>
<td align="left">MEM-A</td>
<td align="left">this document, Section 6.1.1</td>
</tr>

<tr>
<td align="left">0x02</td>
<td align="left">MEM-NS</td>
<td align="left">this document, Section 6.1.1</td>
</tr>

<tr>
<td align="left">0x03</td>
<td align="left">MEM-CNAME</td>
<td align="left">this document, Section 6.1.1</td>
</tr>

<tr>
<td align="left">0x04</td>
<td align="left">MEM-MIGRATE</td>
<td align="left">this document, Section 6.1.1</td>
</tr>

<tr>
<td align="left">0x05</td>
<td align="left">MEM-FAIL</td>
<td align="left">this document, Section 6.1.1</td>
</tr>

<tr>
<td align="left">0x06-0xEF</td>
<td align="left">Unassigned</td>
<td align="left"></td>
</tr>

<tr>
<td align="left">0xF0-0xFF</td>
<td align="left">Private use</td>
<td align="left"></td>
</tr>
</tbody>
</table><t>Registry name: Memory DNS Medium Types (illustrative)</t>
<table>
<thead>
<tr>
<th align="left">Value</th>
<th align="left">Medium</th>
<th align="left">Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td align="left">0x01</td>
<td align="left">SRAM/SMEM</td>
<td align="left"><xref target="memdns-impl"></xref></td>
</tr>

<tr>
<td align="left">0x02</td>
<td align="left">HBM</td>
<td align="left"><xref target="memdns-impl"></xref></td>
</tr>

<tr>
<td align="left">0x03</td>
<td align="left">DDR</td>
<td align="left"><xref target="memdns-impl"></xref></td>
</tr>

<tr>
<td align="left">0x04</td>
<td align="left">CXL</td>
<td align="left"><xref target="memdns-impl"></xref></td>
</tr>

<tr>
<td align="left">0x05</td>
<td align="left">PIM array</td>
<td align="left"><xref target="pim-facil"></xref></td>
</tr>
</tbody>
</table></section>

</middle>

<back>
<references><name>Informative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2181.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2308.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3552.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4035.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5452.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5936.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6762.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7871.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8499.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8767.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8799.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8914.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8949.xml"/>
<reference anchor="cxl" target="https://www.computeexpresslink.org/">
  <front>
    <title>CXL Specification Revision 3.1</title>
    <author>
      <organization>Compute Express Link Consortium</organization>
    </author>
    <date year="2023"></date>
  </front>
</reference>
<reference anchor="memdns-impl" target="">
  <front>
    <title>Memory DNS: semantic addressing for heterogeneous memory&#xA;    systems -- implementation and evaluation</title>
    <author>
      <organization>MemDNS project</organization>
    </author>
    <date year="2026"></date>
  </front>
</reference>
<reference anchor="pim-facil" target="">
  <front>
    <title>FACIL-style processing-in-memory array layouts as expressed&#xA;    through MemDNS placement records (2-D logical index, identity&#xA;    affine to array coordinates)</title>
    <author>
      <organization>MemDNS project</organization>
    </author>
    <date year="2026"></date>
  </front>
</reference>
</references>

<section anchor="appA"><name>Closed-Form Decision Models</name>
<t>A.1.  TTL failure window: with authoritative TTL T and publish period
P, the fraction of queries that fail (record expired, no fresh copy) is
max(0, 1 - T/P); the break-even point is T* = P.  Verified bit-exact.</t>
<t>A.2.  Migration write amplification: with unidirectional migration and
10% hysteresis, WA &lt;= #domains (each domain migrates at most once per
hot period); lifetime scales as 1/(1 + WA) under a fixed program/erase
budget.</t>
<t>A.3.  Cache benefit threshold: M* = H + m<em>(1-h)/h; the cache is
net-positive iff miss cost M &gt; M</em>.  Benefit converges to h as M -&gt;
infinity.</t>
<t>A.4.  Hierarchical k-median: under hop-metric topologies the cost is
constant within a leaf; leaf-aggregated k-median with local search is
exactly equivalent to card-level k-median and runs in O(N + k*L<sup>2).</sup></t>
</section>

<section anchor="appB"><name>RFC 8499 Terminology Mapping</name>
<table>
<thead>
<tr>
<th align="left">RFC 8499 term</th>
<th align="left">MemDNS counterpart</th>
</tr>
</thead>

<tbody>
<tr>
<td align="left">Fully Qualified Domain Name (FQDN)</td>
<td align="left">Canonical tensor domain (e.g., &quot;model/enc/l3/w/shard2&quot;)</td>
</tr>

<tr>
<td align="left">Resource Record (RR)</td>
<td align="left">Placement record (MEM-A)</td>
</tr>

<tr>
<td align="left">CNAME</td>
<td align="left">MEM-CNAME (tensor-name alias)</td>
</tr>

<tr>
<td align="left">Zone</td>
<td align="left">Memory zone (delegated prefix)</td>
</tr>

<tr>
<td align="left">Authoritative server</td>
<td align="left">Regional server holding the record</td>
</tr>

<tr>
<td align="left">Resolver</td>
<td align="left">In-process/in-network MemDNS resolver</td>
</tr>

<tr>
<td align="left">Recursive resolution</td>
<td align="left">Cache -&gt; regional -&gt; root walk</td>
</tr>

<tr>
<td align="left">Cache</td>
<td align="left">Per-resolver local cache (TTL)</td>
</tr>

<tr>
<td align="left">TTL</td>
<td align="left">Authoritative freshness window</td>
</tr>

<tr>
<td align="left">Negative caching</td>
<td align="left">MEM-FAIL bounded fail window</td>
</tr>

<tr>
<td align="left">Zone transfer</td>
<td align="left">not applicable; publish via invalidate+replace</td>
</tr>

<tr>
<td align="left">DNSSEC</td>
<td align="left">future work; layout integrity/auth <xref target="security"></xref></td>
</tr>
</tbody>
</table><t>Zone transfer <xref target="RFC5936"></xref> is not applicable: the control plane publishes
via invalidate+replace.  Layout integrity and record authentication (a
DNSSEC <xref target="RFC4033"></xref><xref target="RFC4034"></xref><xref target="RFC4035"></xref> analogue) are future work
<xref target="security"></xref>.</t>
<t>Differences: MemDNS domains carry tensor semantics and physical
placement; resolution budgets are microseconds (in-process or
in-network) rather than Internet-scale; updates are push-based
(invalidate-before-replace) rather than zone-transfer-based.</t>
</section>

<section anchor="appC"><name>Key Logic (Pseudo-Code)</name>
<t>C.1.  Resolution (<xref target="resflow"></xref>)</t>

<sourcecode type="pseudocode"><![CDATA[resolve(d, J, src):
  rr = local_cache.lookup(d)
  if rr != null and not expired(rr.ttl):
    return rr
  rr = regional_server.query(d)
  if rr != null:
    local_cache.insert(d, rr)
    return rr
  (zone, server) = root.longest_prefix_match(d)
  if zone == null:
    return NODATA                  # clean failure
  rr = server.query(d)
  if rr != null and rr.replicas not empty:
    local_cache.insert(d, rr)
    return rr                      # zero-replica = unreachable
  return NODATA
]]></sourcecode>
<t>C.2.  Replica Selection (<xref target="runtime-pivot"></xref>)</t>

<sourcecode type="pseudocode"><![CDATA[select_replica(replicas, src, bytes):
  best = replicas[0]
  best_cost = cost(best)
  for r in replicas[1..]:
    c = topo_latency(src, r.node)
        + bytes / (r.bandwidth * (1 - r.load))
    if c < best_cost:              # first in order wins ties
      best = r
      best_cost = c
  return best

select_multi_source(replicas, src, bytes, k):   # S8
  for r in replicas:
    w[r] = min(r.bandwidth * (1 - r.load),
               topo_path_bandwidth(src, r.node))
  return chunks proportional to w[r] / sum(w); wall = max over
  streams
]]></sourcecode>
<t>C.3.  Migration (<xref target="placement-pivot"></xref>)</t>

<sourcecode type="pseudocode"><![CDATA[plan_migration(d, freq, cost, src):
  dest = argmin_cand dma(cand) + freq * cost(cand)  # src-aware
  benefit = freq * (cost(current) - cost(dest))
  if benefit > dma(dest) * 1.1:    # 10% hysteresis
    return dest
  if freq < 1 and current.medium in {HBM, SRAM}:
    return CXL                      # cold demotion
  return null

execute_migration(d, dest):
  invalidate_cache(d)               # invalidate-before-replace
  add_replica(d, dest)
  old.set_ttl(grace)
  dma_copy(old, dest)
  remove_replica(old)
  dns_update(d)                     # visible on next resolve
]]></sourcecode>
<t>C.4.  Failover (<xref target="fault-pivot"></xref>)</t>

<sourcecode type="pseudocode"><![CDATA[on_replica_removed(rr, r):
  remove_replica(rr, r)
  if rr.replicas empty:
    mark rr unreachable             # resolution fails cleanly
  else:
    invalidate_cache(rr.owner)      # next resolve re-pivots

rebuild_zone(zone):
  invalidate_cache(prefix zone)
  undelegate(zone)
  destroy(server)
  recreate(server)
  redelegate(zone, server)
  resolver_restart()
]]></sourcecode>
</section>

</back>

</rfc>
