# System Design Interview Prep: CDNs

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/blog/cdns-content-delivery-networks
Source observed: 2026-11-05T00:52:48.182Z
Last checked: 2026-11-05T00:52:48.182+00:00
Indexed: 2026-11-07T02:59:40.389+00:00

---

# System Design Interview Prep: CDNs

We are Aced (formerly Exponent), and this Technical Program Management article is part of our system design interview preparation series. For broader preparation, see our [System Design Interview Course](https://www.aced.io/courses/system-design-interviews?utm_source=blog&utm_campaign=blog-banner&src=blog).

![Kevin Jin](https://s3-us-west-2.amazonaws.com/pmlesson/2020/12/IMG_0721.jpg)

Kevin Jin • Last updated a month ago

![System design article illustration](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/pmlesson/2021/04/nasa-Q1p7bh3SHj8-unsplash-1.jpg)

## Problem Background

When a client sends a request to an external server, the request and response may cross many routers. The number of hops generally increases with geographic distance, increasing latency. A website hosted in an AWS datacenter in California (`us-west-1`) may load in approximately `~100 ms` for users in the United States but take `3-4 seconds` for users in China. For globally distributed systems, we should consider strategies that reduce latency for geographically distant users.

## What are CDNs?

CDNs—Content Distribution Networks or Content Delivery Networks—reduce request latency when users fetch static assets from a server. An ideal CDN is a globally distributed group of servers, so users are near a CDN server regardless of their distance from the origin server. Instead of fetching static assets directly from the origin, users fetch cached copies from a nearby CDN server.

Static assets include images, videos, HTML, CSS, and JavaScript. Because these files can be large—for example, an HD wallpaper image—serving them from a nearby CDN server can also save network bandwidth.

## Popular CDNs

Cloud providers commonly offer CDN solutions that integrate with their other services. Examples include Cloudflare CDN, AWS CloudFront, GCP Cloud CDN, Azure CDN, and Oracle CDN.

## How do CDNs Work?

A CDN is a globally distributed group of servers that caches static assets for an origin server. Each CDN server has its own local cache, and the caches should remain synchronized. Cache population generally follows one of two models: Push or Pull.

### Push CDN

In a Push CDN, engineers push new or updated files to the CDN, which propagates them to the CDN server caches. The origin server sends the asset to the CDN, which stores it. The CDN does not request the asset from the origin server.

![Push CDN diagram](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/pmlesson/2021/04/image-1.png)

**Trade-off:** Developers must push every created or updated asset. If they do not, clients cannot fetch the asset from the CDN. This requires more engineering work to keep CDN assets current.

### Pull CDN

In a Pull CDN, the cache is updated lazily. When a user requests a static asset:

- If the CDN does not have the asset, it forwards the request to the origin server, caches the returned asset, and sends it to the user.
- If the CDN already has the asset, it returns the cached copy.

![Pull CDN cache miss diagram](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/pmlesson/2021/04/image-2.png)

![Pull CDN cache hit diagram](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/pmlesson/2021/04/image-4.png)

Pull CDNs require less maintenance because they automatically fetch assets missing from the cache. Their disadvantages are that cached assets can become stale after an origin update, and the first request for an uncached asset takes longer because it must reach the origin server.

Pull CDNs are more popular because they are easier to maintain. Common ways to reduce staleness include:

- A timestamp on the cached asset. Pull CDNs typically cache an asset for up to `24 hours` by default; after expiration, a request causes the CDN to fetch the asset again.
- [Cache-Control response headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control?ref=exponent-blog.ghost.io), which can specify policies such as refetching every five minutes or whenever a new release version is available.
- Cache busting: storing assets with a hash or an [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag?ref=exponent-blog.ghost.io) that differs from previous versions.

![CDN request example](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/WMC9H3PdAl2uLfLty4Vj76UmpttlaP6ShZDt7-Q_63_15kpmmHJOy9glKwPMhJoWAOwmCF4kWNpbRZNsuH4UAin91mcJdSK0uzrc_u7msdBM9AqlwipefMTK3oZiho4N_ZLfEr81.png)

In the example, a user requests `image.png` from the CDN at [https://3284.cloudfront.net/image.png](https://3284.cloudfront.net/image.png?ref=exponent-blog.ghost.io). If the CDN does not have it, the CDN fetches it from the origin at [https://test-app.com/image.png](https://test-app.com/image.png?ref=exponent-blog.ghost.io).

## When not to use CDNs?

CDNs reduce latency for static files, not most API requests. We should consider alternatives in these situations:

- **Users are concentrated in one region:** There may be no benefit to a CDN if we can host origin servers in that region.
- **Assets are dynamic and sensitive:** Serving stale data is unsuitable for sensitive use cases, including financial or government services.

## Exercise

We are building Amazon’s product listing service, which serves product metadata and images to shoppers’ browsers. Where should a CDN fit in the design?

![Amazon product listing CDN exercise](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/Cf-O75M6IuHTh--jKRMv4QCUJteXddyGn_sdD-VNvhSoPMVTLJC5hQe0BBchmQEOR52bV_if043dM_wIFkk7HLFYbKUL-eyA1BFxtRoN5ZB4pNNZT4d3WIV9guTWIX7-5wsKwOKu.png)

### Answer

![Amazon product listing CDN exercise answer](https://storage.ghost.io/c/a5/f5/a5f5c2f0-4c62-43c7-891b-662a0b6d68b3/content/images/cCDIK3TKy4Aye-PhLv2_KqMrkbLUtoUDOm0gwcG3YAAR-Sm0qG1_q7UtNZPaBGYcdHwEw0Ohtlefe-7WDwIiN5NJdynFYGrZEplW8ACFFiB9ULlIJuE8V9xqdbimWQ6FnoRCV5Sp.png)

## Interview preparation and coaching

- [Browse technical program manager interview questions](https://www.aced.io/questions?role=tpm&src=blog): Review recently asked technical program manager interview questions and answers from real candidates.
- [Book time with a Technical Program Manager coach](https://www.aced.io/coaching?role=tpm): Coaching includes mock interviews, career coaching, and resume review. [Browse coaches](https://www.aced.io/coaching?role=tpm&src=blog).

## About Aced

We help people prepare for software engineering and other technology interviews with free interview guides, insider tips, and courses. We report a `96% rating` from `5,400 reviews`.

[Create your free account](https://www.aced.io/signup?src=blog)

## Related Courses

### [Software Engineering Interview Prep Course](https://www.aced.io/courses/software-engineering)

![Software Engineering Interview Prep Course](https://images.ctfassets.net/x78yjrjc11pq/4VkuYewBHUFIVUS5oJDW5h/02e833439b1289f25f38f13f81cbdca3/adobe_stock_optimized.jpeg?w=800&h=800)

`5 courses` • `41,700 students`

Prepare for roles at Google, Amazon, Microsoft, Meta, Apple, and other top companies with mock interviews, frameworks, and advice from senior candidates. Topics include data structures, algorithms, system design, people management, behavioral interviews, and more.

### [Technical Program Management Interview Prep Course](https://www.aced.io/courses/tpm)

![Technical Program Management Interview Prep Course](https://images.ctfassets.net/x78yjrjc11pq/3cFr05VXO4mAcuqrI861Ob/c84a83a29ab27ac67309f3e3658805da/Technical_Program_Manager_Interview_Prep_Course.jpeg?w=800&h=800)

`5 courses` • `18,700 students`

Prepare for program management roles at Google, Meta, Amazon, Microsoft, Apple, and other top companies. Topics include system design, program sense, cross-functional projects, behavioral interviews, and more.

## Related Blog Posts

- [System Design Interview Prep: CAP Theorem](https://www.aced.io/blog/cap-theorem) — A month ago • `5 min read`
- [Technical Program Manager Interview Prep (2026 Guide)](https://www.aced.io/blog/how-to-ace-the-technical-program-management-interview) — A month ago • `28 min read`
- [What TPM Interviewees Need to Know About Cross-Functional Partnerships](https://www.aced.io/blog/what-tpm-interviewees-need-to-know-about-cross-functional-partnerships) — A month ago • `11 min read`
- [How to Answer System Design Questions like "Design Twitter."](https://www.aced.io/blog/how-to-answer-system-design-questions-like-design-twitter) — A month ago • `9 min read`

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fblog%2Fcdns-content-delivery-networks&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fblog%2Fcdns-content-delivery-networks). Opening a form does not execute a tool.