What more can a CDN do on the JAMstack?

shortdiv profile image Divya ・2 min read

Compared to their predecessors, modern CDNs are not limited in their capacity and can do a lot more than serve static assets. The emergence of edge computing bolstered modern CDNs with the capability to handle crucial business logic like redirects and authentication at the edge. By forgoing the extra trip to the origin server, edge logic at the CDN layer brings the server ever closer to the user. With the increasingly blurred distinction between what an edge server can do and what an origin server can do, CDNs are increasingly being referred to as Application Delivery Networks (ADNs). With an ADN, logic once reserved for origin servers an now be implemented at the edge. Cache invalidation is one such example of this. In the context of an ADN, a new site build invalidates the old cache and replaces it with the updated content. Given the difficulty of managing the cache of a globally distributed network of edge servers, a CDN/ADN that updates its own cache quickly and reliably with every site build is incredibly convenient. This is doubly the case since CDNs of the past used to rate limit the cache purge and provided little control over how the cache was managed.

The ability to run functions at the edge is yet another powerful feature of the CDN. Previously, functionality like A/B testing, authentication and form validation could only be handled at the server level. The introduction of Cloudflare workers and Amazon Lambda@Edge has made it possible to execute functions from the edge layer and provide dynamic functionality to a JAMstack site without the added cost of a server. Running functions at the edge layer means that content can now be delivered with close to zero origin infrastructure. On the fly functionality like image optimizations, and access control can also be achieved with this model. The advancements in CDN technology has been a key catalyst for the rise of the JAMstack. If you're keen on learning more about the advances of the CDN, check out Netlify Edge, the ADN built by Netlify to deliver blazing fast sites and modern workflows.

Posted on by:

shortdiv profile



Tea drinker in a coffee drinking world


markdown guide