A massive 260% performance boost for uncached content

Introduction

Performance Announcements

A massive 260% performance boost for uncached content

Posted by Dejan Grofelnik Pelzel on .
Featured

A massive 260% performance boost for uncached content

Posted on .

During the past week, we have been silently testing and deploying a big new update targeting the performance of uncached content on BunnyCDN. Things went well, really well in fact. We've seen performance improvements in the range of 30% all the way up to 260% or more as shown in the tests below. With that in mind, I am very excited to announce that the update is now live worldwide and enabled for all of our users. BunnyCDN is hopping faster than ever!

This is especially great news for websites that have a lower cache hit rate or publish lots of new content often and want to make sure to get the best performance possible. It also significantly boosts performance for users with full website caching or serving dynamic content.

260% performance boost?! What did you do?

Origin Keep-Alive

Prior to the update, each uncached request going through BunnyCDN would first set up a connection between the CDN node and your origin server before transferring the file. This occurred for every request that travelled uncached through BunnnyCDN and meant that there was actually a considerable overhead caused by the time needed to establish and "warm up" a connection for each request.

This can be a big problem with CDNs due to how most caching software works. In some cases, it can even hurt the performance of a website if a lot of uncached data is requested. With BunnyCDN, this is no longer the case. We've implemented a custom Keep-Alive system that works around the limitations. It means that the BunnyCDN servers now keep an open connection with your origin server and reuse it to transfer multiple requests over it without the big overhead.

Lazy DNS updates

The second update we did was that we implemented a custom DNS resolver solution that no longer blocks active requests when revalidating your origin DNS record. Prior to the update, when the DNS TTL of your origin URL expired, our system would block all requests back to the origin until the DNS query was finished. This caused an unnecessary delay and could potentially result in a loss of connectivity with your origin server if anything went wrong.

The new system keeps the DNS records in cache and when the TTL expires, silently starts to revalidate the record in the background. This way, you will never see a DNS performance hit and will always enjoy quick connections back to your origin. When something goes wrong, our servers will just retry the request and update the new IP as needed.

The results in numbers

Enough talking about the changes and let's get to the actual results. We ran different tests around the world with origins and test servers in different locations. Below are the average results of what performance changes you can expect.

~30% Quicker Uncached Website Load Time

The first and most obvious benefit is the improved performance and drastically lower load time when serving websites with requests that haven't yet been cached. We set up a test website with an origin in Germany and saw a 30% lower load time going from 2.5 seconds down to 1.7 seconds when testing from Seattle.
BunnyCDN Uncached Website Performance Boost Graphics

~260% Faster Uncached Cache-Slice Download

Another effect we are incredibly excited about is the performance boost when using Cache Slicing for delivering larger files. Before, our servers would have to connect and make many small requests one after another in order to construct the full file. The new Keep-Alive update removes the need to open a new connection for each 5MB chunk of the file and make the download an almost continuous stream. The big overhead reduction results in a massive performance boost.
BunnyCDN Uncached Throughput Performance Boost Graphics

During our tests, depending on the distance between the origin and the server we saw a throughput increase of up to 260% and more, which is huge and we are really excited about it. The new update also reduces buffering between video seek times for uncached video files and just makes everything run much smoother.

~50% Lower Uncached File Latency

The last test we focused on was testing a single file being fetched back from the origin in Germany to Seattle. This situation happens for example in the case of a single cached item such as a CSS file expiring from cache. Compared to testing the whole website, this test proved to have more overhead and offered an even bigger performance boost of up to 50%, especially when the origin DNS record needed to be fetched.

BunnyCDN Single File Uncached Performance Boost Graphics

Hopping faster and faster!

Uncached requests can cause a big performance issue when not handled optimally by a CDN. We are incredibly excited about the update and we believe it is one of the biggest performance updates we have done to BunnyCDN during 2018, but we aren't stopping there. We are always working hard on new ways to speed things up and have some great new features planned to release in 2019, so definitely stay tuned! IPv6 is almost back as well :)

Dejan Grofelnik Pelzel

Dejan Grofelnik Pelzel

https://bunnycdn.com

The founder of BunnyCDN. An expert in networking, servers and development. Makes sure things are always running fast and smooth.

View Comments...

BunnyCDN Blog

Performance tips, updates, tricks and insights into our Content Delivery Network.

Categories