BlogsMetaNews Feed and Timeline Evolution

News Feed and Timeline Evolution

News Feed and Timeline Evolution

46
posts
2009–2026

Meta's News Feed and timeline evolution has incorporated multithreaded rendering on Android using Litho and Infer. This enables smoother scrolling and richer content experiences by moving heavy UI computation to background threads, with Infer's thread-safety analyzer ensuring reliability and preventing bugs. This advancement addresses historical challenges in achieving asynchronous, multithreaded UI rendering on Android at scale. The architecture has been further optimized to enable client-side rendering and efficient background data prefetching. This also includes advancements in scaling recommendations, high-performance app development through instrumentation and re-architecture, and battery instrumentation for reducing consumption. Furthermore, the evolution extends to mobile backend development and real-time analytics for billions of devices.

2026

Reel Friends: Building Social Discovery that Scales to Billions

5/13/2026

This post details the engineering behind the 'Friend Bubbles' feature for Reels, which highlights Reels watched and reacted to by friends. It discusses the evolution of the underlying machine learning model, platform-specific behaviors (iOS vs. Android), and a key discovery that enabled the feature's success. The post emphasizes the technical depth required for seemingly simple features and their scaling to billions of users.

Friend Bubbles: Enhancing Social Discovery on Facebook Reels

3/18/2026

Introduced 'Friend Bubbles' to Facebook Reels, a system that highlights content friends have liked or reacted to. This involved developing user-user closeness models (survey-based and on-platform interaction-based) to identify relevant friends, and enhancing video ranking models with friend-bubble interaction signals and new tasks to incorporate relationship strength and learn downstream engagement. The system also optimized client-side performance by integrating friend-bubble metadata retrieval into the existing video prefetch work and conditionally disabling animations to maintain smooth scrolling and low latency.

2025

A New Ranking Framework for Better Notification Quality on Instagram

9/2/2025

Introduced a diversity-aware notification ranking framework for Instagram that sits on top of existing ML engagement models. This framework applies multiplicative penalties to candidate notification scores based on similarity to recently sent notifications across dimensions like content, author, and product type. The mathematical formulation uses a demotion factor D(c) = product(1 - w_i * p_i(c)), where p_i(c) is a similarity signal and w_i is a demotion strength weight. Future plans include dynamic demotion strategies and LLM integration for semantic similarity.

2024

Inside Facebook’s video delivery system

12/10/2024

This post details Meta's extensive two-year effort to unify its video delivery systems, consolidating distinct products like Watch and Reels into a single, streamlined experience. It outlines the technical challenges and solutions involved in unifying the ranking, server, and mobile layers, including data models, architectures, and UI elements. The post highlights the benefits of this unification, such as improved developer velocity, consistent user experiences, and better content discovery, and explains the lifecycle of a video feed network request within this new unified system.

2022

Improving Instagram notification management with machine learning and causal inference

10/31/2022

This post details the application of machine learning and causal inference to optimize Instagram's daily digest push notifications. It moves beyond traditional click-through rate models to identify users who are likely to see content organically, thereby reducing notification volume without impacting user engagement. The post explains the use of uplift modeling and a randomized experiment to estimate incremental value, and an online approach with score transformation to stabilize sending rates, leading to improved user experience and reduced resource usage.

2021

A linear programming approach for optimizing features in ML models

7/29/2021

This post introduces a linear programming approach to optimize feature selection for ML models, particularly for ranking algorithms like those used in News Feed and ad delivery. It addresses the challenge of balancing model performance gains from new features against finite infrastructure capacity (memory, CPU, storage). The post details how framing this as a linear programming problem allows for maximizing model performance, probing sensitivity to infrastructure constraints, and quantifying trade-offs, thereby automating and scaling the feature approval process.

How machine learning powers Facebook’s News Feed ranking algorithm

1/26/2021

This post details the machine learning-powered ranking algorithm for Facebook's News Feed. It explains how ML is used to predict user engagement (e.g., likes, shares, comments) for individual content items by analyzing various features of the post and the user. The system uses multitask neural networks and embeddings to score candidate posts and combines multiple predictions into a single ranking score (V_ijt). It also describes the multi-pass scoring system, including a lightweight pass for initial filtering, a main scoring pass for individual post evaluation, and a contextual pass for diversity rules. The post highlights the importance of aligning ranking objectives with user-perceived meaningfulness through surveys and research into personalization based on observational data.

2020

On the value of diversified recommendations

12/17/2020

This post introduces the concept of diversified recommendations as a crucial evolution beyond simple predictive accuracy in recommendation systems. It uses toy models (Polya and balancing processes) to illustrate the trade-offs between positive reinforcement (leading to boredom) and negative reinforcement (leading to lack of engagement). The post then outlines practical methods for achieving recommendation diversity, including author, media type, and semantic diversity, exploring similar semantic nodes, maintaining long and short-term preferences, utilizing explore-exploit algorithms (epsilon-greedy, UCB), qualitative trade-off computation, and negative guardrails. It emphasizes optimizing for long-term user satisfaction over purely metric-driven approaches.

How Instagram suggests new content

12/10/2020

This post introduces 'Suggested Posts' for Instagram, a new feature that aims to provide personalized content recommendations from accounts the user doesn't currently follow, while maintaining a 'Feels Like Home' experience. It details the system's two-stage design (candidate generation and selection), the use of embeddings and co-occurrence for candidate generation, methods for addressing the cold-start problem, and the ranking model based on engagement and aversion factors. The 'Feels Like Home' principle is further elaborated through prioritization of Home Feed-like sources, similar freshness heuristics, and media type mixture.

2018

Improving Android video on News Feed with Litho

1/31/2018

This post details the migration of the Android News Feed video rendering to Litho, a UI framework. It addresses challenges in efficiently rendering video within a scrollable feed, including CPU, memory, and network resource demands, and the impact of device fragmentation. The solution involved creating a new Litho video component architecture with `CoreVideoComponent`, `AutoplayVideoComponent`, and `VideoAttachmentComponent` to improve maintainability and flexibility. Performance improvements were achieved through Litho's advanced recycling system and pre-allocation feature, reducing object allocations and mitigating frame drops. The post also highlights Litho's lifecycle callbacks (`onPrepare`, `onMount`, `onUnmount`) for encapsulating video playback logic and `onCreateLayout` for layout construction and resource preparation.

2017

Mobile @Scale 2017 recap

10/18/2017

This post details the migration of the Facebook Android News Feed codebase to background rendering using Litho and Infer, addressing concurrency and other bugs. It also highlights the technical challenges and approaches to scaling the Recommendations product, insights into high-performance app development through instrumentation and re-architecture, and processes for reducing battery consumption by Facebook applications. Additionally, it touches upon the evolution of WhatsApp within Facebook's data centers, real-time analytics for billions of devices, and mobile backend development.

Multithreaded rendering on Android with Litho and Infer

9/26/2017

This post details the migration of News Feed's Android rendering to Litho, enabling multithreaded rendering for smoother scrolling and richer content. It highlights the critical role of Infer's new thread-safety analyzer in identifying and fixing concurrency issues, making this complex architecture viable for production. The post explains the technical challenges of background layout, the limitations of the traditional Android UI toolkit, and how Litho's asynchronous model combined with Infer's analysis provides a robust solution.

2016

Made in NY: The engineering behind social recommendations

12/8/2016

This post introduces the 'Recommendations' feature, which automatically identifies and structures place recommendations from free-text comments on Facebook posts. It details the engineering challenges and solutions for extracting place entities from natural language, resolving ambiguity, and dynamically updating feed stories on both Android and iOS. The post highlights the integration with local search, places data graphs, and the Applied Machine Learning team's conversational understanding capabilities, as well as the use of ComponentKit and state management for dynamic UI updates.

Components for Android: A declarative framework for efficient UIs

10/26/2016

Introduced Components for Android (C4A), a declarative UI framework inspired by React and ComponentKit, to address performance challenges in complex Android scrollable UIs like News Feed. C4A decouples layout and rendering, enabling asynchronous layout, flatter view hierarchies, incremental mount, and fine-grained recycling. It uses css-layout for layout calculations and mounts drawables or views based on component needs, resulting in flatter view hierarchies and improved performance, especially on lower-end devices.

Client-side ranking to more efficiently show people stories in feed

10/20/2016

Introduced a new client-side ranking architecture for News Feed to improve story relevance and rendering efficiency, particularly for users with slower internet connections. This shifts ranking logic from the server to the client, allowing for dynamic re-ranking based on media loading status and network conditions. The system now prioritizes stories with fully loaded media and optimizes content for each session, reducing spinners and gray boxes.

Developing the technical language behind creativity for Canvas

6/17/2016

This post introduces Canvas, a new full-screen mobile content creation tool that builds upon existing infrastructure for video autoplay and rendering engines (leveraging AsyncDisplayKit). It highlights how Canvas evolved from observations of user behavior with existing products like carousels and Lead Ads, enabling creators to build interactive stories with a defined set of components and a declarative language. The post details the technical challenges of mobile-first design, loading speed, and real-time creative previews, and explains how Canvas aims to solve limitations in mobile content creation for advertisers.

Safety Check: Streamlining deployment around the world

6/2/2016

This post details the development and technical implementation of Safety Check, a feature that leverages News Feed hooks and the social graph to proactively notify users in affected areas during crises. It highlights the challenges of a 'push' model compared to Facebook's typical 'pull' model, the algorithmic approach using social graph traversal for rapid identification of affected individuals, and the engineering solutions for rate limiting and ensuring system stability during high-volume, infrequent activations. It also introduces automated deployment tools and a Messenger bot for monitoring, showcasing the evolution of internal processes for crisis response features.

Engineering for nostalgia: Building a personalized “On This Day” experience

3/30/2016

This post details the engineering efforts behind the 'On This Day' feature, a personalized memory surfacing experience. It highlights the integration of user experience research, automatic filtering (e.g., for exes, blocked people, dismissed memories), user-controlled preferences (blocklisting people or dates), and a machine-learning ranking model. The ranking model utilizes personalization signals (user interactions, demographics) and content understanding powered by a computer vision platform to identify and surface meaningful memories in the News Feed.

2015

Continuing to build News Feed for all types of connections

12/10/2015

This post details improvements to News Feed for users on slow or intermittent internet connections. It introduces a mechanism to rank and display previously downloaded, unviewed stories based on relevance and image availability when a user's connection is poor, thus avoiding long loading times. Additionally, it enables users to compose comments on posts while offline, with the comments being posted upon regaining a connection. These changes focus on efficient content delivery and offline user interaction without altering the core News Feed ranking algorithm.

Under the hood: Broadcasting live video to millions

12/3/2015

This post details the engineering challenges and solutions for broadcasting live video to millions of users. It introduces the 'thundering herd' problem and its mitigation through edge caching and request coalescing. It also explains the adoption of RTMP to reduce latency for a more interactive live streaming experience, building upon previous work with Live for Facebook Mentions.

Under the hood: Building 360 video

10/15/2015

This post details the technical challenges and solutions involved in integrating 360 video into the News Feed. It highlights the transformation from equirectangular to cube map projections to address geometry distortion and pixel redundancy, and discusses the backend engineering required to handle large file sizes, optimize encoding through distributed processing, and develop custom video filters for efficient processing at scale. This represents a significant expansion of the News Feed's capabilities to support immersive video content.

Under the hood: Place Tips at Lollapalooza

8/18/2015

This post details the engineering behind 'Place Tips', a feature that connects the Facebook experience with the physical world by surfacing social content and business information related to visited locations. It highlights the development of a flexible, server-controlled rendering framework that uses 'styles' (contracts between client and server) and pre-existing client templates to display varied data aggregations (like friends' photos or event details) consistently across mobile applications. The post also showcases the application of this framework for a specific event, Lollapalooza, demonstrating rapid development enabled by the platform and the use of Bluetooth beacons for location-specific content delivery.

Delivering high scroll performance

6/25/2015

Introduced an on-device strategy for measuring and identifying scroll performance regressions on iOS. This involves using CADisplayLink to measure frame rates and SIGPROF signals to capture call stacks of the main thread when frame drops occur. A high-priority signaling thread is used to ensure timely capture of backtraces during periods of high main thread utilization. The captured backtraces are then symbolicated and aggregated to pinpoint performance bottlenecks.

Building “add a link”

6/25/2015

This post details the rapid development and launch of a new feature on iPhone allowing users to easily find and share links within Facebook posts. The feature leverages an existing index of shared links, requiring new ranking logic to balance social and global signals. Technical optimizations included client-side caching, disabling non-essential ranking features, and optimizing result page size for speed. The development process involved a hackathon, cross-team collaboration, and iterative improvements based on pilot data and A/B testing.

Recommending items to more than a billion people

6/2/2015

This post details the challenges and solutions for scaling collaborative filtering (CF) for recommendation systems at Facebook's massive scale. It introduces the problem of handling billions of ratings and users, discusses the limitations of standard matrix factorization approaches (SGD and ALS) due to network traffic and data skew, and presents a novel 'rotational hybrid approach' leveraging Apache Giraph and worker-to-worker messaging to significantly reduce network traffic and improve processing efficiency for recommending items like pages, groups, and events.

Introducing ComponentKit: Functional and declarative UI on iOS

3/25/2015

Introduced ComponentKit, a native Objective-C++ library for iOS inspired by React's functional reactive programming model. ComponentKit enables a functional and declarative approach to building UI, using immutable models and components to describe UI structure. It abstracts UI rendering, performing layout on a background thread, creating minimal view hierarchies, and implementing intelligent view reuse for improved scroll performance. Migrating News Feed to ComponentKit resulted in a 70% reduction in rendering code, significantly improved scroll performance due to a flattened view hierarchy, and enhanced test coverage through modular UI components and snapshot tests.

Serving Facebook Multifeed: Efficiency, performance gains through redesign

3/10/2015

This post details the disaggregation of the Multifeed system, a backend component of Facebook's News Feed. The original aggregated design co-located CPU-intensive aggregators with memory-intensive leaf servers, leading to reliability issues, hardware scalability challenges, resource waste, and performance contention. The disaggregated design separates these components into specialized server pools (CPU-focused for aggregators, memory-focused for leaves). This resulted in a 40% efficiency improvement, 10% aggregator latency reduction, independent scaling of components, and increased resilience to traffic spikes and component failures. The post also introduces the concept of disaggregated flash sleds for other services.

Fast Rendering News Feed on Android

1/28/2015

This post details a significant architectural rewrite of the Android News Feed rendering system. Key contributions include: splitting complex stories into multiple ListView items to improve view recycling and amortize binding time; decoupling view logic from binding logic by introducing `prepare`, `bind`, and `unbind` methods within Binder classes; and using `PartDefinition` to manage complex story structures and generate the appropriate list of binders. This resulted in reduced errors, improved rendering performance, and enhanced code quality and testability.

2014

Making News Feed nearly 50% faster on iOS

10/31/2014

Replaced Core Data with a new model layer on iOS for News Feed, utilizing immutable, denormalized Plain Old NSObject (PONSO) objects with asynchronous, opt-in consistency. This change addressed performance degradation caused by Core Data's normalized storage and numerous indexes, resulting in nearly 50% faster News Feed loading. The migration involved code generation of model-agnostic protocols to allow gradual adoption and A/B testing.

Introducing AsyncDisplayKit: For smooth and responsive apps on iOS

10/15/2014

Introduced AsyncDisplayKit, a framework for iOS that enables asynchronous creation and rendering of complex view hierarchies on background threads. This addresses main-thread bottlenecks in UIKit by providing a thread-safe 'node' abstraction over UIView, allowing for smoother scrolling and more responsive UIs, particularly for image and text rendering.

Looking back on “Look Back” videos

3/13/2014

This post details the engineering challenges and solutions behind the 'Look Back' video feature, a large-scale, time-bound initiative to deliver personalized video content to users for Facebook's 10th anniversary. It highlights the rapid infrastructure scaling required for storage (25 petabytes estimated, 11 petabytes used), compute, and network bandwidth (187 Gbps planned, 450 Gbps peak achieved), as well as the agile development process to deliver the feature in under a month. It also underscores the importance of cross-team collaboration and empowered engineers in achieving ambitious goals.

2013

Under the Hood: Building posts search

10/24/2013

This post details the engineering challenges and solutions for building the posts search feature within Graph Search. It highlights the difficulties in collecting and indexing data from diverse post types stored in MySQL, the use of HBase and Hadoop for index building, and the implementation of Wormhole for real-time index updates. It also discusses the innovative approach to serving the massive posts index by using a combination of solid-state flash memory and RAM, and the sophisticated ranking techniques employed to deliver relevant results from a trillion-post index. The post also notes the project's origin as a Hackathon initiative.

TAO: The power of the graph

6/25/2013

This post introduces TAO (The Associations and Objects), a new distributed data storage system designed specifically to handle the demanding workload of serving the social graph. It addresses the limitations of using Memcache and MySQL for complex graph data by providing a dedicated graph data model (objects and associations) and API. TAO optimizes for creation-time locality, handles high read volumes, and simplifies data access for product engineers, directly supporting the on-the-fly rendering of personalized user views like News Feed stories.

Under the Hood: The natural language interface of Graph Search

4/29/2013

This post details the technical underpinnings of Graph Search's natural language interface. It explains how Graph Search moves beyond keyword limitations by utilizing a structured graph of nodes and edges, and how it employs entity recognition, lexical analysis, and semantic parsing with a weighted context-free grammar to interpret complex user queries. The post highlights the iterative process of developing this interface, emphasizing the shift towards natural language for more precise and efficient data querying.

Under the Hood: Indexing and ranking in Graph Search

3/14/2013

This post details the technical implementation of search ranking within Meta's Unicorn search engine, specifically for Graph Search. It explains how Unicorn was extended to handle search ranking by separating entity types into distinct verticals, enhancing retrieval operations, implementing query rewriting and scoring mechanisms (including forward index and result set scoring), blending results from different verticals, and supporting nested queries. The post also outlines the A/B testing framework used to measure ranking changes and describes the life cycle of a Graph Search query through both the query suggestion and search phases, highlighting the role of NLP and the Top Aggregator in processing natural language queries and constructing complex search plans.

Under the Hood: Building out the infrastructure for Graph Search

3/6/2013

This post details the infrastructure built for Graph Search, introducing the Unicorn system as a unified, scalable inverted-index search engine. It explains how Unicorn consolidates previous search systems (PPS, Typeahead) and enables natural language queries over the Facebook graph's entities and relationships. The post elaborates on Unicorn's architecture, indexing mechanisms, multi-hop query capabilities, and the real-time update pipeline, highlighting its role in enabling richer, more connected search experiences.

2012

Under the Hood: Rebuilding Facebook for Android

12/13/2012

This post details the complete native rewrite of the Facebook for Android app, moving from a hybrid native/webview approach to pure native code. Key technical contributions include: 1. Reducing Garbage Collection by minimizing, deferring, or moving allocations in performance-critical code off the UI thread. 2. Writing a custom, lightweight event bus that avoids reflection and object iterators to reduce operations and memory allocations. 3. Moving bitmaps to the native heap using `inPurgeable` to reduce GC events and out-of-memory errors. 4. Developing a custom ListView recycler to improve scrolling performance for lists with varying row heights by detaching heavy content views and recycling substories.

Interning at Facebook: Building the new mobile advertising interface

10/11/2012

This post details the development of the first mobile advertising interface for Facebook, specifically for 'Promoted Posts' within the Pages Manager for iOS application. It highlights the strategic importance of mobile advertising, the integration of desktop features like Promoted Posts into mobile, and the technical implementation challenges faced by an intern, including client-side UI development, API scaling, and internationalization. The post also showcases the collaborative effort across teams and the impact of the new interface on Page admin experience.

Under the Hood: Building the App Center recommendation engine

10/3/2012

This post details the development of a dedicated recommendation engine for the App Center, a key discovery channel for apps. It introduces the aggregator-leaf architecture, quality determination based on user ratings and active users, and algorithmic elements including candidate selection (demographic, social, past interactions), scoring with explicit, dynamic, and learned latent features, and real-time updates to incorporate user feedback and new data.

Under the Hood: Timeline apps behind Facebook engineering

7/6/2012

This post details the integration of Open Graph actions into several internal Facebook tools (Phabricator, Pixelcloud, Scuba, SIOG, StayFitFB, Pokemon) to make them more social and to track user activity. It highlights how Open Graph actions can be used to represent events like code commits, file uploads, data analysis queries, machine learning rule updates, workout tracking, and task completion. The post also discusses the technical aspects of modeling objects and actions for Open Graph, the challenges encountered, and the benefits of using Open Graph for internal dogfooding and developer feedback.

Under the Hood: Building the Location API

3/9/2012

This post details the development of Facebook's Location API, focusing on making location tagging universal across all content types (photos, statuses, app updates). It describes the evolution from the initial Places feature to a global places directory with improved search capabilities, the integration of location data into the Timeline map, the algorithms used for aggregating map pins, and the launch of location APIs for third-party applications to leverage this data. This post significantly expands the 'News Feed and Timeline Evolution' thread by detailing a major new dimension of content aggregation and user experience: location-based context.

From News Feed to Timeline: Q&A with Raylene Yung

2/24/2012

This post details the evolution of News Feed story aggregation, moving from individual shares to grouped narratives (e.g., 'X friends shared a link'). It also highlights the technological overlap between News Feed and Timeline, specifically in content aggregation, and discusses the ongoing engineering focus on privacy controls and user understanding of content visibility.

Under the Hood: Mobile Timeline

1/19/2012

This post details the engineering challenges and solutions for building the mobile Timeline, focusing on adapting the desktop experience to smaller viewports and touch devices. Key technical contributions include: implementing adaptive hardware acceleration using CSS to dynamically switch between complex (hardware-accelerated) and simple (non-accelerated) rendering of content units based on viewport and scroll position to prevent browser crashes; developing a JavaScript swiping component for horizontal navigation of tabs and content like photo albums, with lazy loading for images and pre-loading of adjacent content for responsiveness; optimizing photo display by overhanging them off the side to gain horizontal real estate and avoid a 'box-in-a-box' visual, and enabling exploration of albums in context with more photos displayed; and implementing higher-definition images by dynamically cropping and scaling them based on device UserAgent string and pixel density, including support for 1.5X or 2X pixel density and stretching non-square images on device rotation to prioritize immediate display over fidelity.

Building Timeline: Scaling up to hold your life story

1/5/2012

This post details the engineering effort behind building Facebook's Timeline feature. Key contributions include: a massive denormalization process for data storage to support ranking over years of activity, custom language and compiler for data format conversion, use of flash-only databases and parallelizing query proxies for join tables, and adoption of a data model compatible with Multifeed. The Timeline aggregator was developed using C++ for performance, and advanced caching strategies (memcached, Flashcache) were implemented. The development process highlighted parallel development through staged prototyping.

2009

Reducing markup size

9/1/2009

This post details the optimization of the Universal Feedback Interface (UFI) for the Like feature within Facebook's News Feed. The primary technical contribution was reducing the markup size by eliminating the transmission of redundant HTML for the Like/Unlike states. Instead of sending both sets of markup and using CSS to hide one, the system now sends only the necessary markup and uses JavaScript to dynamically update the UI after an asynchronous server call. While an initial attempt to send only the updated sentence markup degraded user experience due to a delay in visual feedback, a hybrid approach was adopted: sending both Like and Unlike links initially, but only updating the sentence asynchronously. This resulted in a significant reduction in the UFI's markup size (from 1.7KB to under 100 bytes for an empty UFI, and 1.7KB to ~900 bytes for a UFI with a like sentence), contributing to a 20KB reduction in the average home.php page size, an 8% improvement.

A New Look at the Path to Popularity

7/30/2009

This post details research into how popularity spreads on Facebook, specifically analyzing fan acquisition for Pages. It leverages the News Feed's ability to show friends' activities to model fan growth as a chain reaction and community merging. The research identifies that popularity often stems from interconnected groups rather than individual influencers, with a significant portion of fans joining independently and forming larger, connected communities. This analysis provides a deeper understanding of social dynamics and content virality within the platform.