Was this article helpful?
Thanks for your feedback
To ensure blazing fast content delivery, Contentstack has set up a CDN for its APIs. So, if you are using Contentstack, fast content delivery comes by default. Contentstack has its CDN endpoints to deliver content.
Additional Resource: Want to learn more about Content Delivery Networks? Refer to our What is CDN and How it Works.
If you want to accelerate the pace of delivery further and gain even more control over your digital properties, you can set a separate CDN for your project. This CDN ensures that a cache system is available between your web server and the browser. So, page requests come directly from the cache instead of the web server or the Contentstack server.
Here’s what happens when you set up your CDN:
From the above, it is evident that having multiple CDNs in place ensures fast delivery of content and reduces the number of calls to the Contentstack server.
Let’s look at the steps involved in setting up a CDN for your site.
The first step is to choose the right CDN provider. Before you choose one of the numerous options available, evaluate the solutions carefully.
A excellent way to do this is:
Once you have selected and registered your website with the CDN, you can move onto setting it up on your website.
If you don't have your website ready, create one and install the required plugins to enable communication between your website and CDN.
Additional Resource: To create a website on your own, refer to our Getting Started guides that will help you to start from scratch.
Connecting your website to the selected CDN depends on which one you have chosen. Check with your CDN provider if there are any required activation steps. Some CDN providers, such as CloudFlare, have clear instructions and offer a custom plugin for ensuring the smooth syncing of your files with their CDN server and nodes.
Data Purging refers to the flushing of the data from the CDN cache. You need to balance when and why data is purged from the cache to ensure users receive up-to-date content while keeping costs down and performance high.
You can choose to clear all cache data from the CDN whenever new content is published or any existing content is updated. The other option is to purge the cached data of only the content that has been updated. You can also schedule your purges as desired. So, for example, you can purge data every X minutes when the content is updated in Contentstack.
If you get stuck, you can contact their support team. After your files have synced with the CDN provider, set up your website to ensure it creates a communication channel with the CDN so that content gets cached in your CDN correctly.
You can use Contentstack Webhooks to trigger that the cache is no longer valid and the CDN should purge the cache according to the rules you have set up.
Note: The above steps may vary depending upon the CDN service provider you choose.
Was this article helpful?
Thanks for your feedback