SpinTheMic
Pro

Interview practice question

Social graph at scale

System Design · Databases · Experienced

You need to store a social graph of 1 billion users and 200 billion follow edges, supporting "who does X follow" and "who follows X". How do you store it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Adjacency lists, partitioned by user.
  • Two tables: following and followers.
  • Wide-column or sharded SQL.
  • Celebrity accounts need special handling.
  • Graph DB only if multi-hop queries dominate.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics