Skip to content

How a CDN serves a request

The edge checks its cache, serves on hit, or fetches from origin on miss; the origin sees only misses.

sequenceDiagram
  participant U as User
  participant E as CDN Edge
  participant O as Origin
  U->>E: GET /img.jpg
  E->>E: Cache hit?
  alt Hit
      E-->>U: 200 OK (cached)
  else Miss
      E->>O: GET /img.jpg
      O-->>E: 200 OK
      E->>E: Cache
      E-->>U: 200 OK
  end