Beyond caching content: two alternative CDN approaches

Los invisibles de la CDN

The reverse proxy cache mode of a CDN is the most widely used, but a next-generation network like Transparent Edge offers many more possibilities. In this post we present some alternatives: load balancer and API Gateway. To the edge and beyond!

It is well known, from other posts on our blog, the benefits and advantages of using a CDN like ours in front of your website. Your page will load like lightning from any point on the planet, Google will like you as much as Wile E. Coyote chasing the Road Runner. Not to mention that the web security of your site will be on par with the defense of Pablo Alfaro and Javi Navarro’s Sevilla Football Club.

However, there are many other features and modes of operation that you can take advantage of when working with a next-generation CDN like Transparent Edge.

In this post we explain some modes of operation in which you can use a CDN beyond caching content (reverse proxy cache, load balancer and API Gateway).

Reverse Proxy Cache: the most popular option

It is no surprise if I tell you that, greatly simplifying, a CDN is nothing more than an extensive network of proxy servers spread across different parts of the planet. Its main purpose is to cache the content of its clients’ web pages in order to make web objects load much faster.

Reverse proxy

This operating mode has many other advantages. For example, all the security measures that can be implemented at this layer or the ability to absorb large volumes of traffic, without making large investments in the infrastructure of your origin platform.

Alternative operations: load balancer and API Gateway

  • Load balancer

A load balancer is a network element that is usually located within the client’s infrastructure and is used to distribute the traffic of a specific service between different servers.

The purpose of a load balancer is to provide the service with high availability. In such a way that, in the event of a hypothetical failure of one of the servers behind the load balancer, the service is not affected and its continuity is guaranteed.

However, a CDN can do the work of a web load balancer going one step further than a traditional load balancer. A CDN offers all the functionalities of a traditional load balancer, but it makes it possible to perform load balancing at the data center level, thanks to the fact that it is not physically located on the client’s premises. This allows your application to be distributed across different data centers, eliminating a very difficult point of failure to overcome, such as the data center.

Load balancer

For example, we could configure a simple Active-Passive balancing policy, where the main origin of the CDN is datacenter A and in case of a datacenter failure, it would automatically switch to the backup datacenter.

Or, if we want to go a step further, an Active-Active balancing policy could be configured. Source traffic would be served from two or more data centers indiscriminately, either by weights or by other more advanced balancing policies.

  • API Gateway

In this mode of operation, the CDN is the single entry point for the different endpoints of your API. When in reality, the same API, at its origin, is distributed across different servers or even different microservices.

Its greatest advantage is that you consolidate all access through a single point, a single domain, a single SSL management, while providing your API with all the security measures that a service like ours can offer. To mention some interesting ones that are particularly applicable in this case, we can implement rate limits, endpoint tokenization, parameter validation or advanced deployments such as canary deployment or blue/green deployment, among others.

API Gateway para diferentes APIs

These are just a few of the ways you can use a CDN. But a next-generation CDN like Transparent Edge is much more than that, as it allows you to do other, more powerful things. For example, moving part of your application logic to the edge so that part of your website runs as close to the user as possible.

Not to mention how nice and efficient our support guys are, of course😉. Not only do they work hand in hand with clients to get the most out of the CDN, but they also provide the Documentation Portal with all the tricks from a technical point of view. There you will find the necessary information to implement any of the scenarios we propose in this post.

Jorge Román is co-founder and CEO of Transparent Edge.

Jorge Román is a systems technician who over the years has given way to the CEO within him, or a CEO who over the years has given way to the systems technician within him. He is not very clear about it and often thinks about it while mopping the office floor and serving coffee. The rest of the time, he runs the first CDN of Spanish origin, raises two daughters and has plenty of time to read about entrepreneurship. As for sleeping, he will leave it for another life.