Cache

CDN performance: why dedicated edge cache is so important

Image credit: freepik

One of the things about PUSHR that we pride with is that we don't blindly follow the trends just to say "us too" every time there is a new hyped feature that a competitor announces. Instead, we carefully measure the users' interest for some time and think of what we could do better if we are to offer this feature ourselves. Our recently released image transformation API is a very good example of this. This service is not new to the CDN industry and we could have released it earlier, but we would then be caught up in the loop of racing to add new features, lowering prices and, basically, do what everyone does. However, as time went by we discussed image transformation with a large number of current and potential customers, and soon a pattern emerged. Almost all interviewed were interested in the ability to scale images and change their quality on the fly. That made 95% of the responses. The rest would require more advanced functionalities like cropping and applying filters. So when we released the image transformation API we've only added the most requested features to it, which allowed us to optimize the compute resources that image transformation and optimization processes require. Thanks to this, PUSHR became the first CDN to offer free image optimization as part of it's service, at no additional cost. 

That is not the only feature exclusive to PUSHR, and among others, we also offer dedicated edge cache. Here is why that matters.

The purpose of caching

CDN caching explained

Caching is what CDNs do to accelerate your content. Once a request has been made for a specific file from a given geographical location, content delivery networks will identify the edge server which is closest to the location and will serve the content from it for improved latency, speed and availability. During this first request a copy of the content will be saved on the edge server, so all future requests for the file will be served directly off it, for even better performance and to minimize the load on the origin server. This is where things get complicated. Since the edge server needs to also serve other customers of the CDN, and provided that it's storage capacity can't be infinite, the cache should be deleted at some point to make room for new files. How long until that happens vary from one content delivery network service to another, but when the space goes low, usually the least requested content will be deleted first. Because of that you may have heard that CDNs don't make sense for low traffic websites and apps, and may actually increase latency because of the need to pull expired cache files again from the origin server too often. 

Dedicated edge cache

Dedicated edge cache content delivery network

The case described above is the typical scenario for how most of the public CDN services work. The storage space is shared between all customers and in some cases your website or app assets may be evicted from the cache as soon as few hours since the last request have passed. If you want better than that, you should either have very popular content that is being accessed all the time or you would be looking into private CDN services. A private CDN is one that dedicates resources to you and your web project and does not serve other customers. Private CDNs come in various flavours and offer nearly endless amount of custom features tailored to your needs, but they can easily cost a fortune and are rarely a feasible solution even for the customers who could afford them. 

At PUSHR we are paying special attention to this problem and have been providing dedicated cache by default to all customers since around 2018. To achieve that we use dynamic edge cache allocations on all our edge servers based on their capacity and historical usage data. We do not use traffic statistics and request counters to differentiate between more popular and less popular content, but we do use them to decide on the size of the allocated cache for a given customer. As such a customer with heavier content (video, downloads, music files) would be given more storage on the edge than a customer serving ads, for example. However, these two customers would never fight for the same space and lack of activity from one of them would not cause their files to be deleted to make room for someone else's. Instead, within the cache storage that a customer is currently being allocated on this edge server, it's only their own popular files that can rotate their non-popular files out of the cache. What this translates to is that an image that has been loaded by a visitor only once will still be in the edge server cache tomorrow, after a week, after a month, and even after two months. With PUSHR's content delivery network, your content loads fast and your cache HIT rate is higher. Dedicated CDN edge cache is also the reason behind the success of another industry-first feature that we've released earlier this year -  ActivePush caching for push (storage) zones that use SFS - PUSHR's managed content origin service. ActivePush automatically pushes newly uploaded files to the edge of our content delivery network to avoid slow responses for uncached content and is especially useful for large files and video, where a cache slicing approach is used to ensure that your videos start without any delays from the very first view. ActivePush would not be effective without dedicated cache as it would cause more harm than good. 

 

Create your first CDN zone and start experimenting with ActivePush, dedicated edge cache, free image optimization and free $10 credit valid for 30 days.

 

Comments