CDN storage
22 Oct 2018

CDN Storage – Push Versus Pull

CDN Storage is an essential element of the service a Content Delivery Network (CDN) utilizes to improve the performance, scalability, and availability of your website. CDNs are able to provide these benefits by caching your website’s static content on servers across the world ensuring the shortest delivery route to your global users. There are two distinct methods CDNs utilize to perform this caching service, push publishing and pull publishing.

CDN Storage Using Push Publishing

Push CDN publishing involves the consistent copying of your static files from your web server to the CDN service. Setting up your push CDN service usually includes the creation of an automated task on your server, like a cron job on Linux, which regularly copies data from your origin to your CDN storage at some specified interval.

The primary advantage of a push architecture versus a pull architecture is that a secondary copy of your static web content is cached on the CDN service. Should your web server go offline for whatever reason, users will still be able to access the static content. Although this may not be ideal, in certain circumstances it can be an effective high-availability solution. For example, if you need to perform some maintenance on your server which will take it offline for an extended period of time, you could build a static web page which the CDN can host until your web server comes back online.

In addition to the automated cached copy advantage that push publishing offers, it also provides better performance when compared to pull publishing. This performance improvement is due to the flow of the push architecture. When the user visits your site, there is no delay as the cached data is available because the CDN does not need to request or copy it from the origin.

Push CDN publishing also gives you greater control over the copying of files which consequently provides you with better data refresh management. However, this data administration benefit does have its disadvantages. Firstly, using push CDN publishing requires more effort from the website owner who has to create and manage the necessary upload process. Furthermore, if not executed correctly, you could end up with a situation where users experience missing content. This error can occur when a user visits the site while the website owner uploads data and no current cached copy of the relevant files on the CDN exist.

CDN Storage Via Pull Publishing

Pull CDN publishing involves the CDN automatically obtaining data from the web server if the file requested by the website visitor is not present on the CDN cache. With pull publishing, the website owner does not have to upload any data to the CDN storage as the CDN service manages the process entirely. On setup, the first time a visitor navigates to your website, the CDN will pull every static file from the origin. Subsequently, every visitor will then receive a cached copy of the data improving the site’s load time. However, the CDN will first check the time validity of the content using techniques such as cache control headers. This process can create a minimal impact on site load times.

The primary advantage of pull CDN publishing is that there is minimal administrative effort involved. You do not need to set up an automated task on your server or configure any specific upload schedule. Furthermore, you also do not need to perform any file selection as every static asset will automatically be pulled from your web server as needed. However, this automated process does have some disadvantages.

If for whatever reason some text, images, or other static object is not available on your web server and the CDN has not cached the data, the content will be missing from the webpage when the user’s browser loads it. Furthermore, pull publishing also provides far less flexibility as the CDN caches every file on the specified URL. This caching strategy differs from push publishing where the CDN subscriber has more control and can specify the objects which need caching.

CDN Push vs. Pull with Live Streaming

CDN push and pull technology not only applies to static content but is configurable for other web content types such as live streaming services. For example at CDNsun, configuring CDN live services with push publishing involves connecting your live encoder to your closest CDNsun streaming server. This server then essentially takes the role of the CDN origin. When a viewer accesses your live stream, their nearest CDN PoP then streams the data from the CDN origin. With pull publishing the process is much simpler, you publish the stream on your internal streaming server. CDNsun then streams the content to the user’s closest CDN PoP.

Push vs. Pull – Which is the Better Option?

CDN services provide a wide range of benefits. However, there are a few factors which you need to consider before selecting a CDN storage strategy for your website. Push publishing offers greater control than pull publishing, and in some instances slightly better performance, but it does come with a management overhead. Pull publishing, on the other hand, requires very little maintenance but does not offer the same control, and flexibility. Furthermore, if the content on the origin is unavailable for whatever reason, pull publishing does not provide the enhanced availability options which push publishing offers.

Ultimately, selecting the correct CDN storage strategy will come down to your business requirements. If availability is a vital factor, then a push strategy is the best option, but it does come with a higher management overhead.

CDN Storage with CDNsun

CDNsun offers both push and pull solutions and provides CDN storage space for the first 20GB of cached data free of charge. If your site requires more storage space, then competitive pricing is available with subscriptions ranging from $4.99 for 50 GB to $169 for 2 TB. If you opt to push your content onto CDNsun’s service, there are six various file upload technologies which you could use to accomplish this. These upload technologies include FTP, FTPS, SFTP, RSYNC, an HTTPS API, and Web File Manager which is an implementation of the HTTPS API on our CDN dashboard.

About CDNsun

Over and above, our cost-effective storage solutions, CDNsun also offers API services free of charge and no expiry on any credit you may have on your account. Furthermore, you can use a single account to manage multiple websites, and integrate CDNsun’s services with other CDN providers if your solution requires it. Finally, If you need to secure your content, CDNsun offers four CDN SSL solutions which include a free shared and custom option.

CDNsun’s CDN service consists of more than 50 PoPs located across the globe, a dashboard for easy management of your CDN solution, integration support, and 24/7 technical support via phone, email, and live chat.