I'm just wondering why you decided on Fastly over Cloudflare Workers or AWS Lambda Edge for this?
I'm just wondering why you decided on Fastly over Cloudflare Workers or AWS Lambda Edge for this?
Fastly has much faster cache purging - it can purge any content globally in about 150ms. Purging is one of THE crucial parts which make GraphCDN work. With such a fast purging, we can deliver Read-after-write consistency . In our tests with Cloudflare that took a few seconds.
Additionally, in our tests, Fastly was in general just a bit faster.
While we're also JavaScript and V8 fans, our edge layer on Fastly is written in Rust - which is a pleasure to use, especially for a product as ours. Fastly runs it as WASM on the edge - they can load the worker in about 40 microseconds.
Fastly Compute@Edge is still in limited availability, but if you get a chance, I highly recommend checking it out!
Based on the comment on max below that's not read-after-write consistency but it just becomes eventually consistent but ideally within ~150ms. What would be the consequences of bypassing the cache for read after write, does that break your model in any way? (I guess at the very least you will lose your statistics feature)
You can bypass the cache if you want to, but it's not necessary. As it would just be like a Cache MISS, that would totally work.
We have a limit - you can only "tag" up to 1k items within one query. If you have more items in there, we can't purge all of them.
Due to the nature of the broadcast protocol of Fastlys purging implementation, I assume that it scales quite well - they have really big customers using this for a few years already.
We're using Fastly ourselves and I was not aware up until today (and in fact I'm taking your word for it, since I can't find it in the docs) that fastly provides consistency guarantees for purges.
Hmm, how can that be? Light in a straight-line fiber optic cable would take 200ms to traverse a greater circle around the world. Add some bends, relays, routers, not to mention servers, and it'll only get longer...
Are you sure the content is really being purged globally in that time, and not just from your local point of presence?
(Disclosure: I'm an engineer on Cloudflare Workers. I have no idea how Fastly does purges. Just trying to understand what you mean here...)
Looking at the 150ms now, which is about 2.3 times the 67ms, this kinda seems reasonable.
And yes, this is global purging - I just reconfirmed it with someone from Fastly.
Travelling half of the distance is not good enough, because if you haven't received _confirmation_ of the purge, then you can't trust that it really happened. There could be network errors, etc.
Sorry but it's not physically possible to do a global purge in 150ms.