5 ms·
It's especially useful for doing things during the Origin Request phase, which happens prior to the request from the CDN to the Origin. In that phase you can c
by jdub 6y ago
It's especially useful for doing things during the Origin Request phase, which happens prior to the request from the CDN to the Origin.
In that phase you can change anything about the request itself, or the origin it will connect to. But the function only needs to run when there's a cache miss.
I have an application that needs to select an origin based on the request path (too many to use CloudFront cache behaviours), with a cache miss rate of less than 1%. It's a tiny amount of additional latency for cache misses, and a very small proportion of our CDN costs per month.
- adreamingsoul 6y agoVarnish Cache with VCL allows you to create custom edge logic for things like header manipulation or backend selection.
- jdub 6y agoAre you suggesting I build and maintain my own global CDN with 200+ edge locations? Thank you, but no thank you.
- jcpham2 6y agoI think so, as an alternative to all this AWS magic you could totally deploy <insert open source software name> on 200+ newly deployed instances, colo servers, or whatever you like! I caught it too. I get downvoted a lot for not following rules and I don’t really care this was hilarious
- adreamingsoul 6y agocloud magic has shown us that “one day” we will need to scale up to an extreme count of “instances” and that suboptimal solutions can be negated with horizontal scaling.