CDN

Content Delivery Network.

Can serve both static and dynamic content. Dynamic content is the new thing.

  • For dynamic content to work, when the content change, your app invalidate the cached URL. Or another way is set the TTL low so that the post change TTL will expire and refetch

CDN cacn cache API response as well

CDN can also use for URL redirection as well Design a URL shortener, it works for cachable url

How it works

  • When user goes to a website, the closest CDN will deliver the content
    Pasted image 20220928225300.png
    Pasted image 20220928225314.png