Design: Domain Name System (DNS)
Design focuses on the DNS resolution process and infrastructure. Does not cover domain registration or web hosting services.
Functional Requirements
Non-Functional Requirements
Client (Stub Resolver)
|
v
Recursive Resolver (with Cache)
|
v
+-------------------+
| Root DNS Servers |
+-------------------+
|
v
+-------------------+
| TLD DNS Servers |
+-------------------+
|
v
+-------------------+
| Authoritative DNS |
| Servers |
+-------------------+cache = {"example.com": "93.184.216.34"}
query = "example.com"
if query in cache:
ip = cache[query]
else:
ip = "198.51.100.1" # IP from authoritative server
print(ip)
What will be the output when this code runs?Pass the test and this pattern moves unknown