How do you invalidate a CDN cache and what is the better approach?
IntermediateConceptLoad Balancers, Proxies & CDNs
Answer
You can issue invalidations (aws cloudfront create-invalidation --distribution-id E123 --paths "/index.html"), which are slow-ish and billed after a free quota. Better: versioned immutable asset names (app.3f9a1c.js) with a one-year TTL, and a short TTL only for the HTML entry point.
That removes the need to invalidate on most deploys.
More on Load Balancers, Proxies & CDNs
What is a load balancer and why do we use one?BeginnerWhat is the difference between L4 and L7 load balancing?IntermediateCompare ALB, NLB, GWLB and Classic Load Balancer in AWS.IntermediateWhat load-balancing algorithms are common?BeginnerWhat are health checks and how should they be designed?AdvancedWhat is connection draining (deregistration delay)?Intermediate