Загрузка...

Caching in System Design: Redis, Strategies, Clustering & Real-World Patterns (Hands-on Demo)

Caching is one of the most powerful building blocks in system design.

Github repo:
https://github.com/bagherani/system-design-course

In this video, we go deep into:
• What caching really means (with real-world analogies)
• Performance, scalability, availability impact
• Cache strategies (Lazy Loading, Write-Through, Write-Behind)
• Eviction policies (LRU, LFU, FIFO, TTL)
• Data inconsistency challenges
• Real-world patterns (social media timeline, distributed locks, like counters)
• Redis architecture, clustering, slot hashing (16,384 slots), and throughput scaling
• Hands-on Redis Cluster demo with Node.js + ioredis
• CLI exploration and slot inspection

You’ll learn not only where to use caching — but why, when, and how to scale it properly.

⏱ Sections & Timestamps

00:00 – What Is Caching? (Real-World Analogies)
01:07 – Concrete Definition: Faster, Closer, Cheaper Access
02:17 – Performance, Scalability & Availability Impact
03:05 – Simple JavaScript Cache Example
03:31 – Where Caching Exists in a System (Frontend → CDN → Backend → DB)
05:46 – Redis Basics (O(1) Hash Table, Key-Value Model)
06:34 – Key, Value, TTL, Cache Hit & Miss
07:47 – Caching Strategies
09:55 – Eviction Policies (LRU, LFU, FIFO, TTL)
11:12 – Data Inconsistency Problem Explained
12:38 – Timeline Caching Pattern (Fan-out Strategy)
14:31 – Distributed Locks (Ticket Booking Example)
15:33 – Redis Architecture & Cluster Overview
16:39 – 200K Ops/Sec per Node & Horizontal Scaling
17:27 – Redis Slot Mechanism (16,384 Slots + CRC16 Hashing)
18:41 – Throughput Scaling with Multiple Nodes
19:21 – Practical Redis Demo (Node.js + ioredis)
22:44 – Terraform Setup & Local Cluster Deployment
24:20 – Inspecting Redis Nodes in VS Code
26:03 – Using CLI (cluster slots, get, smembers)

🚀 Key Concepts Covered
• RAM vs SSD speed difference (100–1000x faster)
• O(1) read/write complexity
• 200K operations/sec per Redis node (with proper hardware)
• Horizontal scaling via slot-based sharding
• Trade-offs of write-behind strategy
• Atomic operations for distributed locking

#SystemDesign #Redis #Caching #BackendEngineering #Scalability #DistributedSystems #SoftwareArchitecture #DevOps #PerformanceOptimization #NodeJS #CloudArchitecture

Видео Caching in System Design: Redis, Strategies, Clustering & Real-World Patterns (Hands-on Demo) канала Web Detailed by Mohi
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять