I'd design a two-stage system: candidate generation pulls the top N posts from a user's social graph and followed accounts, then a ranking model scores each post. For signals I'd use engagement history — likes, comments, shares, watch time — plus social proximity, content type affinity, and recency. I'd train a gradient-boosted model or a lightweight neural ranker. For scale, I'd precompute candidates and cache ranked feeds, refreshing every few minutes. I'd validate changes with A/B tests measuring click-through rate and session length.
Before I touch architecture, I want to define what good means here — because that's where most ranking debates at Meta actually live. Short-term, good is clicks and watch time. Long-term, good is whether a user comes back tomorrow and leaves feeling the time was worthwhile. Those two objectives can conflict. I'd design a two-stage system — candidate generation from the social graph, then a ranker — but I'd instrument two separate metric tracks: a short-term A/B signal like meaningful interactions, and a long-term holdout measuring 90-day retention and self-reported satisfaction. I'd explicitly cap the weight on pure engagement features to prevent the ranker from drifting toward content that's compulsive but not valuable. Any ranking change that improves short-term engagement but degrades the 90-day retention holdout doesn't ship.