@support@jorijn very cool stuff. Thank you for the blog and and keeping your infrastructure open. I may find myself using it to learn more about deployment practices.
I'm very (erm ... vary LOL) interested in the inclusion of “Cookie" in your Vary header:
vary: Accept, Accept-Language, Cookie
This means each cached object at #Fastly is going to be indexed on path+hostHeader+AcceptHeader+AcceptLanguageHeader+CookieHeader. Doesn't that massively reduce your cache hit ratio (and increase your cached objects), because the Cookie header can possibly have so many variations inside it?
Hey Leon. You're right, this is a bit strange. I took the headers from a regular Chrome request, and that would explain the inclusion of the Cookie header.
(Edit: I explain this in the next post)
Usually, unauthenticated API traffic wouldn't include this header. I remember faintly about some custom VCL I deployed back then, but it mostly originated from here: https://github.com/mastodon/terraform-fastly-service
I had created some tickets back then due to this. Most do not accept vary headers because caching keys become very arbitrary while most CDN have a "single pricing" for storage.
Ended up just nginx (which is also the official way) but I think it would be better to have distinct urls per content-type and to generally make it possible to just cache by url as a cache-key..
Glad its working out with Fastly, unfortunately most smaller instances won't be able to afford :P
@lifeofguenter@jorijn@leoncowle@support hey Guenter - check out fastly.com/forward, we offer free or deeply discounted services to open source/ community projects
Add comment