Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Proposal for simple request-level block cache #9

Closed
wants to merge 1 commit into from
Closed

Conversation

willscott
Copy link
Contributor

Maybe we do an A-B test to see what's more effective between a single LRU cache across all accesses, versus this model of keeping a small cache that's only scoped to inbound HTTP requests.

I can make libraries for both and we can come up with a config flag for which one(s) we turn on.

@willscott willscott requested a review from hacdias February 6, 2023 11:35
@willscott
Copy link
Contributor Author

fix #5

@willscott
Copy link
Contributor Author

@aschmahmann may have thoughts on the right caching things to prototype / experiment with in this context

@aschmahmann
Copy link

@willscott yeah, I agree that we're going to need some experimentation here and that the two thoughts you mentioned were going to be the easiest to start with. However, there's a wide range of options here that we may have to explore and A-B test to figure out what's best.

However, IMO these components should probably live in bifrost-gateway rather than caboose as it minimizes the scope of the component to basically do the saturn-specific things and makes it easier for them to own it. What we end up going with ends up being pretty specific to that deployment rather than the Saturn logic of where to get stuff.

If the components end up being non-trivial and reusable they could end up moving to go-libipfs as well.

@aschmahmann
Copy link

Here's one that uses a global LRU in bifrost-gateway ipfs-inactive/bifrost-gateway#15.

I'd like us to have the option of a request-level cache as well, probably leveraged by using sessions on the exchange interface. I'm trying to avoid calls like Has living in Caboose though as they'll likely end up breaking abstraction layers (i.e. we do not have something if it maybe lives in a remote node multiple hops away).

@aarshkshah1992
Copy link
Contributor

IIUC, this will now be moved to the Gateway, right ?

@lidel
Copy link
Contributor

lidel commented Feb 22, 2023

@aarshkshah1992 we have global block cache based on TwoQueueCache: https://github.com/ipfs/bifrost-gateway/blob/main/blockstore_cache.go

Request-level could be added, if we find the need for it, but this should happen in biforst-gateway (which has understanding of requested content paths), and not caboose.

Let's close this to avoid confusion.

@lidel lidel closed this Feb 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants