|
Before we answer the question, “Can a CDN help your website and application performance,” let’s take a moment for a short CDN 101.
A CDN (content delivery or content distribution network) is a system of computers placed at different network nodes to provide the same content from the shortest distance possible. In other words, a CDN attempts to take pieces of content from your website and pass it to various nodes around the Internet.
How CDNs Work
When users in Los Angeles, for example, request your web page or application, they receive content both from your server and the nearest CDN node. The goal is to greatly reduce the latency that might be present if all traffic had to traverse the entire distance to your server. Another way of looking at it: having a CDN is like adding servers to your site.
When you present a web page, there’s overhead in servicing all the http requests. With a CDN, you can spread that overhead across the CDN nodes and your server. This inherently gives you more power in terms of connections, central processing unit (CPU), random access memory (RAM), etc. as you deliver content to the user.
CDNs and Website Performance: A Real Life Example
Recently Neustar was doing load testing for a a client’s new ecommerce site, and after running several tests, found that the home page was taking six seconds to load when it was not experiencing heavy traffic. During a load test we saw the following performance:
Concurrent Users | Seconds for Homepage to Load |
100 | 5.19 |
200 | 9.47 |
300 | 14.91 |
400 | 27.86 |
500 | 38.31 |
750 | 73.90 |
1000 | 71.77 |
The high load times were unacceptable to the client, who was aiming to support at least 1,500 concurrent users. We dug into the full-page breakdown of the homepage to look for causes and learned the page was making http requests for 133 files of homepage content, a total of 1.2 MegaBytes. Some easy wins would be to combine the nine cascading style sheets (CSS) files and the 18 Javascript files into just one file.
The client chose not to take that path, because we also saw that the time to 1st Packet was high, meaning that their server was being overrun with request for the content. Instead, the client chose to implement a CDN.
The next load test, after implementing a CDN, provided the following results:
Concurrent Users | Seconds for Homepage to Load |
100 | 2.34 |
200 | 2.43 |
300 | 3.23 |
400 | 4.49 |
500 | 8.55 |
750 | 15.95 |
1000 | 24.83 |
1250 | 31.23 |
1500 | 31.32 |
As you can clearly see, this single change reduced page load times by half. In this case, much of the static content, such as GIF, JPG, PNG, and SWF files, were all moved to the CDN, alleviating a lot of the work the web servers were asked to do. The client was also able to improve performance further by distributing other content such as CSS and JS files to the CDN.
In Summary
Of all the performance tweaks you can make to a website, implementing a CDN is one of the most effective. The answer to our original question “Can a CDN help your website and application performance” is this: in many cases, yes, a CDN can help. While a CDN won’t solve every web performance problem, it can often boost performance to a significant degree and deliver a better experience for your customers.
Sponsored byDNIB.com
Sponsored byVerisign
Sponsored byRadix
Sponsored byWhoisXML API
Sponsored byCSC
Sponsored byVerisign
Sponsored byIPv4.Global