Design a recursive resolver API (or caching layer in front of public DNS) that resolves hostnames to records with TTL respect, negative caching, and optional filtering. Protect against cache poisoning with DNSSEC validation pass-through where configured.
Functional requirements
- Resolve A/AAAA/CNAME for a hostname with full chain following
- Respect TTL from authoritative answers; serve stale on upstream failure optionally
- Negative cache NXDOMAIN with SOA TTL
- Rate limit clients and query logging for abuse investigation
Non-functional requirements
- Low latency on cache hits; bounded upstream fan-out on misses
- Resilience to upstream resolver outages
- Security: randomized query IDs and source port entropy when forwarding