Previous | Next --- Slide 40 of 66
Back to Lecture Thumbnails
Tengjiao

Question: Can I understand the CDN as a cache of front end close to the user? If it is a front end cache and I click on some service, will that be forwarded to the Web Server directly?

ferozenaina

The CDN is not the same as a cache. The CDN stores large static data like images and videos on facebook or software downloads on Microsoft/Adobe. CDN doesn't implement any replacement policies like LRU / FIFO. Since this data is static, we can just store this at different geographical locations and serve the users. These are also updated slowly. (Facebook may take a few seconds to propagate changes to photos - allowing you to access a deleted photo)

On the other hand, front-end cache between the load balancer and web server is used to cache elements of dynamic data/page request. I think these would be like style-sheets, common icons, fonts, etc which are always rendered on every (Facebook) page.

If I understand correctly, the user first does a page request to the web-server which will return a link to the local CDN from which the images/videos should be loaded.

cloudhary

@ferozenaina do you know if the CDN's don't do/require authentication? That's what I heard in Kayvon's lecture. I'm surprised to hear that anyone with a link can access content that should be private

ferozenaina

@cloudhary - some CDNs have token authorization - the URL is suffixed with a ?token=MD5hash. So anyone with the URL and token can access the content.

hanzhoul

Do CDNs only store static or read-only data? Since it may be difficult to do updates among all CDNs at the same time.

yeezus98

@hanzhoul CDNs only store static data, the front end cache and other caches deal with dynamic data