How LinkedIn ranks your feed in real time
How LinkedIn combines creator affinity, engagement prediction, and diversity constraints to rank feed items using a two-pass scoring system.
The Problem Statement
Interviewer: "You open LinkedIn and scroll through your feed. Some posts are from people you follow, some are from strangers, and some are ads. How does LinkedIn decide the order? How is this different from what TikTok or Instagram does?"
This question tests three things: your understanding of multi-stage recommendation systems that rank heterogeneous content types under latency constraints, your knowledge of feature engineering for social graphs (professional context vs entertainment context), and whether you can reason about the constraints that make a professional feed fundamentally different from a media feed.
Most candidates describe a generic "ML model scores posts" pipeline. Strong candidates talk about the two-pass architecture (retrieval then ranking), the difference between interest-graph feeds (TikTok) and social-graph feeds (LinkedIn), creator affinity scoring, diversity constraints that prevent the feed from becoming a wall of posts by one person, and the cold start problem for new users who have no connections.
Clarifying the Scenario
You: "Before I dive into the architecture, I want to scope this correctly."
You: "When you say 'ranks your feed,' are we talking about the main home feed, or also surfaces like LinkedIn Notifications and 'My Network' suggestions?"
Interviewer: "Focus on the main feed. But briefly mention how ads get mixed in."
You: "Got it. And should I focus on the system architecture, or the ML model details like feature engineering and training?"
Interviewer: "Architecture first. Touch on features at a high level, but I care more about how the pieces fit together."
You: "Perfect. I will structure my answer around four parts: how LinkedIn retrieves candidate posts from millions of options, how the ranking model scores those candidates, how diversity constraints reshape the final order, and how real-time vs batch features feed into the system."
My Approach
I break this into five parts:
- Candidate retrieval: How the system narrows millions of potential posts to a few hundred candidates in under 50ms
- Ranking model: How a two-pass scoring system (lightweight first pass, heavy second pass) assigns a relevance score to each candidate
- Diversity and fairness constraints: How LinkedIn prevents the feed from becoming repetitive (no more than 2 posts from the same creator, mixing content types, anti-echo-chamber logic)
- Feature serving: How real-time features (your recent activity) and batch features (your long-term interests) combine at scoring time
- Cold start: How the system handles new users who have zero connections and zero engagement history
The mental model I use: think of the LinkedIn feed as a three-stage funnel. The top of the funnel has millions of posts published in the last few days. The first stage (retrieval) narrows that to 500. The second stage (ranking) scores those 500 and picks the top 50. The third stage (re-ranking) reshuffles those 50 to enforce diversity rules. The user sees the final 10-15 on the first screen load and gets more as they scroll.
For your interview: announcing this five-part structure upfront is a strong move. It tells the interviewer you have a framework, and it gives them hooks to ask follow-ups on specific parts. I always recommend stating your structure before diving into details.
LinkedIn processes over 9 billion feed impressions per week. The ranking pipeline must complete in under 200ms end-to-end, including network overhead. This is why the two-pass architecture exists: you cannot run a heavy ML model on millions of candidates.
The Architecture
Here is how the pipeline flows:
The Feed Service receives a request when you open LinkedIn or scroll past the current batch. It fires three retrieval queries in parallel: the Network Retriever pulls recent posts from your 1st and 2nd degree connections, the Topic Retriever finds posts matching your followed hashtags and inferred interests, and the Viral Retriever surfaces posts getting high engagement from outside your network ("X liked this" posts).
Each retriever has a different data source and different latency characteristics. The Network Retriever queries a pre-built index of recent posts by members in your network graph (stored in a graph database optimized for adjacency lookups). The Topic Retriever uses an inverted index keyed by hashtag and topic embedding. The Viral Retriever queries a global engagement leaderboard, a sorted set of posts with the highest recent engagement velocity.
The Candidate Merger deduplicates these results into roughly 500 candidates. Deduplication matters because a post from your connection who also uses a trending hashtag might appear in both the Network and Topic results. The merger keeps one copy and merges the retrieval metadata (so the ranker knows the post was retrieved on both signals).
These 500 feed into the Light Ranker, a fast logistic regression model that runs in under 10ms and cuts the set to 150. The Heavy Ranker then applies a deep neural network with hundreds of features to score the remaining 150, producing a ranked list of 50.
The Diversity Engine re-ranks those 50 to enforce business rules: no more than 2 posts from the same creator in any window of 10, at least one article mixed with short posts, and limits on politically charged content. Finally, the Ad Injector places sponsored posts at fixed positions (typically positions 2, 5, and 8 in the feed).
The whole pipeline completes in under 200ms. The critical optimization is parallelism in retrieval and the two-pass ranking (cheap model first, expensive model only on the survivors).
Here is the latency breakdown I use in interviews:
- Retrieval (3 parallel queries): ~30ms wall clock
- Light Ranker (500 items): ~5ms
- Heavy Ranker (150 items): ~80ms
- Diversity re-ranking + ad injection: ~20ms
- Network + serialization overhead: ~65ms
- Total: ~200ms
One thing worth calling out: the feed is paginated. The first request returns 10-15 posts. As you scroll, the client requests the next batch. But LinkedIn does not re-run the entire pipeline for each scroll. The initial ranking produces 50 scored posts, and the client requests them in pages of 10-15. When the client exhausts all 50, it triggers a new pipeline run (a "refresh") which generates a fresh set of 500 candidates, scores them, and returns a new batch of 50.
This pagination design means posts can appear in a different order if you close and reopen LinkedIn. The pipeline runs fresh each time because real-time features (new engagement, new posts) have changed in the interim. This is why your feed feels "alive" even if you check it every 30 minutes.
A common interview pitfall: do not describe the feed as a static pre-computed list. It is generated on demand for each user, with real-time signals mixed into pre-computed features. If you say "the feed is pre-generated and cached," the interviewer knows you are describing a simpler system like an email digest, not a real-time ranking pipeline.
The Two-Pass Scoring System
This is the heart of the feed. I want to walk through exactly how the Light Ranker and Heavy Ranker differ, and why both are necessary.
The Light Ranker uses roughly 50-100 features and a logistic regression model. It scores 500 candidates in about 5ms. Its job is not precision. Its job is recall: keep every post that has any chance of being relevant, discard the obvious misses.
The key features the Light Ranker uses are deliberately cheap to compute:
- Creator affinity (pre-computed): a 0-1 score for how much you historically engage with this creator. A value of 0.8 means you engage with 80% of their posts.
- Post age: hours since publication. Posts older than 72 hours get heavily penalized.
- Content type: text, image, video, article, poll, carousel. Some users engage disproportionately with one type.
- Network distance: 1st degree connection (you are connected), 2nd degree (friend of friend), or out-of-network (viral retriever).
- Post quality score: a pre-computed score based on grammar, length, presence of links, and early engagement velocity.
None of these require embedding lookups or neural network inference. They are all lookups into pre-computed tables or simple arithmetic, which is why the Light Ranker runs in 5ms.
The Heavy Ranker uses 500+ features and a deep neural network. It scores the surviving 150 candidates in about 80-100ms. This model predicts multiple engagement types simultaneously: probability of like, probability of comment, probability of share, probability of click, and probability of hide/report. Each prediction gets a weighted score, and the final ranking is the weighted sum.
The additional features the Heavy Ranker uses (beyond the Light Ranker's 50) include:
- User embedding: a 128-dimensional vector representing your long-term interests, trained on your full engagement history
- Post embedding: a 128-dimensional vector from the post text, trained on engagement prediction
- Creator authority score: a PageRank-style score based on who engages with the creator (engagement from a VP is worth more than engagement from a bot)
- Session context features: what you clicked in the last 5 minutes, how many posts you have scrolled past, time of day, day of week
- Social proof features: did any of your close connections already engage with this post? How many of your connections liked it?
These features require embedding lookups (5-10ms from an embedding store), session state retrieval (from Redis), and social graph queries (pre-indexed but still more expensive than simple lookups).
Notice the weight distribution. Comments get the highest positive weight (0.3) because LinkedIn optimizes for "meaningful professional conversations," not passive scrolling. Likes are weighted lower than comments because a like is cheap engagement. The P(hide) prediction has a negative weight, meaning posts likely to be hidden get penalized.
This weighting is what makes LinkedIn's feed feel different from Instagram or TikTok. Those platforms optimize heavily for watch time and likes. LinkedIn optimizes for comments and shares because those signals indicate professional value.
I find this weight breakdown is one of the most impressive things you can mention in an interview. It shows you understand that the business model shapes the ML objective function, not the other way around. LinkedIn monetizes through recruiter subscriptions and B2B ads, both of which benefit from users who have deep professional conversations. TikTok monetizes through consumer ads shown during long watch sessions. Different business models lead to different ranking weights.
The multi-task prediction head is also worth mentioning. The Heavy Ranker does not train 5 separate models. It trains one model with 5 output heads that share the lower layers. Shared representations reduce training cost and improve generalization because the features that predict "this user will comment" overlap heavily with the features that predict "this user will share."
For your interview: the key insight is that the two models are architecturally different, not just the same model with different cutoffs. Say "cheap logistic regression for retrieval, deep neural network for precision ranking" and you have nailed the core of it.
Diversity and Anti-Echo-Chamber Constraints
Raw ranking by engagement score produces a terrible feed. If your most engaging connection posts 5 times a day, their posts would dominate your first screen. If you engage mostly with political content, your feed becomes a political echo chamber. LinkedIn applies diversity constraints as a post-ranking re-ordering step.
The Diversity Engine enforces several rules:
-
Creator deduplication: No more than 2 posts from the same creator in any sliding window of 10 items. If a creator has 4 posts in the top 50, only the top 2 survive. The others get pushed down.
-
Content type mixing: The feed must alternate between content types. No more than 3 text-only posts in a row. At least one article, one image post, and one video in the first 15 items (if candidates exist).
-
Topic diversity: Internal topic classifiers tag each post (career advice, technical content, company news, life events, industry analysis). The engine ensures no single topic dominates more than 30% of the first 20 items.
-
Anti-echo-chamber dampening: Posts with high engagement but one-sided sentiment (politically charged, controversial) get a scoring penalty. LinkedIn publicly documented this in their 2023 engineering blog. The goal is to reduce "outrage engagement" that gets clicks but degrades the professional atmosphere.
The constraints are applied sequentially, and each one can swap positions in the list. A post ranked #3 by the Heavy Ranker might end up at position #12 after diversity enforcement, because two other posts by the same creator were ranked higher.
This sequential application creates an interesting interaction effect. The creator dedup runs first, which might push a text post down. Then the type mixing rule sees a gap and promotes a different type into that slot. The final order can look quite different from the raw ranking scores. In my experience, the diversity pass reshuffles about 30-40% of the top 20 positions.
This is the biggest difference between LinkedIn and TikTok. TikTok optimizes almost purely for engagement (watch time). LinkedIn sacrifices some engagement to maintain diversity. That is why your LinkedIn feed feels more varied than a TikTok feed, but also why engagement per session is lower. It is a deliberate product choice.
LinkedIn's 2023 engineering blog openly discussed this tradeoff. They showed that disabling diversity constraints increased short-term engagement by 8% but decreased 30-day retention by 4%. Users scrolled more in each session but came back less often. The diversity constraints protect long-term platform health at the cost of short-term metrics. This is the kind of product-engineering insight that really impresses interviewers.
Real-Time Feature Serving
The ranking models are only as good as the features they consume. LinkedIn's feed uses two categories of features, and the distinction matters because they have very different latency and freshness characteristics.
Batch features are computed every 4-6 hours by offline Spark/Hadoop pipelines. These include:
- Creator affinity scores (how much you historically engage with each connection)
- Topic embeddings (your long-term interest vector)
- Network graph features (mutual connections, shared companies, shared groups)
- Post quality scores (pre-computed content quality signals)
Real-time features are computed per request from events in the last few minutes. These include:
- Posts you already saw in this session (to avoid re-showing them)
- Your last 5 clicks and interactions (session context)
The architecture for feature serving looks like this: an offline Spark pipeline runs every 4-6 hours, computes batch features for every user-creator pair, and writes the results to a key-value store (LinkedIn uses their internal Venice store, but think of it as a distributed hash map). When the ranking service starts, it loads the batch features for the users it serves into local memory. Real-time features flow through a Kafka stream: every click, like, and comment produces an event that updates the real-time feature store (Redis cluster) within seconds.
At scoring time, the ranker looks up batch features from local memory (0ms, already loaded) and real-time features from Redis (< 5ms network call). The two feature vectors are concatenated and fed into the model. This hybrid approach gives the best of both worlds: the stability of batch features with the responsiveness of real-time signals.
LinkedIn's internal feature store is called "Feathr" and was open-sourced in 2022. It is specifically designed for this batch + real-time hybrid pattern. If the interviewer asks about implementation details, mentioning Feathr shows you have done your homework.
The real-time feature set also includes:
- The current post's live engagement counters (likes, comments, shares in the last hour)
- Time since the post was published (recency decay curve)
- Device type and connection speed (affects video ranking up or down)
- Current scroll velocity (fast scrollers get different content than slow, deliberate readers)
These real-time features live in a Redis-based feature store with sub-5ms lookup latency. The batch features are pre-loaded into the ranking service's local memory at startup and refreshed periodically from the Venice key-value store.
The hybrid approach is critical to understand. The batch layer (Spark to Venice to local memory) handles the heavy computations that would be impossible to run per request: creator affinity requires aggregating your entire engagement history across millions of creator relationships, and topic embeddings require running an NLP model over your click history. These are minutes-to-hours computations, not millisecond lookups. The real-time layer (Kafka to stream processor to Redis) handles cheap, high-signal features: your session's last 5 clicks, the post's live engagement velocity in the last hour, and the recency decay factor.
At scoring time, the ranker concatenates both feature vectors and feeds them into the model. The batch features provide 80% of the predictive signal (your long-term interests do not change minute to minute). The real-time features provide the remaining 20% that makes the feed feel responsive to your current session. Without the real-time layer, two sessions 30 minutes apart would show identical content. With it, your 2 PM feed already reflects what you clicked at 1:45 PM.
A common interview mistake is saying "we just use a feature store" without distinguishing batch from real-time features. Always call out that expensive features (embeddings, graph features) are batch, and cheap high-signal features (session context, live counters) are real-time. This shows you understand the latency-freshness tradeoff.
The Tricky Parts
-
Cold start for new users: When someone creates a LinkedIn account and has zero connections and zero engagement history, the ranking model has nothing to personalize on. LinkedIn falls back to a popularity-based feed filtered by demographic signals extracted from the signup flow: job title, industry, and region. A new software engineer in San Francisco sees trending tech posts. A new marketing manager in London sees trending marketing content. Over 1-2 weeks, as the user connects with people and engages with posts, the model gradually shifts from popularity-based to personalized ranking. The cold start strategy matters because onboarding experience determines whether a new user becomes active. I would mention this in an interview to show awareness that recommendation systems have a bootstrapping problem.
-
The "LinkedIn influencer" problem: Some power users post 3-5 times daily and get thousands of reactions on every post. Without diversity constraints, these users would dominate the feed for anyone who follows them. The creator dedup rule (max 2 posts per creator in a window of 10) exists specifically for this. But it creates a secondary problem: which 2 of their 5 posts do you show? The ranking model picks the 2 with the highest predicted engagement for this specific user, not the 2 with the highest global engagement. A technical recruiter and a software engineer who both follow the same influencer might see different posts from that creator in their feeds, because the model predicts different engagement patterns for each viewer.
-
Ads competing with organic content: LinkedIn inserts ads at fixed positions (roughly every 5th post). But the ad auction runs separately from the organic ranking pipeline. The Ad Injector literally splices sponsored posts into the already-ranked organic list. This means the post that was ranked #5 becomes position #6 because an ad occupies position #5. The user does not know this, but it affects organic reach metrics for creators. At scale, this ad injection reduces organic impressions by roughly 15-20% (every 5th slot goes to an ad). This creates tension between the ads revenue team and the organic engagement team, which is a common organizational dynamic at social media companies.
-
Content type cold start: LinkedIn now supports articles, newsletters, polls, carousels, video, and plain text posts. When a new content type launches (like carousels), the ranking model has no historical engagement data for that type. LinkedIn bootstraps new types with an exploration bonus: new content types get a temporary scoring boost to collect enough engagement data to train the model. Once the model has sufficient data (typically 2-4 weeks), the bonus is removed. This is a classic exploration-exploitation tradeoff. Without the bonus, new content types would never get shown, so the model would never learn about them. With too high a bonus, the feed gets flooded with unproven content.
-
Engagement bait detection: LinkedIn's quality signals must distinguish genuine professional content from engagement bait ("Like if you agree! Comment your thoughts!"). Engagement bait gets artificially high click/comment predictions because the text literally asks for engagement, but users report these posts as low quality. LinkedIn trains a separate classifier to detect engagement bait patterns and applies a negative scoring modifier. The challenge is that the line between "engagement bait" and "genuinely thought-provoking question" is fuzzy, so the classifier must be conservative to avoid penalizing legitimate content.
-
Model training feedback loops: The ranking model is trained on engagement data (clicks, likes, comments). But the engagement data is itself shaped by the ranking model (users can only engage with posts the model shows them). This creates a feedback loop: the model learns to predict engagement with posts it already promoted, not with posts users never saw. LinkedIn mitigates this by reserving a small percentage of feed slots (roughly 2-5%) for "exploration traffic": randomly sampled posts that bypass the ranking model. This exploration traffic provides unbiased training data. Without it, the model would slowly narrow its predictions to a smaller and smaller subset of content types, creating a "filter bubble" effect over time.
What Most People Get Wrong
This is the section I find most useful for interview prep. Knowing the common mistakes lets you avoid them and also lets you proactively address them in your answer ("one thing people get wrong here is...").
| Mistake | What they say | Why it is wrong | What to say instead |
|---|---|---|---|
| Single-pass ranking | "An ML model scores all the posts" | You cannot score millions of posts with a deep neural network in 200ms. The two-pass architecture is essential. | "A lightweight first pass retrieves 500 candidates, then a heavy neural network ranks 150 survivors." |
| Ignoring diversity | "The highest-scoring posts go to the top" | Pure engagement ranking creates echo chambers and creator domination. LinkedIn explicitly re-ranks for diversity. | "After scoring, a diversity pass enforces creator dedup, type mixing, and topic balance." |
| Same as TikTok | "It works like TikTok's For You Page" | LinkedIn is social-graph-first, TikTok is interest-graph-first. The retrieval stage is fundamentally different. | "LinkedIn retrieves primarily from your network connections, then supplements with viral out-of-network content. TikTok does the opposite." |
| Ignoring feature freshness | "Features come from a feature store" | This is vague. Strong candidates distinguish batch features (4-6 hour staleness) from real-time features (session-level freshness). | "Expensive features like creator affinity are batch-computed every 4-6 hours. Session signals like recent clicks are real-time from Redis." |
| Forgetting ads | "The feed is purely organic" | Ads are spliced into the organic rankings at fixed positions. This affects how many organic posts a user actually sees. | "Ads are injected at fixed positions (roughly every 5th slot) after organic ranking completes." |
| Pre-computed feeds | "The feed is generated in advance and cached" | LinkedIn's feed is computed on demand per user per request, incorporating real-time signals. It is not a static list. | "The feed is generated on demand for each request, mixing batch features with real-time session signals." |
| Ignoring cold start | "The model personalizes from day one" | New users have no engagement history. The system falls back to popularity + profile signals. Personalization takes 1-2 weeks. | "Cold start users see trending content filtered by their job title and industry. Personalization improves over 1-2 weeks as engagement accumulates." |
| Feedback loop blindness | "Just train on click data" | The model only sees engagement on posts it already showed. This creates filter bubbles. Need exploration traffic for unbiased training signal. | "Reserve 2-5% of feed slots for exploration traffic to collect unbiased engagement data and prevent feedback loop narrowing." |
How I Would Communicate This in an Interview
Here is how I would actually say this in about 90 seconds:
"LinkedIn'
The follow-up questions you are most likely to get after this answer:
- "How do you handle cold start?" (answer: popularity + profile signals)
- "What features does the model use?" (answer: batch features for long-term signals, real-time for session context)
- "How does this compare to TikTok?" (answer: social graph vs interest graph)
- "Where are the bottlenecks?" (answer: Heavy Ranker at 80ms is the most expensive step)
Prepare a 30-second follow-up for each. Do not try to cram everything into the initial 90-second answer. Leave hooks that invite follow-ups. A good interview is a conversation, not a monologue.s feed uses a three-stage pipeline: retrieval, ranking, and diversity re-ranking.
In the retrieval stage, three parallel retrievers pull about 500 candidate posts. The Network Retriever gets recent posts from your 1st and 2nd degree connections. The Topic Retriever finds posts matching your followed hashtags and inferred interests. And the Viral Retriever surfaces high-engagement posts from outside your network.
Those 500 candidates go through a two-pass ranking system. A lightweight logistic regression model with about 50 features scores all 500 in under 5 milliseconds and keeps the top 150. Then a deep neural network with 500+ features scores those 150 in about 80 milliseconds. The heavy model predicts multiple engagement types: probability of like, comment, share, and hide. Comments get the highest weight because LinkedIn optimizes for professional conversation, not passive scrolling.
The final stage is diversity re-ranking. Raw engagement scores would create a terrible feed, so the Diversity Engine enforces rules: no more than 2 posts from the same creator in a window of 10, content type mixing so you do not see 10 text posts in a row, and anti-echo-chamber dampening on polarizing content.
The key difference from TikTok is that LinkedIn starts from your social graph, your connections, and supplements with viral content. TikTok starts from interest signals and does not care about social connections. This makes LinkedIn's retrieval more constrained but more professionally relevant."
Notice how I structured that in three clear parts: retrieval, ranking, diversity. Interviewers love this because it shows structured thinking. After delivering this, I would pause and ask: "Should I go deeper on any of those three stages?"
Interview Cheat Sheet
- "How does LinkedIn rank the feed?" -> Three-stage pipeline: parallel retrieval (500 candidates), two-pass ranking (light logistic regression then heavy DNN), diversity re-ranking (creator dedup, type mixing, echo dampening)
- "Why two ranking passes?" -> Cannot afford to run a deep neural network on millions of posts. Light pass (50 features, 5ms) filters to 150 candidates. Heavy pass (500+ features, 80ms) does precision scoring on survivors.
- "What features matter most?" -> Creator affinity (how much you engage with this person), content recency, post quality score, session context (what you just clicked), and live engagement counters
- "How is it different from TikTok?" -> LinkedIn is social-graph-first (prioritize your connections). TikTok is interest-graph-first (prioritize topic match regardless of who posted). LinkedIn must show your network's content even if strangers' posts would get more engagement.
- "How do ads get in?" -> Separate ad auction runs in parallel. Ad Injector splices winning ads at fixed positions (roughly every 5th slot) after organic ranking completes.
- "What about new users?" -> Cold start uses popularity + profile signals (job title, industry, region). Personalization improves over 1-2 weeks as the user connects and engages.
- "How do you prevent echo chambers?" -> Diversity Engine enforces topic balance (no single topic > 30% of first 20 posts) and dampens polarizing high-engagement posts with a negative scoring modifier.
- "What happens when a new content type launches?" -> Exploration bonus gives the new type a temporary scoring boost to collect engagement data. Removed after 2-4 weeks once the model has enough training signal.
- "What is the latency budget?" -> 200ms end-to-end. Retrieval: ~30ms (parallel). Light ranking: ~5ms. Heavy ranking: ~80ms. Diversity + ad injection: ~20ms. Network overhead: ~65ms.
- "Why optimize for comments over likes?" -> LinkedIn's product thesis is "professional conversations." Comments signal deeper engagement and create network effects (your comment shows in your connections' feeds). Likes are cheap and do not generate secondary distribution.
Test Your Understanding
Quick Recap
-
LinkedIn's feed uses a three-stage pipeline: parallel candidate retrieval (500 posts from network, topic, and viral retrievers), two-pass ranking (light logistic regression then deep neural network), and diversity re-ranking. The entire pipeline completes in under 200ms.
-
The Light Ranker uses 50 features and logistic regression to score 500 candidates in under 5ms, cutting to 150 survivors. Its job is recall, not precision.
-
The Heavy Ranker uses 500+ features and a deep neural network to score 150 candidates in about 80ms, predicting probability of like, comment, share, click, and hide simultaneously using a multi-task output head with shared lower layers.
-
Comments get the highest positive weight (0.3) in the scoring formula because LinkedIn optimizes for professional conversation, not passive engagement. This reflects the business model (recruiter subscriptions and B2B ads).
-
The Diversity Engine enforces creator deduplication (max 2 per creator in 10 slots), content type mixing (no 3+ same type in a row), topic balance (no topic over 30% of first 20), and anti-echo-chamber dampening. This pass can reshuffle 30-40% of positions.
-
Features split into batch (4-6 hour refresh via Spark, stored in Venice/Feathr) and real-time (per-request session signals from Redis with sub-5ms latency). Batch provides 80% of signal, real-time provides the 20% that makes the feed feel responsive.
-
Cold start users see popularity-based content filtered by job title, industry, and region. Personalization improves over 1-2 weeks as engagement signals accumulate.
-
LinkedIn differs from TikTok fundamentally: social-graph-first retrieval (your connections) vs interest-graph-first retrieval (any creator matching your interests). This shapes every downstream decision.
-
The feed is paginated in batches of 10-15 from a pool of 50 scored posts. Each new pipeline run incorporates updated real-time features.
-
Exploration traffic (2-5% of feed slots) bypasses the ranking model, serving randomly sampled posts to collect unbiased training data and prevent feedback loop narrowing.
Related Concepts
-
Recommendation systems and collaborative filtering: Understanding collaborative filtering (users who liked X also liked Y), content-based filtering (topic matching), and hybrid approaches gives vocabulary to discuss any feed system. LinkedIn uses a hybrid: content features plus social graph features.
-
Feature stores and the Lambda architecture: LinkedIn's Feathr (open-sourced 2022) implements the batch + real-time hybrid pattern. The Lambda architecture (batch layer + speed layer) explains why features are split into two categories with different freshness guarantees.
-
Two-tower retrieval models: User embeddings and item embeddings computed separately, matched via approximate nearest neighbor search. This is how LinkedIn's Topic Retriever works: user embedding to ANN lookup to top-K matching post embeddings.
-
Multi-armed bandits and exploration-exploitation: The framework behind LinkedIn's exploration bonus for new content types. Thompson sampling and epsilon-greedy are common strategies in production feed systems.
-
Ad auction systems: LinkedIn's ad ranking pipeline uses quality scoring (predicted CTR times bid) and budget pacing (spreading spend evenly across the day). Ads and organic content compete for the same screen real estate.