/system-design-skills:dnsfrom system-design-skills
Designs DNS-based traffic routing: record types (A/CNAME/ALIAS), GeoDNS, latency-based steering, weighted/failover routing, TTL and propagation tradeoffs.
Ships in system-design-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
DNS is the global front door: it turns a name (api.example.com) into an address
before any request reaches your servers. It is also a routing layer — the same
lookup can hand different clients different answers (by region, latency, health,
or weight). Get it wrong and clients reach a dead region, fail over in minutes
instead of seconds, or cache a bad answer for hours. It is not a load balancer
and not a CDN; it decides which endpoint a client is told to use, not how bytes
are balanced inside that endpoint.
A service is reachable by a stable hostname; traffic must be steered to the closest or healthiest region/data center; or an endpoint's IP can change (a new load balancer, a failover site) and clients must follow without code changes. Multi-region or multi-data-center designs need DNS to pick the entry point; single-region designs still need it for a stable, movable name.
Routing inside one region — that is a load balancer's job (→ load-balancing),
which reacts in milliseconds, not TTL-bound minutes. Fine-grained per-request or
session-aware steering — DNS answers per lookup, then the client caches it. Fast
failover with sub-second recovery — DNS failover is gated by TTL and resolver
caching; do not promise instant cutover from the name layer. And do not reach for
exotic routing policies before a number shows users are spread across regions
(YAGNI) — a single A/ALIAS record is the right default for one region.
requirements-scoping)A vs CNAME/ALIAS)back-of-the-envelope)Record type (what the name returns)
A / AAAA — name → IPv4 / IPv6. Use when the endpoint has a stable IP.CNAME — name → another name. Use to alias onto a provider hostname; never at the zone apex (example.com).ALIAS / ANAME (provider-specific) — apex alias to a hostname. Use to point example.com at an LB/CDN hostname.NS / MX / TXT — delegation, mail, verification. Use as the domain requires; not traffic steering.Routing policy (which answer a client gets)
Reachability
content-delivery).| Option | What it solves | What it worsens | Change it when |
|---|---|---|---|
Simple A/ALIAS | Trivial; one stable name | No steering, no failover; SPOF if the IP dies | Traffic spans regions or needs DR → weighted/latency/failover |
| Weighted | Gradual shifts, canary, cluster balancing | Manual/slow; not health-aware unless paired with checks | You need automatic closeness → latency; or automatic cutover → failover |
| Latency-based | Lowest RTT per user automatically | Routes to resolver location, not user; needs per-region endpoints | Data residency matters more than speed → geolocation |
| Geolocation | Compliance, localized answers | Misroutes via VPN/forwarding resolvers; coarse map | Speed matters more than geography → latency-based |
| Failover | Automatic active-passive cutover | Recovery bounded by TTL + caching; cold standby risk | RTO must be sub-second → in-region LB, not DNS |
| Anycast | Nearest entry + absorbs DDoS | Operationally heavy (BGP); flap on route changes | You only have one site → not worth it |
DNS fails in slow, wide ways — a bad answer or an authoritative outage affects everyone who looks up next, and lingers as long as TTLs allow.
resilience-failure owns health-check tuning).Monitor: resolution latency and error/SERVFAIL rate, query QPS per record, health-check status per endpoint, time-to-propagate after a change, and the share of traffic each region/answer actually receives.
ALIAS
at the apex onto an LB/CDN hostname is the common default) and a routing policy
keyed to the steering goal: weighted for canary, latency for speed, geo for
residency, failover for active-passive DR.Decision | Solves | Worsens | Change it when… table with one row per choice you made here (e.g. the
option, its store, its failure policy); the last column is a concrete trigger
(a number or observable signal). Then name what breaks first.Do
ALIAS/ANAME at the apex onto an LB/CDN hostname so IP changes need no edits.Don't
CNAME at the zone apex — it is invalid; use ALIAS/ANAME.The quantities to estimate: the TTL, which sets both the propagation window
and the effective failover time (a 60 s TTL means up to ~60 s-plus of staleness,
not instant); the lookup QPS the TTL implies against authoritative servers
(shorter TTL → more queries); and a resolution latency budget (one extra
round trip, largely hidden by caching). Anchor these with rules of thumb and
peak-multiplier math in back-of-the-envelope — don't restate its tables here.
A DNS record is a contract: name (api.example.com), type (A/AAAA/
CNAME/ALIAS), value (IP or target hostname), TTL (seconds), and an
optional routing policy + health check. Example as a zone line:
api.example.com. 60 IN A 203.0.113.10 ; latency-policy, region us-east, health-check id hc-1
Decide per record: which policy selects it, what health check gates it, and the TTL that bounds its staleness.
Default to the generic recipe above. If the user names a cloud, read
references/providers/<provider>.md for the managed-service mapping,
quotas/limits, and provider-specific trade-offs. If no file exists for that
provider, the generic recipe is the answer.
To visualize the resolution path (client → recursive resolver → root/TLD/
authoritative → answer) or a geo/latency-steered multi-region front door, use the
in-plugin architecture-diagram skill. A quick inline sketch:
client → resolver → authoritative (policy: latency) → region A | region B.
load-balancing — complements this: DNS spreads traffic across regions/endpoints, while an LB spreads requests within a region and reacts in milliseconds.content-delivery — pairs with this: CDNs route users to edge POPs via anycast and DNS, and the anycast/edge-caching concept is owned there.resilience-failure — feeds into this: health-check tuning, failover, and degradation patterns (and rate limiting) are owned there and gate DNS failover.back-of-the-envelope — feeds into this: it supplies the TTL/QPS/latency math that sizes the record set and propagation window.system-design — owned-concept lives in the orchestrator: the reasoning loop, the trade-off method, and the ten failure modes.references/deep-dive.md — resolution hierarchy (recursive vs authoritative, root/TLD), the full record-type set, how TTL/propagation really behaves, anycast mechanics, and health-checked failover internals. Read when designing the DNS layer in detail.references/providers/{generic,aws,azure,gcp}.md — service mappings, limits, and pitfalls per environment.What SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/api-designThis skill should be used when the user needs to "design the API", do "endpoint design", pin down a "request/response shape", choose a "pagination" strategy (cursor vs offset), add an "idempotency key" to a write, plan "API versioning", an "error contract", or pick between "REST vs gRPC vs GraphQL" or "WebSocket vs polling". Use it whenever a design has reached the interface — the concrete request, response, primary access path, and how clients page, retry, and version — even if the user only said "the boxes talk to each other"./architecture-diagramThis skill should be used when a system design needs a diagram — "draw the architecture", "diagram this system", "show the components", "make an architecture/infrastructure/topology diagram", or visualizing boxes-and-arrows, data flow, regions, or failure paths for a design. It generates a self-contained dark-theme HTML + SVG diagram (with PNG/PDF export). Use it whenever the `system-design` orchestrator or a building block reaches the "draw it" step, even if the user doesn't say "diagram"./back-of-the-envelopeThis skill should be used when the user needs to "estimate QPS", "back-of-the-envelope" (BOTEC) numbers, "how much storage / bandwidth", "how many servers", "peak load", "capacity planning", or wants the standard latency / throughput / availability numbers to ground a design (latency table, QPS rates, powers of two, nines). Use it whenever a design decision hinges on scale — convert any "high traffic" / "huge data" phrase into concrete numbers before choosing components, even if the user doesn't say "estimate". Prefer it even for a quick "rough numbers" question (DAU × actions/day → QPS, storage per day/year, replication): it carries a calculator and the reference numbers, so the arithmetic and unit conversions are checked instead of done from memory./blob-storeThis skill should be used when the user wants a "blob store" or "object storage", names "S3" or an S3-compatible store, needs to "store images / video / files", asks about "multipart upload" or "resumable upload", "signed / presigned URLs", "media storage", "unstructured data at scale", object "versioning", storage "tiering" (hot/cold/archive), or "erasure coding" vs replication for durability. Use it whenever a design must hold large unstructured objects (photos, video, backups, logs, ML datasets) and serve them cheaply and durably, even if the user just says "where do we put the files"./cachingThis skill should be used when the user asks about a "caching strategy", "cache invalidation", "what to cache", "read-through vs write-through vs write-back", "cache eviction" (LRU/LFU/TTL), "Redis vs Memcached", "stale reads", or hits "thundering herd", "cache stampede", "cache penetration", or "hot key" problems, or is choosing a Redis `maxmemory` eviction policy (allkeys-lru, volatile-lru, noeviction) vs TTL expiry for sessions or other cached state. Use it whenever a design is read-heavy or a datastore is overloaded by reads, even if the user doesn't say "cache"./consistency-coordinationThis skill should be used when the user asks about the "CAP theorem", "PACELC", a "consistency model", "eventual vs strong consistency", "read-your-writes", "causal consistency", "quorum" or "R+W>N", "consensus", "Raft / Paxos", "leader election", "consistent hashing", a "distributed transaction", "2PC", or "saga". Use it whenever a design has multiple copies of data or coordinating nodes and a decision hinges on what a reader is guaranteed to see during replication lag, a network partition, or a node failure — even if the user doesn't say "consistency".npx claudepluginhub proyecto26/system-design-skills --plugin system-design-skillsOther plugins' skills for the same job