Design LinkedIn People You May Know

Free with account Updated Nov 16, 2026 · 18 min read
On this page

    Problem Description

    In this interview, we're going to design the "People You May Know" suggestions of a professional network, similar to LinkedIn's or Facebook's. Members connect with colleagues, classmates and friends. When a member opens the My Network page, the system suggests people they probably know and would want to connect with, best first, and shows more as they scroll. The member can send a connection request to a suggested person or dismiss the suggestion, and the other person then accepts or ignores the request. New members, who have no connections yet, get suggestions right after they sign up, from their company, their school and the contacts they chose to import. The system keeps learning from who sends requests and who accepts them. You can use existing building blocks: a graph service that stores who is connected to whom and handles connection requests, and a profile service that knows each member's companies, schools, years and city, and which imported contacts are members. This interview is about choosing and ordering suggestions, not about storing the network.

    Out of Scope

    • Storing connections and sending requests – the graph service does this; we only read it and record what happens.
    • Suggestions of companies, groups or creators to follow – other products with their own ranking.
    • Inviting people who aren't members yet, by email – a good follow-up question.
    • Detecting fake accounts and spammers – a separate system; banned accounts never reach us.
    • Importing contacts – the profile service already matches imported contacts to members.

    Good Clarifying Questions

    1. How big is the network? – About 1 billion members, 300 million of them active daily, with about 300 connections each on average; some have 30,000. Members open the suggestions about 3 times a day.
    2. What is a good suggestion for the business? – One that ends in an accepted connection, because accepted connections are what make members come back. A request that is ignored, or marked "I don't know this person", is a bad sign, and nobody should be flooded with requests from strangers.
    3. How fast must suggestions load? – Within 200 ms at p99, of which about 80 ms can go to the models.
    4. How fresh must they be? – After a member makes a new connection, their suggestions should reflect it within 5 minutes. A new member should see good suggestions within a minute of signing up. The model should be retrained at least daily.
    5. What if suggestions fail? – The page must still load: show the last suggestions the member saw, or hide the section; never an error.

    Requirements

    Functional Requirements

    1. Suggest People to Connect With – When a member opens the My Network page, it shows people they probably know and would want to connect with, best first, and more as they scroll; never people they're already connected to, already invited, or dismissed.
    2. Suggest People to New Members – A new member with no connections gets suggestions right after signing up, from their company, their school and their imported contacts.
    3. Record What Members Do – The system records which suggestions each member was shown and where, and what happened: request sent, suggestion dismissed, request accepted, ignored or marked "I don't know this person".
    4. Keep Learning – The system trains a new model from these records at least daily and gives it to members only after it proves at least as good as the current one.

    Non-Functional Requirements

    1. Scale – 300M daily members × 3 visits = 900M requests a day: about 10K/s on average, 30K/s at peak; a network of 1B members with about 300 connections each.
    2. Latency – Suggestions under 200 ms at p99, with about 80 ms for the models.
    3. Freshness – A new connection changes the member's suggestions within 5 minutes; a new member gets suggestions within 1 minute of signing up; a new model at least daily.
    4. Availability – 99.9%. If ranking fails, the member sees their last suggestions or no section; the page never fails.