Перейти к содержимому

Design a Scalable Leaderboard System for 100M Users | System Design Interview | Redis

CodeWithBrowny

0:00 / 0:00

Design a Scalable Leaderboard System for 100M Users | System Design Interview | Redis

138 просмотров · 1 дн. назад
CodeWithBrowny
35 подписчиков
138 просмотров · 1 дн. назад
🚀 *SYSTEM DESIGN: DESIGN A SCALABLE LEADERBOARD FOR 100 MILLION USERS* How would you design a leaderboard that supports millions of players, real-time score updates, global rankings, and extremely fast reads? In this 1 hour 20 minute deep dive, we design a scalable leaderboard system from scratch — starting with fundamental data structures and gradually moving towards a production-level distributed architecture. This is not just about drawing boxes and arrows. We'll understand the engineering decisions, trade-offs, bottlenecks, and failure scenarios behind the system. 🔥 *WHAT YOU WILL LEARN* 📌 *1. System Design Fundamentals* Functional and non-functional requirements Workload estimation and system requirements SQL vs Redis: when and why? Designing for 100 million players 📌 *2. Redis Internals & Data Structures* Redis Sorted Sets (ZSET) How ZSET maintains ranking Hash Table + Skip List internals Redis commands: ZADD, ZRANK, ZREVRANK, ZRANGE, ZREVRANGE Time complexity and efficient ranking 📌 *3. Complete System Architecture* API design and leaderboard service PostgreSQL as the durable source of truth Redis as the ranking and serving layer Score update and read flows Top K, individual rank and nearby players 📌 *4. Reliable Score Processing* Idempotency and duplicate event prevention Transactional Outbox Pattern Event ordering and version checking Asynchronous workers 📌 *5. Consistency & Real-Time Updates* Eventual consistency Read-after-write guarantees Caching trade-offs WebSockets vs Server-Sent Events (SSE) 📌 *6. Distributed Systems & Scaling* Horizontal scaling and sharding Regional leaderboards Distributed Global Top K aggregation Exact global ranking Replication, failover and multi-region architecture 📌 *7. Production Engineering* Redis and PostgreSQL failure recovery Fault tolerance and retry mechanisms Monitoring: p50, p95 and p99 latency Security, authentication, rate limiting and anti-cheat mechanisms 🎯 *WHO SHOULD WATCH?* Software Engineers and Backend Developers Students preparing for SDE interviews Developers learning System Design Engineers interested in Redis and Distributed Systems Anyone preparing for product-based company interviews 🗺️ *SYSTEM DESIGN WHITEBOARD / NOTES:* https://www.figma.com/board/8M1M2dEiQ... If this session helps you understand system design better, consider liking, sharing and subscribing! 🔔 Subscribe to *CodeWithBrowny* for more DSA, System Design, Software Engineering and Tech content. *DSA • TECH • SYSTEM DESIGN • CAREER* Learn • Build • Grow. 🚀