Skip to content

fix: abort race contestants when all fulfill#48

Merged
vasco-santos merged 1 commit intomainfrom
fix/abort-race-contestants-when-all-fulfill
Oct 11, 2022
Merged

fix: abort race contestants when all fulfill#48
vasco-santos merged 1 commit intomainfrom
fix/abort-race-contestants-when-all-fulfill

Conversation

@vasco-santos
Copy link
Copy Markdown
Contributor

@vasco-santos vasco-santos commented Sep 6, 2022

This PR updates ipfs-gateway-race lib to support an option to abort specific race contestants on demand. When consumers opt in for noAbortRequestsOnWinner they can abort when needed.

In edge-gateway, we rely on ipfs-gateway-race with noAbortRequestsOnWinner because we track TTFB of each gateway. However, as soon as fetch promise of gateway requests is fulfilled we can abort the non winner contestants to not get extra bandwidth consumed.

Closes #11

@vasco-santos vasco-santos force-pushed the fix/abort-race-contestants-when-all-fulfill branch 2 times, most recently from c2778a2 to a6930eb Compare September 6, 2022 09:59
@vasco-santos vasco-santos marked this pull request as ready for review September 6, 2022 10:07
@vasco-santos vasco-santos force-pushed the fix/abort-race-contestants-when-all-fulfill branch from a6930eb to 5ce70d5 Compare October 10, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edge Gateway should Abort race responses after fetch

2 participants