Push Vs. Pull CDNs

As you learn more about CDNs you will see that they are not all created equally. Two distint types are Push and Pull. Here are the differences and which one works best for you.

Steven Johnson
by | Posted: March 12, 2013 | Updated: April 8, 2014
Blog Post Image 734px Wide

You may have heard one or both of these terms but not sure what it means? To the end users they are the essentially work the same but to the site administrator they work in entirely different ways. Learn which system is best for you.

Push CDNs

Push CDN direct your content on a path from your web server to the CDN. This is often accomplished by setting up a remote file copy automatic process or cron job which copies the files at a specified interval. 

The advantage of a push cdn is that the web content is automatically populated in the CDN. This way the end user does not have to wait for the content to be copied to the CDN and then downloaded to their browser. A push CDN also gives you more control files and when they are copied to the CDN.

The disadvantage is you have to configure the remote copy process and ensure that it always working. Situations can occur where an image has been updated and you have to wait 15 minutes for the file to be copied up to the CDN. During this time your visitors are seeing a file not found error. You have more control but more effort is required to configure your CDN setup.

Pull CDNs

Pull CDNs is the opposite of a push CDN. When a visitor requests information from your CDN and the file is not present then the CDN pulls the information from your web server to the CDN. Once the file has been pulled from your server it is stored or cached and then served from the CDN until the file expires. Very little configuration is required to set up a Pull CDN.

The advantages of a pull cdn is that the CDN does most of the work and very little configuration is needed to set it up. Essentially you enable a pull CDN and the rest of the work is done for you.

The disadvantages of a pull CDN is the loss of flexibility and the load times for the first user to request a resource.

My CDN Experience

The first CDN I set up was a push CDN. It was a lot of work. I had to work with the hosting company to setup rsync to remotely copy the files from the web server to the CDN repository. I then had to set up a cron job for this to happen every 15 minutes. 

Once I had the copy process setup I then needed to change the location of the image and CSS files from www.mydomain.com to cdn.mydomain.com.  For this I used rereplace from NoNumber to handle all of the URL changes. They were very helpful with suggestions on the best way to create the rules so that everything worked correctly.

It was a lot of effort but it all worked and worked pretty reliably. There were a few glitches mainly during website updates when CSS changes or new images were added. Sometimes I would wait up to 15 minutes for the new files to appear on the CDN.

Not sure when it was but I tried a Pull CDN setup for a different website. This process was much easier to set up and maintain. I installed CDN for Joomla (again from NoNumber) entered the name of my CDN and published the plugin. Everything worked great. Shortly after that I converted my Push CDNs to Pull CDNs using the NoNumber CDN extension.

Steven Johnson

Steven is a Joomla web developer and worked with Joomla since the Mambo days. He has built websites for startup businesses all the way to for Fortune 500 companies. A graduate of Georgia Tech in Chemical Engineering, he now happily spends his time building websites and reviewing all types of technology.

×

Get Hosting Coupons & the Best Joomla Guides and Resources

Sign Up for our newsletter and get access to Exclusive Hosting Deals, as well as montly Joomla tips, tricks & resources.