DevOps Peach

System Design for DevOps · Module 03

Data, Caching and CDN

Where data lives and how it gets to users fast: pick SQL or NoSQL by access pattern, scale databases with replicas and shards, reason about consistency with CAP and quorums, cache with the right pattern and eviction policy, and push content to the edge with CDNs and multi-CDN.

Practice interactively →

What you will learn

Lessons

  1. SQL vs NoSQL: Choosing a Database

    Relational databases give schemas, joins and transactions; NoSQL stores (key-value, document, wide-column, graph) trade some of that for scale-out and flexible schemas. Choose by access pattern, consistency and scale.

  2. Replication and Sharding

    Replication copies data to more nodes for read scale and failover; sharding splits data across nodes so each holds a part. Replicas bring replication lag; shards need a good shard key and make cross-shard queries harder.

  3. CAP, Consistency and Quorums

    During a network partition a distributed store must choose between consistency and availability (CAP); consistency models range from strong to eventual, and quorum reads and writes (R + W > N) give tunable guarantees.

  4. Caching Patterns and Eviction Policies

    A cache keeps frequently read data in fast memory close to the app; cache-aside, read-through, write-through and write-back decide how cache and database stay in sync, and eviction policies such as LRU, LFU and FIFO decide what to drop when memory is full.

  5. CDN and Multi-CDN

    A CDN caches content at edge locations close to users, cutting latency and origin load; cache keys, TTLs and invalidation control freshness, and multi-CDN spreads traffic across providers for resilience, performance and cost.