Open
Bug 2087407
Opened 25 days ago
Updated 14 days ago
Persist TRR DNS cache entries (incl. HTTPS RRs) on application-background and restore them at startup
Categories
(Core :: Networking: DNS, enhancement, P2)
Core
Networking: DNS
Tracking
()
ASSIGNED
People
(Reporter: leggert, Assigned: leggert)
References
Details
(Whiteboard: [necko-triaged][necko-priority-next])
Attachments
(1 external file)
On Android the parent process is frequently killed while backgrounded. After a kill the nsHostResolver cache is empty, so with TRR every first lookup after relaunch needs a DoH round trip, and HTTPS records (ECH configs, ALPN) are lost, so the first connection to a site cannot use ECH or go straight to HTTP/3.
Proposal, behind a new pref network.dns.cache_persistence (default false):
- On
application-background, snapshot positive, non-private, TRR-resolved address and HTTPS records and write them with wall-clock expiry on a background queue. - At startup, restore them with their remaining validity and grace period, without overwriting existing entries; discard the snapshot if the TRR URI changed or TRR is disabled.
- Delete the snapshot in
nsDNSService::ClearCacheand onCLEAR_NETWORK_CACHE.
Native records are not persisted: they are flushed on network changes, the network ID cannot identify a network across restarts (bug 1817756), and Android's resolver has its own cache.
Prior art: bug 532830 (WONTFIX, before Gecko had real TTLs, which TRR now provides).
| Assignee | ||
Comment 1•21 days ago
|
||
Updated•21 days ago
|
Assignee: nobody → leggert
Status: NEW → ASSIGNED
Updated•14 days ago
|
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-next]
You need to log in
before you can comment on or make changes to this bug.
Description
•