PYMK
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Design People You May Know: the 60-second story

    Design People You May Know

    Three faces and a “Connect” button, picked from a billion members.

    Each one is a guess about a person, made from a billion-node graph in under 200 ms.

    62,500

    two-hop paths for one active member

    Assume 250 connections, each with 250 of their own. Across 300M monthly members, that’s ≈ 300 TB to shuffle every night.

    Where does friends-of-friends run?

    Bad: On every request

    Most of 16 partitions per request, 625M adjacency reads a second at peak.

    Good: Overnight, hubs capped

    Keep the top 500 per member. A request reads them in ≈ 5 ms.

    Three hub friends add as many paths as 247 others

    Recruiters and founders know tens of thousands, the weakest evidence. Sample at most 1,000 of each hub’s connections.

    Vikram shares four mutual connections with Asha. Priya shares three. Who should rank higher?

    The trick

    Priya. Adamic–Adar weights each mutual by 1 / log of their connections, and Vikram’s four are recruiters with 20,000 each.

    Nightly, in minutes, per request: three lanes, one store

    Batch builds 500 per member overnight. A new connection merges both networks within minutes. Each request filters against live stores, then ranks.

    A psychiatrist’s patients all saved her number. What could go wrong?

    Contact matching suggests them to each other. Same for a journalist’s sources or a lawyer’s clients. Address books are the riskiest signal.

    The fix: reasons only from visible facts

    1. Never show “who has your number”
    2. Contacts are one weak feature, never alone
    3. No signals from places or health
    4. Let members opt out of contact suggestions

    Remember

    Generate wide offline with hubs capped, merge new connections in minutes, then filter live and rank online. Reasons come only from what the viewer can see.