The task of a Content Delivery Network (CDN) is to deliver content to the users in the shortest possible time and as fast as possible. CDNs usually use two methods for data storage and content delivery to the end users: Pull and Push.
In push method a copy of all static resources of a website is stored on all CDN edge servers in various locations, and when an edge server receives a request for a resource from a user, it uses these cached resources to respond to the user.
In this case, the edge server acts as a backup of the main web server that hosts the site. In this method, the website administrator is required to manually transfer the resources that need to be cached on the edge servers.
The CDNs that use this method, often specify several servers as Push servers. The web admin puts the resources on a Push server and the edge servers receive the resources from that server. In this method, it is imperative to enter the CDN domain-name when you are configuring the plugins.
In this method the end user does not need to wait for the content to be copied from the main server to the CDN edge server and then downloaded through the browser (while all of this won’t take more than a few milliseconds). However, it requires the web admin to constantly transfer the resources to the Push server and ensure that it’s up-to-date. In other words, the downside of this method is implementation hassle. Companies like MaxCDN and Amazon Cloudfront use this method.
In this method, the resources are not cached on edge servers. When the first request for a resource reaches a CDN edge server, it would request the resource from the host server. After receiving the response, in addition to sending the resource to the end user, it will be cached on the edge server as well. The future requests for the same resource will be answered using the resources cached on the edge server.
Please note that in this method, only when edge servers all over the world has received a request for the resources of a website, these resources will be cached on all CDN edge servers.
The resources that are cached on a CDN edge server, will remain on this server until their expiration time is reached. After a resource is expired, the first request for that resource will cause the edge server to request it from the host server again, respond to the user and then cache the new value.
The main advantage of this method is its simplicity. In this method all of the content is cached on the CDN’s POP servers with your main domain-name and there is no need for entering the domain-name or additional plugin configuration. Companies such as Cloudflare and KeyCDN support this method.
It also must be noted that Arvan Cloud uses the Pull method in its CDN products.