DoH Rollout Extension: Do not run heuristics on network change if network ID is unchanged
Categories
(Firefox :: Security, enhancement, P3)
Tracking
()
People
(Reporter: mcrawford, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [trr])
Attachments
(1 obsolete file)
Ported from GitHub issue #145
Summary:
We should remember the network ID, and on connection change, check to see if the current network ID is different from the previous one, and only run heuristics if they are.
Exception: when network id is empty, we always run heuristics, because it could be the case when platform fails to reliably calculate a network id.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•4 years ago
|
||
IIUC, the patch in bug 1600109 doesn't address this issue.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
We want to cache heuristic results based on networkID
A short logic would be:
- check if network id is in cache
- if it is, use the heuristic results to set trr mode and trigger heuristics to update cache.
- if it is not wait for heuristics to complete.
Comment 4•4 years ago
|
||
This adds a simple in memory cache for the result of runHeuristics.
The added benefit is that we are able to immediately go to the
required TRR mode, without waiting for all the heuristics to complete.
Comment 5•4 years ago
|
||
While looking at bug 1626083, I explored the network id caching idea a bit to see if I could come up with something that would help with throttling telemetry event volume on volatile networks. I made this flow diagram, thought I'd leave it here in case it ever ends up being useful.
┌──────────────┐ ┌───────────────┐
│ │ │ network down │
│ network up │ └────────┬──────┘
│ │ │
└──┬───────────┴────────────┐ ┌──────────▼───────────────┐
│ │ │ reset all waiting/timers │
│ │ └──────────────────────────┘
│ │
┌─────────────────────▼──────┐ │
│ │ ┌───────▼──────────────┐
│captive portal connectivity ◄─────┐ │ network id available │
│ │ │ └──────┬───────────────┘
└────────────┬───────────────┘ │ │
│ │ │
┌──────────▼─────────────┐ │ ┌──────▼────────────────────┐ ┌────────┐
│waiting for connectivity│ │ │ cached result available? ├────►│ use it │
│from network id branch? │ │ └────────┬──────────────────┘ └────────┘
└──────────┬─────────────┘ │ │
│ │ │ no
│ │ ┌────▼──────────────────────────┐
│yes │ │captive portal service enabled?│
┌────────────────────────┐ │ │ └────┬──────────────────────────┘
│ Assumption: │ │ │ │ yes
│ networkID will always │ │ │ ┌─────▼─────────────────┐
│ become available on │ │ │ │ connectivity already? │
│ every network │ │ │ └────┬────────┬─────────┘
└────────────────────────┘ │ ┌──┴───┐ │ │
│ │ wait ◄───no──┘ │
│ └──────┘ │
│ │yes
│ │
│ │
│ ┌────────────────┐ │
└────────► run heuristics ◄────────────────┘
└────────┬───────┘
│
│
┌──────────────▼──────────────────┐
│update cache & record telemetry │
└─────────────────────────────────┘
Comment 6•4 years ago
|
||
Not actively working on this.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Description
•