# resolvd (resolvd)

> The stub resolver as built: how resolvd takes its scopes from netd and its fallbacks from the registry, routes, expands, caches and forwards every question, and answers it at the native socket, the 127.0.0.53 stub listener and the NSS shim.

The whole book as one markdown file: [/peios/advanced-peios/resolvd/print.md](/peios/advanced-peios/resolvd/print.md)

Contents:

- 1 [Introduction](/peios/advanced-peios/resolvd/introduction/overview.md)
    - 1.1 [Overview](/peios/advanced-peios/resolvd/introduction/overview.md)
    - 1.2 [What This Manual Covers](/peios/advanced-peios/resolvd/introduction/what-this-manual-covers.md)
    - 1.3 [Terminology](/peios/advanced-peios/resolvd/introduction/terminology.md)
- 2 [Startup And Configuration](/peios/advanced-peios/resolvd/startup-and-configuration/the-service.md)
    - 2.1 [The Service](/peios/advanced-peios/resolvd/startup-and-configuration/the-service.md)
    - 2.2 [Startup Sequence](/peios/advanced-peios/resolvd/startup-and-configuration/startup-sequence.md)
    - 2.3 [Registry Configuration](/peios/advanced-peios/resolvd/startup-and-configuration/registry-configuration.md)
    - 2.4 [Sockets and Descriptors](/peios/advanced-peios/resolvd/startup-and-configuration/sockets.md)
    - 2.5 [The Event Loop](/peios/advanced-peios/resolvd/startup-and-configuration/the-event-loop.md)
- 3 [The Netd Channel](/peios/advanced-peios/resolvd/the-netd-channel/subscription.md)
    - 3.1 [Subscription](/peios/advanced-peios/resolvd/the-netd-channel/subscription.md)
    - 3.2 [Reconnection and Backoff](/peios/advanced-peios/resolvd/the-netd-channel/reconnection.md)
    - 3.3 [Applying a Snapshot](/peios/advanced-peios/resolvd/the-netd-channel/applying-a-snapshot.md)
- 4 [The Engine](/peios/advanced-peios/resolvd/the-engine/how-a-question-is-answered.md)
    - 4.1 [How a Question Is Answered](/peios/advanced-peios/resolvd/the-engine/how-a-question-is-answered.md)
    - 4.2 [Synthetic Names](/peios/advanced-peios/resolvd/the-engine/synthetic-names.md)
    - 4.3 [Single-Label Expansion](/peios/advanced-peios/resolvd/the-engine/single-label-expansion.md)
    - 4.4 [Scope Routing](/peios/advanced-peios/resolvd/the-engine/scope-routing.md)
    - 4.5 [The Cache](/peios/advanced-peios/resolvd/the-engine/the-cache.md)
    - 4.6 [Servers, Attempts and Timeouts](/peios/advanced-peios/resolvd/the-engine/servers-attempts-and-timeouts.md)
    - 4.7 [The Upstream Query](/peios/advanced-peios/resolvd/the-engine/the-upstream-query.md)
    - 4.8 [Reply Validation](/peios/advanced-peios/resolvd/the-engine/reply-validation.md)
    - 4.9 [Lookup and Reverse](/peios/advanced-peios/resolvd/the-engine/lookup-and-reverse.md)
    - 4.10 [Counters](/peios/advanced-peios/resolvd/the-engine/counters.md)
- 5 [The Native Socket](/peios/advanced-peios/resolvd/the-native-socket/framing-and-limits.md)
    - 5.1 [Framing and Limits](/peios/advanced-peios/resolvd/the-native-socket/framing-and-limits.md)
    - 5.2 [The Access Check](/peios/advanced-peios/resolvd/the-native-socket/the-access-check.md)
    - 5.3 [Requests](/peios/advanced-peios/resolvd/the-native-socket/requests.md)
- 6 [The Stub Listener](/peios/advanced-peios/resolvd/the-stub-listener/receiving-queries.md)
    - 6.1 [Receiving Queries](/peios/advanced-peios/resolvd/the-stub-listener/receiving-queries.md)
    - 6.2 [Rendering Replies](/peios/advanced-peios/resolvd/the-stub-listener/rendering-replies.md)
- 7 [The Nss Shim](/peios/advanced-peios/resolvd/the-nss-shim/the-module.md)
    - 7.1 [The Module](/peios/advanced-peios/resolvd/the-nss-shim/the-module.md)
    - 7.2 [Forward Lookups](/peios/advanced-peios/resolvd/the-nss-shim/forward-lookups.md)
    - 7.3 [Reverse Lookups](/peios/advanced-peios/resolvd/the-nss-shim/reverse-lookups.md)
- 8 [The Resolv Command](/peios/advanced-peios/resolvd/the-resolv-command/the-resolv-command.md)
    - 8.1 [The resolv Command](/peios/advanced-peios/resolvd/the-resolv-command/the-resolv-command.md)
- 9 [Failure Modes](/peios/advanced-peios/resolvd/failure-modes/reading-resolvds-state.md)
    - 9.1 [Reading resolvd's State](/peios/advanced-peios/resolvd/failure-modes/reading-resolvds-state.md)
    - 9.2 [Names Do Not Resolve](/peios/advanced-peios/resolvd/failure-modes/names-do-not-resolve.md)
    - 9.3 [resolvd Cannot Be Reached](/peios/advanced-peios/resolvd/failure-modes/resolvd-cannot-be-reached.md)
    - 9.4 [Stalls and Loops](/peios/advanced-peios/resolvd/failure-modes/stalls-and-loops.md)
- Appendix A [Constants and Limits](/peios/advanced-peios/resolvd/constants-and-limits.md)
- Appendix B [Registry Keys](/peios/advanced-peios/resolvd/registry-keys.md)
