: Cache website via CDN for visitors, not for users I'm not sure what this is called. For example, if you're logged out of Reddit, you see a cached, static version of the site from the CDN.
I'm not sure what this is called. For example, if you're logged out of Reddit, you see a cached, static version of the site from the CDN. When you're logged in, you don't hit the CDN and instead directly to Reddit's servers.
What is this called? Which CDNs provide this service?
More posts by @Carla537
2 Comments
Sorted by latest first Latest Oldest Best
Let's skip the CDN term as it's not giving us architectural view of the solution.
The way it's done is though the use of series of caching servers that behave like reverse proxies. The best example is Varnish. Once you set the session id cookie, use of Varnish cache is dismissed. Otherwise, you're served with a response without even application server being hit.
It's just server side code that checks to see if you're logged in. If you are, it makes an API call. If you aren't, it finds the latest cache on the CDN and shows that.
I'm not sure if any CDNs specifically mention that use case. Reddit's servers are just uploading a static file to the CDN and replacing it when it goes stale. It makes a big difference for a site like Reddit, but only because they have such a massive number of visitors & pageviews, but only a small percentage of them are users. Many websites would see only negligible gains from it.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.