What is CDN? (Content Delivery Network)

A comprehensive guide to Content Delivery Networks and caching strategies

Featured image

Image Reference link



Overview

Today, we’ll explore Content Delivery Networks (CDN), a crucial technology for optimizing web content delivery across the globe.


What is CDN?

A Content Delivery Network (CDN) is a geographically distributed network of servers designed to:

Popular CDN providers include Akamai and AWS CloudFront.


Understanding Caching

Caching is the process of storing data locally for quick future access. In web browsers:
  • Stores static data copies locally
  • Reduces server requests
  • Saves time and resources
  • Perfect for static files (images, CSS, JavaScript)


Content Types

Static Contents

Dynamic Contents


CDN Caching Methods

1. Static Caching

2. Dynamic Caching


How CDN Works

  1. First Request:
    • Browser requests content
    • Origin server provides content
    • CDN caches the content
  2. Subsequent Requests:
    • Browser requests content
    • Nearest CDN server responds
    • Faster response times


CDN Architectures

CDN Architecture

PoP (Point of Presence)

Push vs Pull Methods

Push Method:
  • Content actively pushed to PoPs
  • Requires manual updates
  • Faster content delivery
  • Lower error probability
Pull Method:
  • Content pulled on demand
  • Easier initial setup
  • Resource efficient
  • May have slower first access

Architecture Types

1. Scattered Architecture:

2. Consolidated Architecture:



References