Most digital publishers use a Content Delivery Network (CDN) as part of a delivery strategy, and for good reason. Traditional benefits range from faster and secure delivery to tight integration with modern publishing systems to subscriber authentication. However, CDNs offer a number of lesser-known benefits that can help digital publishers scale and improve their businesses in surprising ways. Let’s explore five of the ways digital publishers can get more out of their CDNs.
1. Next-level caching
A good rule of thumb is that you can probably cash it if it’s querying a database or some sort of abstraction layer, like an API. Most modern CDNs allow you to purge content off the network fairly quickly. In other words, instead of assigning a time-to-live (TTL) of 30 minutes and then going back and repeatedly re-validating, which will tie up resources at your origin, you can cache it “forever” or until you let it expire.
Caching more will help drive down costs, particularly for compute-heavy workloads, such as database queries. This is because you’re caching data at the edge rather than at the origin.
This strategy will give consistent and global performance improvements. Modern CDNs can even help with truly dynamic or completely uncachable stuff. Using a CDN can move TLS connections closer to the end-user so that connections start much quicker. It can keep TCP connections to your origin open and hot, eliminating resources spent on setting them up and tearing them down.
2. Optimization of content
Much of what you’re optimizing at your origin or the application layer can probably be optimized at the network edge. For instance, optimized images will reduce your storage and compute cost. The benefits are many, however, one of the most obvious is updating and refreshing the UI without having to re-process every image. Also, you can instantly take advantage of new file formats, such as WebP or AVI, without large engineering efforts of having to retool your application.
3. Comprehensive security
CDNs are a great place to implement and enforce security. They are massive in size and designed to take incredible traffic spikes, both legitimate – e.g., large crowds of viewers at live sports events – and malicious DDoS attacks. CDNs are great at hiding where your true origin or application actually lives, helping reduce the attack area for hackers. You can set up IP restrictions, and private network interconnects to restrict access.
Protecting against user behavior and emerging threats requires a nuanced approach – and the WAF offering of most CDNs can help with this. In fact, CDNs are a great place to do all things security. For example, dropping everything that’s not layer seven non-HTTP or non-HTTPS traffic at the edge gives you substantial protection right out of the box.
Your CDN can inspect, detect, and block attacks before they reach your application. Features such as rate-limiting allow legitimate users to enjoy your app while attackers are getting cut off at the edge. Enforcing security policies at the edge saves time, increases performance, and reduces the load on your core applications.
4. Edge computing
Although they vary and run differently, many CDNs have edge compute capabilities today. Some are WebAssembly, some are Docker, and yet some are other forms of virtual sandboxes. They’ve got different feature sets, cost models, and languages they support. Because of its flexibility to execute a multitude of functions, edge computing becomes a great place to build and scale your microservices.
Lastly, let’s talk about visibility. Your CDN inherently handles tons of data. Logs and statistics can help improve day-to-day operations, particularly if they’re available in real-time. (You should expect real-time, as it’s the only way you can see and react to global incidents or localized issues.) You can analyze historical data to make better architectural decisions for future build-outs and improvements. When running experiments, you can use the log data to see if your outcomes were correct or if you should take a different path.
CDN logs can also help reduce costs by identifying areas where your caching or optimization strategies are subpar. They can help you detect new and effective ways that people are trying to misuse and abuse your applications so that you can make informed decisions. And real-time logs help remediate outages, saving you money and reputation from costly downtime.
As we wrap up, we find it a prudent reminder that CDNs have dedicated teams of network engineers, automated tools, and redundant networks. Savvy digital publishers will look beyond the basic functions of these often overlooked tools, and make them work harder to provide better (and safer) user experience, prevent costly outages and downtime, and ultimately improve the bottom-line.