Continuous delivery problems may reside in your CDN
While running continuous delivery, there may be an issue ensuring users have updated content. Due to the inherent latency within a Content Delivery Network (CDN), during a deployment, users may be viewing content on an older version of software.
Running a globally distributed system creates an issue for delivering all the necessary updates and content to end users, while minimizing latency. This problem is not new, nor is there a shortage of solutions claiming to be the magic fix. The problem is, we still see issues with lowering latency in globally distributed systems.
A popular solution is the use of a Content Delivery Network, which will allow the caching of Static Content for faster delivery to the end user. With this integration into your system, it allows the ability to not only improve your end users experience, but also provide an improvement in bandwidth utilization. The issue with this integration, is the updating of the content on your CDN while running a deployment.
What content is on your CDN?
The whole reason behind utilizing a CDN is the caching of content, which allows for faster access by the end user. This particular situation is the one that becomes troublesome while running continuous delivery. The static content on the distributed servers has to updated during the deployment. This is where we look at the considerations needed in running this system.
Continuous delivery and a content delivery network
If your organization is employing a DevOps strategy and effectively running continuous delivery, then the use of a CDN needs to be accounted for during deployments. The reason for this is two-fold:
- The new software version will need to be updated on the CDN
- The static content residing on the CDN will need to be updated
By understanding this update process, there could be an instance where the end user receives an old version of static content. The content, which is being pulled from an older version of software. In effect, the CDN has not yet been updated.
As the deployment of your software runs and the CDN servers are being updated, there needs to be a system in place that replicates the static content residing on the servers. This could mean either erasing the old versions of static content as the deployment begins, or eliminating the CDN during the deployment all together.
If either method is used, there could end up becoming a latency or bandwidth issue as a result. This is where the CDN could be causing issues with continuous delivery.
The CDN caused continuous delivery issue
The issue that is caused in this situation is that the end user is trying to view content which is being caught in a deployment. If the default settings of your system are to send all traffic through your CDN, then the user will be viewing old versions of content. One answer to this problem is to provide a re-routing of this traffic.
Developing a system which will route traffic around your CDN during a deployment could be the best solution to this problem. As there is most likely already a system being used for sending dynamic content, replicating this system during a deployment is in most instances the best solution.
While running a continuous delivery environment on a CDN, the end user experience will need to be accounted for. Ensuring content is updated and current could be the issues you are facing.