RETURN TO SYSTEM DESIGN VAULT (55)BLUEPRINT #50 // Easy
#50EasyHigh-Concurrency Feeds & Social
Design Facebook Likes Feature with Live Updates
ASKED IN INTERVIEWS AT:MetaCoinbase
EXECUTIVE SUMMARY & PROBLEM STATEMENT
Design the interactive Facebook reactions button providing instant local UI feedback, asynchronous aggregation, and live animated counter updates via WebSockets.
SCALE ESTIMATION & TRAFFIC ENVELOPE
DAILY ACTIVE USERS / TPS1 Billion active users reacting multiple times daily
READ / WRITE TRAFFIC RATIOHeavy concurrent write bursts
5-YEAR STORAGE CAPACITYPostgreSQL for permanence, Redis for live active counters
FUNCTIONAL REQUIREMENTS
- [1]Select reaction (Like, Love, Haha, Wow, Sad, Angry)
- [2]Instant optimistic animation on client device
- [3]Stream updated total counts to all active post viewers
NON-FUNCTIONAL REQUIREMENTS
- •Zero UI latency on tap
- •Consistency within 2 seconds across viewers
- •High availability under Super Bowl-scale spikes
CORE ARCHITECTURAL COMPONENTS
Edge API Gateway
Redis Atomic Counter Buffer
Kafka Aggregation Queue
SSE Live Broadcast Layer
PostgreSQL Permanent Store
DATA SCHEMA & PERSISTENCE
Reactions: post_id, user_id, reaction_type (ENUM), updated_at
DISTRIBUTED TRADE-OFFS & FAILURE MODES
- ⟡Optimistic client-side animation makes the app feel instant even before network acknowledgment returns.