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

Too many fetches #55

Open
fauno opened this issue Mar 14, 2024 · 4 comments
Open

Too many fetches #55

fauno opened this issue Mar 14, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@fauno
Copy link
Collaborator

fauno commented Mar 14, 2024

I added console.log to signedFetch() and mentionToActor. When performing an approval action for a single activity, I see all of these requests logged.

https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
fetchhttps://skel.sutty.local/about.jsonld#main-key
https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
https://skel.sutty.local/about.jsonld#main-key
https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
https://skel.sutty.local/about.jsonld
https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
https://fedi.sutty.nl/users/fauno
https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
https://fedi.sutty.nl/users/fauno/inbox
https://skel.sutty.local/.well-known/webfinger?resource=acct:[email protected]
https://fedi.sutty.nl/users/fauno
@fauno fauno added the enhancement New feature or request label Mar 14, 2024
@RangerMauve
Copy link
Contributor

Yeah we really need a caching layer with a TTL.

@fauno
Copy link
Collaborator Author

fauno commented Apr 25, 2024

Nice to have by the end of M4 if we can, but low priority.

@RangerMauve
Copy link
Contributor

This could be used to replace the default fetch: https://www.npmjs.com/package/node-fetch-cache

We should use the storage location via the fs.

We should also have a large TTL, maybe a few hours at least? Even a day?

@fauno
Copy link
Collaborator Author

fauno commented Jul 8, 2024

We should also have a large TTL, maybe a few hours at least? Even a day?

from what i've seen so far while developing caching on the side of the jekyll plugin, mastodon goes a good job at caching (it uses rails), so letting the caching library follow the remote instance headers for ttls should be ok

fauno added a commit that referenced this issue Jul 22, 2024
related to #55

when remote fetches are slow to respond, the whole request gets slow!
timeouting to 3s makes it more bearable.
@fauno fauno mentioned this issue Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants