Technology

How to Engineer a Viral Social Discovery Feature: A Step-by-Step Blueprint

2026-05-19 15:27:04

Introduction

Imagine a feature so simple you'd explain it in one sentence: “Friend Bubbles shows you which Reels your friends recently watched and liked.” Yet behind that simplicity lies a cascade of engineering challenges—scaling machine learning models to billions of users, reconciling behavioral differences between iOS and Android, and uncovering a hidden insight that made everything click. This is the story of how Meta's Reels team turned a neat idea into a global social discovery engine. In this step-by-step guide, we distill their journey into actionable steps for any team aiming to build a socially intelligent feature that scales.

How to Engineer a Viral Social Discovery Feature: A Step-by-Step Blueprint
Source: engineering.fb.com

What You Need

Step-by-Step Blueprint

Step 1: Define the Simple, Social-Led Experience

Start with a crystal-clear user value: “Show me Reels my friends have watched and reacted to.” Resist the urge to overcomplicate. Friend Bubbles is essentially a social filter on top of an already robust Reels recommendation engine. Your goal is social discovery—surfacing content through friends' actions, not just algorithms. Write a one‑paragraph product spec and stick to it. This constraint forces deep engineering work later.

Step 2: Build the ML Model for Friend Signal Extraction

Now the hard part. You need a machine learning model that identifies which Reels a user’s friends have engaged with—and decides which of those to surface. The Meta team evolved their model through multiple iterations. Start with a simple collaborative filtering approach: for each user, retrieve the most recent “likes” and “watches” from their friend graph. Then rank those Reels by global popularity as a fallback. But this naive approach drowns in noise. You’ll need to train a model that balances:

Use a two-tower neural network: one tower encodes the user and their friend graph, the other encodes Reels features (creator, audio, visual themes). Train offline on historical engagement, then A/B test online.

Step 3: Address Platform Disparities (iOS vs Android)

You might expect the feature to behave identically on both mobile operating systems. Surprise—it doesn’t. The Meta team discovered that iOS users generate richer engagement signals (more time‑spent, more comments) while Android users produce more taps and scrolls. This imbalance can skew the model if not accounted for. Solution:

Pro tip: Run shadow A/B tests on both platforms simultaneously to catch unexpected behaviors early.

Step 4: Uncover the “Aha!” Moment Through Data Exploration

The Meta engineers hit a wall. Early versions of Friend Bubbles showed lots of Reels, but engagement was flat. Then they made a surprising discovery: users didn’t want every friend’s activity—they wanted close friends only. The LLM wasn’t sophisticated enough to infer friendship strength from raw graph data. So they added a lightweight “intimacy” signal: frequency of direct messages and mutual comments. This small tweak dramatically improved relevance. To replicate this:

How to Engineer a Viral Social Discovery Feature: A Step-by-Step Blueprint
Source: engineering.fb.com

Step 5: Scale the Feature to Billions of Users

Once the model works for millions, scale out. This isn’t just about adding more servers. You need to handle:

Meta’s Reels team also optimized their inference pipeline by quantizing the model (reducing precision from float32 to int8) to cut latency by 40% without sacrificing accuracy.

Step 6: Launch, Listen, and Iterate

Friend Bubbles didn’t ship perfectly on day one. The team continuously monitored metrics like time spent per session, social sharing rate, and friend bubble tap‑through rate. They also set up a feedback loop on Instagram, Threads, and X to gather qualitative input. Changes were deployed in weekly app updates. Some key learnings:

Tips for Your Journey

Building a social discovery feature that touches billions is never simple. But by breaking the process into these steps—starting with a minimal product, iterating on the ML model, respecting platform quirks, and scaling with care—you can replicate the success of Friend Bubbles. Now go turn that simple idea into reality.

Explore

Go 1.26 Introduces Rewritten `go fix` for Automatic Code Modernization cPanel Security Alert: Critical Authentication Flaw Requires Immediate Patching Bitcoin Falls as S&P 500 Hits All-Time High Amid Iran Detente Hopes Unlocking the Power of IBM Vault 2.0: Enhanced UI and Smarter Visibility Modernizing Go Code with Source-Level Inlining in Go 1.26