Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateway: rollback IPNS #397

Open
Jorropo opened this issue Jun 27, 2023 · 1 comment
Open

gateway: rollback IPNS #397

Jorropo opened this issue Jun 27, 2023 · 1 comment
Labels
need/triage Needs initial labeling and prioritization

Comments

@Jorropo
Copy link
Contributor

Jorropo commented Jun 27, 2023

Currently IPNS over the DHT is very fast to find a record but it then waits for a while trying to contact various nodes trying to ensure this record is updated until a timeout is reached.
(see ipfs name resolve -s $SOME_IPNS_NAME)

We should start the gateway serving process as soon as the first record is found, but hold onto serving response.
If an other better record is found we can cancel the first request and make a new one, "rolling back".
Given reaching consensus on IPNS is often the longest thing before first byte, it would make the TTFB === IPNS resolution time, since initial data resolution (traversing path and ranges in the file until we find the first piece of data), provider record resolution and bitswap session building would be pipelined into quorum process.

Given bitswap sessions and the block cache it's also likely doing an outdated request first will accelerate the real request later. For example if I found you host an old version of some IPNS name, I think it's reasonable to optimistically ask you for the newer one when I learn about it even tho I didn't finished my provider record step yet.

@Jorropo Jorropo added the need/triage Needs initial labeling and prioritization label Jun 27, 2023
@Winterhuman
Copy link

As an additional consideration: ipfs/specs#274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants