๐ Scaling Reads While Designing Systems
Interviewers love to ask about read scaling because almost every large-scale app is dominated by read traffic.
- Instagram feeds loading dozens of photos per open
- Amazon product pages getting hammered during Prime Day
- YouTube serving billions of video views daily
Here are the 3 strategies one should know when it comes to optimizing reads in system design interviews
1๏ธโฃ ๐ข๐ฝ๐๐ถ๐บ๐ถ๐๐ฒ ๐๐ต๐ฒ ๐๐ฎ๐๐ฎ๐ฏ๐ฎ๐๐ฒ ๐๐ถ๐ฟ๐๐
- Add indexes so queries donโt scan millions of rows.
- Denormalize or use materialized views to cut expensive joins.
- Interview tip: confidently add indexes for your query patterns โ under-indexing kills more systems than over-indexing.
2๏ธโฃ ๐ฅ๐ฒ๐ฎ๐ฑ ๐ฅ๐ฒ๐ฝ๐น๐ถ๐ฐ๐ฎ๐
- Leader handles writes, replicas handle reads.
- Great for distributing load โ but beware replication lag. Users might not see their updates immediately.
- Interviewers love when you call out synchronous vs asynchronous replication tradeoffs.
3๏ธโฃ ๐๐ฎ๐ฐ๐ต๐ถ๐ป๐ด ๐๐ฎ๐๐ฒ๐ฟ๐
- Store hot data in Redis/Memcached for sub-millisecond lookups.
- Push popular content to CDNs so users hit local edge servers instead of your DB.
- Be ready to talk about TTLs, versioned keys, and the cache stampede problem.
๐ก ๐๐ป๐๐ฒ๐ฟ๐๐ถ๐ฒ๐ ๐๐ถ๐ฝ: Be proactive. When you see an endpoint that will be hammered (user profiles, feeds, event pages), pause and say: โThis endpoint could get billions of reads a day, let me walk through my read scaling strategy.โ
Creator