

Many of these views are dynamically rendered, leaving potentially an infinite number of pages to cache with CDNs.

Furthermore, these frameworks already come with their own sophisticated, database-level caching systems. While modern applications can be developed using these frameworks by extracting the view components out from the API, this monolithic approach is still incredibly productive. By default, these frameworks render the entire page server-side, with JavaScript added in to enhance the experience. For static content, the choice is simpler: CDNs can host the entire static contents of your site and distribute it without necessarily having to replicate databases to other regions.įor users of dynamic web frameworks such as Ruby on Rails, Django, Spring Boot, or Laravel, using CDNs becomes more interesting. They are an additional layer between your users and your content. While CDNs are very powerful, they do not come for free. While some CDN providers provide a blanket shield for your entire site, others take an approach of serving as an asset cache, giving you tighter control of what goes through your CDN and what does not. Modern CDNs go above and beyond this with features that enable sites to have increased protection against Distributed Denial of Service (DDOS) attacks, DNS amplification attacks, and more. The more locations, the lower the latency they’ll be able to offer.Īt the core, this is how a CDN works. CDNs try to locate their servers around the world to deliver content faster. These edge DNS servers are configured to point to CDN edges, which host local versions of hosted content.Īlso, the closer a server is to the user loading the content, they experience lower latency and faster load times. GeoDNS uses the new EDNS Client Subnet specification to identify source IPs, and then combines regional traffic direction and GeoIP databases to make an informed decision about which DNS server to direct requests to. That “some mechanism” for location-aware requests is GeoDNS. Traffic flow diagram of a CDN-enabled request. When a resource is requested from a CDN, some mechanism decides which server will give the best response time, and directs the request to that server, which sends the file back. How CDNs WorkĬontent delivery networks, at their core, work by taking a set of files and distributing them across geographic locations. In short: nobody is immune, and everybody can take advantage of fast response times across the globe.įortunately, there is an entire class of service providers dedicated to solving this problem in the most cost-effective way possible: content delivery networks (CDNs). While this seems like a large-scale problem, a Google Study in performance confirms that page response time has a drastic effect on small- to medium-sized sites as well. Large companies such as Amazon track their response time, because an increase in response times by one second costs the company $1.6 billion per year in sales. Performance is critical to the success of modern web applications, whether the user is in California or New Zealand. As web services become more popular in a global environment, the demand for responsive, performant sites have increased.
