26 Sep 24

Three cache improvements to optimize your budget

Reducing costs in IT infrastructure is always an objective on any company’s roadmap. In this post we propose some recommendations to get the most out of the budget in content distribution, beyond the cost savings of placing a CDN in front of the cloud.

Improving caching improves the hit ratio and the load level of the origin. For example, if a CDN that serves 8 out of every 10 requests adjusts to serve one more request, we manage to reduce the failure rate by half. In this case, the main server starts serving 1 request instead of 2, only improving the performance of the CDN by 10%.

Is it magic? No, it is efficient management of resources. Keep reading and we explain how to reduce the traffic that arrives at the origin, save large amounts of outbound traffic (egress) and directly result in greater revenue by improving the user experience. Especially in sectors where loading times influence the conversion rate such as e-commerce or tourism.

Let’s talk about egress

The amount of data leaving the source infrastructure is a very interesting metric to get the most out of your investment. The egress records the bytes that are managed from the origin, instead of the number of requests shown by the traditional cache hit ratio (CHR). This is interesting because, even if your cache hit ratio is very high, if the requests that come down origin are enormous in size, the outbound traffic will be greater and will affect your bills. Not only in terms of the traffic itself, but also in terms of the operational and infrastructure costs of scaling the source to handle traffic spikes without interrupting service.

Three recommendations to improve caching

1. Size matters

Once the importance of egress is known, the first proposal may seem obvious: cache the heaviest objects. This is of interest to any company on the internet, not just the streaming and large downloads sector, as one might expect.

Also a website that requires many API calls can find significant cost savings in this technique, or with scripts that make repetitive calls to the same content. Images are another important element in egress invoices, as they are heavier content than HTML, CSS or javascript.

2. Cache dynamic content

Yes, dynamic, you read that right. Although CDNs have traditionally recommended against caching these resources, next-generation content delivery networks – such as Transparent Edge – allow objects to be purged in milliseconds. Additionally, thanks to the “vary” or variants directives, several versions of the same URL can be stored in cache, taking into account any element of the request, such as the country of origin, the content of a cookie or the language of the browser. user.

This functionality opens up a huge range of possibilities to improve performance and downloading at source for any online company. And, especially, for sectors in which dynamic content has a large presence such as e-commerce, tourism or banking. If you want to know more about our object invalidation, we recommend this post.

Our CDN allows you to massively purge content by tags worldwide in less than half a second. Any object that is updated from the source at higher intervals can be distributed from the cache, freeing the source from a large amount of outbound traffic.

3. Activate a second layer of cache

Placing an additional layer of servers serves to minimize the number of requests reaching the origin. This second layer, which at Transparent Edge we call Mid-Tier, is designed to act like a funnel: only its servers can communicate with the origin web server.

For example, if we have an architecture of 10 cache servers that communicate with the origin, when an object expires, the 10 servers will go to the main server to update the object. But, if we add a second cache layer made up of 2 servers and only these communicate with the origin, the main server will have to serve 2 requests instead of 10. That is, we reduce the origin load by 80%.

These are just a few tricks, but if you’re interested in cost efficiency you can ask our experts for other ways to optimize your content delivery. At Transparent Edge we are experts in doing more with less.