Scaling Social Discovery: A Step-by-Step Guide to Building Friend Bubbles for Billions of Users

Introduction

At first glance, Friend Bubbles—a feature that highlights Reels your friends have watched and reacted to—seems deceptively simple. Yet beneath that friendly circle lies a massive engineering undertaking, as the Facebook Reels team discovered while designing a social discovery feature that operates at the scale of billions. This guide walks you through the essential steps—from defining the core challenge to deploying a cross-platform system—based on the real-world experience shared by engineers Subasree and Joseph on the Meta Tech Podcast. Whether you're building your own social recommendation system or simply curious about what it takes to make a “simple” feature work for everyone, these steps will help you think like the engineers who brought Friend Bubbles to life.

Scaling Social Discovery: A Step-by-Step Guide to Building Friend Bubbles for Billions of Users
Source: engineering.fb.com

What You Need

Before diving in, ensure you have these foundational components in place:

Step‑by‑Step Guide

Step 1: Define the Core Challenge

Begin by clearly articulating what looks simple but is actually complex. For Friend Bubbles, the core challenge is delivering a personalized stream of Reels that your friends have watched and reacted to—while keeping latency low, freshness high, and privacy intact. Write down every assumption you have about how friends’ behaviors translate into recommendations. For example:

This step is critical because it forces you to separate the user‑facing simplicity from the engineering complexity underneath.

Step 2: Evolve the Machine Learning Model

The initial ML model might rely on simple heuristics (e.g., “most watched by friends”). As you test, you’ll need to iterate. The team behind Friend Bubbles discovered that a one‑size‑fits‑all approach failed—some users only care about close friends, others want broader social signals. Evolve your model in stages:

  1. Baseline model – aggregate friend reactions without personalization.
  2. Personalized ranking – weight friends by relationship strength and similarity in taste.
  3. Context‑aware signals – incorporate time of day, user’s current mood (inferred from scrolling patterns), and friend engagement recency.
  4. Privacy‑aware filtering – ensure that friends’ reactions are only used when the user has opted‑in or the feature respects existing sharing settings.

Each iteration should be measured against both engagement metrics and user satisfaction surveys.

Step 3: Address Platform‑Specific Behaviors

Friend Bubbles behaved differently on iOS and Android during early testing. On iOS, users were more likely to tap and explore; on Android, they preferred swipe‑based interactions. You must adapt your feature to each platform’s inherent interaction patterns. For example:

This step often requires separate development branches, but the payoff is a native feel that improves adoption.

Scaling Social Discovery: A Step-by-Step Guide to Building Friend Bubbles for Billions of Users
Source: engineering.fb.com

Step 4: Discover the “Click” Moment

The most surprising finding was that making the feature “click” required changing how the bubble was triggered. Initially, the bubble appeared every time a friend watched a reel—users found it distracting. The team discovered that delaying the appearance until after the user has scrolled a few reels created a sense of discovery rather than interruption. They also added a subtle animation (a gentle pulse) when a close friend reacted, which increased tap‑through rates by 15%. Systematically test different trigger conditions:

Keep iterating until you find the combination that feels natural to users.

Step 5: Scale to Billions

When a feature reaches billions of users, every millisecond matters. The Friend Bubbles backend was redesigned to handle massive parallelism:

  1. Precompute friend graphs – maintain a real‑time index of who is watching what.
  2. Use edge caching – store popular bubble content on regional servers to reduce latency.
  3. Batch updates – instead of pushing every friend reaction immediately, batch them every 500ms to reduce load.
  4. Graceful degradation – if the backend is overwhelmed, fall back to a static list of top friends without reactions.

Load test early using simulated traffic patterns from peak usage events (e.g., holidays) and ensure your system can scale horizontally.

Tips for Success

Building social discovery at scale is as much about psychology as it is about engineering. Keep these lessons in mind:

For deeper insights, listen to the full Meta Tech Podcast episode with Subasree and Joseph, or explore related posts on Meta Engineering. If you’re inspired to build the next billion‑user feature, check out careers at Meta.

Recommended

Discover More

Celebrating a Century of Nature: How to Honor Sir David Attenborough on His 100th Birthday7 Key Insights Into DoorDash's Migration From XCTest to Swift Testing With CopilotBreaking: Vue Component Testing Without Node.js – In-Browser Method UnveiledHow to Build a National Higher Education Partnership with a Global Online Learning Platform: A Guide for MinistriesNavigating the 2026 Ransomware Landscape: A Comprehensive Guide