This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
L1 cache miss escapes to the X
closest peers L2 peers in the L1s Swarm
#2
Labels
Milestone
On an L1 cache miss:
Given a key
K
, the L1 node finds theX
closest L2 peers in it’s Swarm toK
using the XOR distance metric.X
is the replication factor of the L2 Swarm and is picked such that not allX
nodes go offline between two requests to the Swarm for the same content. We can start with a low value forX
(sayX
= 3) to reduce the amount of data we need to move around in the MVP and then tuneX
based on empirical data post MVP.The L1 executes the cache miss by sending concurrent
WANTHAVE
messages to all the eligible L2s.It then picks the first L2 that replies as the L2 responsible for serving the cache miss and continues the transfer with it.
It sends a
CANCEL
message to all other L2s.If all L2s come back with a negative/don't have response, we defer to L1 should cache miss directly to the IPFS Gateway for key
K
if all theX
closest L2 nodes do not have it #5 AND L2s should follow the cache on second miss rule and hydrate their persistent cache asynchronously from IPFS Gateway #6.The text was updated successfully, but these errors were encountered: