darkweak / storages

Souin's storages
MIT License
1 stars 2 forks source link

Multi tiers #11

Open gedw99 opened 1 month ago

gedw99 commented 1 month ago

More of a question but I was thinking … again

I am wondering if I can have origin servers all synced via nats and cdn servers on outer rings , then Cloudflare as the most outer ring ?

this is sometimes called tiers.

nats can dive this due to the kv being pub sub . so any server that is subscribed to a key space will essentially be told the source file changeg all the way out to the outer rings .

this is not caching at all because caching is a late bound pattern where if it’s not in the outer ring the outer ring will fetch it from an inner ring .

what it is is early bound caching . The origin data changes and then all outer rings are told . They can then do their normal let’s bind / cache miss logic and go get the data.

this is a way to manage the thundering herd problem. You can essentially keep the rings primed when you start up new servers .

maybe it has prospects .. just wanted to voice my idea ..

darkweak commented 1 week ago

Hello @gedw99 sorry for this late response. As the storages are CDN agnostics this won't be added in this repository but can be a feature in the repository Souin.

gedw99 commented 1 week ago

It’s just an idea …

not even sure it’s a good idea