Net neutrality

Yes. Say chunk “ABC” is part of your 10GB file and you want to download that. Your client app will make a network request to “Get chunk ABC”. This request will be passed to the 4 vaults whose IDs are closest to “ABC” (they’re termed DataManagers) since they know which vaults actually hold chunk ABC.

These 4 actual holders then get passed your request and reply with the chunk. This reply containing the chunk goes via the 4 DataManagers and from there back to you via a non-deterministic route comprising various other vaults.

As the reply is passed along, each vault that comes into contact with chunk ABC caches it in a first-in-first-out queue. If a given vault’s queue is full, the oldest chunk it’s caching will be displaced/forgotten and replaced with ABC.

So say you try and get ABC again shorty after. Each vault that receives your second request will check their caches for ABC, and if they have it, they short-circuit the normal process and reply with ABC to you again.

Since every client trying to retrieve ABC will be sending requests towards the same 4 DataManagers, the caching will tend to focus around those guys, protecting them from actually receiving the requests. The more popular a chunk is, the more often it will be plonked to the top of random vaults’ caches, and the area covered by cached copies will swell out from DataManagers for ABC.

So, as well as protecting the DataManagers and the actual holders from DDOS (deliberate or otherwise), it also means that clients requesting a popular chunk should receive it back from the network more quickly than a less popular one on average.

As the chunk’s popularity wanes, the cached copies get displaced by newer chunks and the replication count drops back towards just the actual holders again.

This is the current implementation of “opportunistic caching”. Things may change slightly with upcoming design meetings, but fundamentally we’ll need to keep some such mechanism in place to protect against DDOS incidents. The speedup for popular chunks is really just a nice by-product of this.

Hope that explains it a bit further?

6 Likes