Redis & CDN (4/10): Cache-aside pattern at ~1K users
Redis cache-aside, CDN, rate limits—cut PostgreSQL load on ShortLink redirects; handle viral hot keys.
· 1 min read
System Design course for beginners — scale systems from 1 to 1M users · Part 4/10▼
Table of contents▼
Goals (~1K users)
Add Redis cache-aside for redirects, CDN for static assets, and rate limits — still a single app tier.
Cache-aside flow
Read Redis → on miss read Postgres → set TTL → redirect. Invalidate on URL updates.
CDN
Cache static bundles; avoid caching dynamic redirects unless you accept staleness.
Exercises
500 RPS reads at 95% hit rate → 25 RPS hit the database.
Frequently asked questions
What scale does part 4 cover?
Redis cache-aside, CDN, rate limits—cut PostgreSQL load on ShortLink redirects; handle viral hot keys.
Continue reading
System design for beginners (1/10): Metrics, QPS, and CAP theorem
What is system design? Free 10-part course: requirements, QPS, p99, availability, CAP—ShortLink traffic estimates from 1 to 1M users. Roadmap: learn-system-design-basics-from-scratch
Read more →URL shortener capstone (10/10): System design at 1M MAU
URL shortener interview spec: 20k redirect RPS, 200 writes/s, p99 and availability—rubric and sample solution.
Read more →Monolith system design (2/10): Single-server MVP architecture
MVP system design: monolith, Nginx, single PostgreSQL—URL shortener API, SQL schema, redirect flow, failure modes before scaling.
Read more →Does your startup need a tech partner?
Free chat about MVP, timeline, and the right profit-sharing approach.