The NOC CDN (Content Delivery Network) accelerates your website by caching static and dynamic content across a global network of edge servers. When a visitor requests your site, the CDN serves content from the nearest edge location rather than your origin server, reducing latency and improving load times.
How the NOC CDN Works
When you add your site to NOC, DNS is pointed to NOC's Anycast network. All incoming HTTP/HTTPS requests are routed to the nearest edge server. The edge server checks its local cache for the requested resource. If the content is cached (a cache hit), it is served immediately to the visitor. If the content is not cached (a cache miss), the edge server fetches it from your origin server, delivers it to the visitor, and stores a copy in cache for subsequent requests.
This process is transparent to your visitors. They connect to the CDN automatically based on DNS resolution, and the CDN handles all communication with your origin server behind the scenes.
Caching Layers
The NOC CDN uses multiple caching layers to maximize performance:
- Edge cache: Each point of presence (PoP) maintains its own cache. Content is stored as close to the visitor as possible for the lowest latency.
- Mid-tier cache: Regional cache nodes sit between the edge and your origin. If an edge server does not have a cached copy, it checks the mid-tier cache before contacting your origin. This reduces the number of requests that reach your server.
- Origin shield: A single cache layer that sits directly in front of your origin server. All cache misses from edge and mid-tier nodes are funneled through the origin shield, consolidating requests and protecting your origin from traffic spikes.
Cache-Control Headers
The NOC CDN respects standard HTTP cache-control headers sent by your origin server. You control what gets cached and for how long by configuring these headers on your web server or application:
Cache-Control: public, max-age=86400— Cache the resource for 24 hours.Cache-Control: no-cache— The CDN will revalidate with the origin before serving the cached version.Cache-Control: no-store— The CDN will not cache the resource at all.Cache-Control: s-maxage=3600— Sets CDN-specific cache duration (1 hour) independent of browser cache duration.
If your origin does not send cache-control headers, the NOC CDN applies default caching rules based on file type. Static assets like images, CSS, and JavaScript files are cached by default. HTML pages follow your configured caching policy in the NOC dashboard.
What Gets Cached
By default, the NOC CDN caches the following static file types:
- Images:
.jpg,.jpeg,.png,.gif,.webp,.svg,.ico - Stylesheets:
.css - Scripts:
.js - Fonts:
.woff,.woff2,.ttf,.eot - Documents:
.pdf
Dynamic content (HTML pages, API responses) is not cached by default but can be enabled through cache rules in the NOC dashboard or via cache-control headers.
Cache Purge and Flush
When you update content on your origin server, you may need to remove the old cached version from the CDN. NOC provides several methods to purge cached content:
- Purge by URL: Remove a specific cached resource by entering its full URL in the NOC dashboard. This is the most targeted approach and is ideal when you update a single page or asset.
- Purge by path: Remove all cached resources under a specific path (e.g.,
/blog/*). Useful after bulk content updates. - Full cache flush: Clear the entire cache for your site across all edge locations. Use this sparingly, as it forces all content to be re-fetched from your origin, temporarily increasing origin load.
- API purge: Trigger purge operations programmatically through the NOC REST API. This is useful for integrating cache clearing into your deployment pipeline.
Cache purge operations typically propagate across all edge locations within 30 seconds.
Performance Benefits
Using the NOC CDN delivers several measurable performance improvements:
- Reduced latency: Content is served from the nearest edge location, cutting round-trip time significantly for geographically distributed visitors.
- Lower origin load: Cached content is served directly from the edge, reducing the number of requests your origin server must handle.
- Improved availability: If your origin server goes down briefly, cached content continues to be served from the edge, keeping your site available to visitors.
- Bandwidth savings: The CDN absorbs the majority of bandwidth for static assets, reducing your hosting bandwidth costs.
For more information on managing CDN settings programmatically, see the CDN & WAF API documentation.