Unreachable Providers (client): Decreased Re-Provide Delay/Record TTL #9984
Labels
effort/weeks
Estimated to take multiple weeks
exp/expert
Having worked on the specific codebase is important
kind/feature
A new feature
P2
Medium: Good to have, but can wait until someone steps up
topic/config
Topic config
topic/design-ux
UX strategy, research, not solely visual design
topic/provider
Topic provider
Checklist
Description
Checklist
Description
This is the corresponding issue for a client side change to mitigate the impact of large numbers of unreachable providers.
Context
The context is explained in #9982.
Proposal
We identified two ways forward to address the impact of unreachable providers.
This GH issue is for proposal 2).
The discussion around 1) happens in #9982
1. Delay Provider Record Publication
The idea here is that we change the default configuration to only reprovide blocks after a Kubo node has had a consecutive uptime of
X
minutes/hours/days. The assumption is that nodes which have been online for a long time straight, will likely stay online and are stable.There are some nuances to consider here (copied from probe-lab/network-measurements#49 (comment)):
Today, block reproviding is a global flag in Kubo (IPFS Desktop, Brave): we do not distinguish between blocks fetched while browsing websites (temporarily stored in the cache), and blocks imported by user by adding their own data to local node (either pinned, in MFS, or just in cache). Both types of data are stored and reprovided by the same code paths, and we can't rely on pinning and MFS to identify user data, because ipfs block put and ipfs dag put do not pin by default.
That is to say, disabling reproviding only for third-party content is not trivial: to only stop reproviding third-party website data, we would have to introduce separate datastores with different reproviding settings for first-party and third-party blocks in Kubo.
Content explicitly imported by the user (
ipfs add
,ipfs dag put
,ipfs block put
,ipfs dag import
), or pinned by user, would be added/moved to first-party datastore.A different, a bit simpler approach would be to keep a single datastore, but instead introduce a new default "auto" Reprovider.Strategy that:
optionalDuration
Reprovider.UnpinnedDelay
to allow users to adjust the implicit default)ipfs dag put
andipfs block
put or other user content that is not pinned, but expected to "work instantly:--pin
in them totrue
→ breaking change (may surprise users who expect these to not keep garbage around, may lead to services running out of disk space)Reprovider.Strategy
toall
and/or adjustReprovider.UnpinnedDelay
are enough here,ipfs routing provide
exists, we could add--all
to allow apps/users to manually trigger provide beforeReprovider.UnpinnedDelay
hits. (feels safer than A, no DoS, worst case a delay in announce on a cold boot)A personal remark: It would be great if the user content that is expected to "work instantly" could make use of the fast provide operation. I think these commands are not blocking right now, correct? Using optimistic provide could justify making them blocking. But again, the provide strategy is a global switch. It would be great if the application layer could have more control over the publication process based on its specific needs.
2. Decreased Provider Record TTL
The idea here is to keep everything as is and just transmit the desired provider record TTL. The TTL would be calculated based on the nodes uptime only become a high number if the node has been up for
X
minutes/hours/days.At the first glance this is a breaking protocol change but protobuf allows to add new fields without breaking old implementations (see comment from @guillaumemichel probe-lab/network-measurements#49 (comment)). This means we could add the new field and nodes that understand it could adhere to the TTL the provider wants to set. Everyone else would just continue as before.
Some things to consider:
Measurements
TBD: How can we substantiate the proposal with numbers? some ideas
References
The text was updated successfully, but these errors were encountered: