Interview practice question
Can it fit in memory?
System Design · Fundamentals · Intermediate
You need to keep a mapping of 500 million user IDs to their last-seen time for fast lookup. Can it fit in memory on one machine?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- 500M x (8 B key + 8 B value) = 8 GB raw.
- Data structure overhead 2-3x.
- About 20-25 GB realistically.
- Fits on one large machine.
- Shard or replicate for availability.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.