← Meta Interview Insights

Meta·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

Meta data engineer interview, system design round focused entirely on data modeling for a social news feed. Pretty technical and went deeper than I expected, especially with the follow-up on sharing.

Questions Asked (3)

Q1

Design a data model for a social app's news feed that supports multiple content types like text, images, and short videos. Walk through the core entities, relationships, and how you'd handle primary and foreign keys.

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

I started with a users table and a content table, then tried to handle the multiple content types with a type column plus separate attribute tables per type.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and scale, then define the core entities (User, Post, Media) and their relationships. Explain how you'd handle primary and foreign keys, including ID generation strategies and indexing for feed retrieval. Finally, discuss trade-offs like denormalization vs normalization and how to support multiple content types efficiently.

Pro tip: Mention that you'd use a globally unique ID (e.g., UUID or Snowflake) for posts to avoid collisions and enable sharding, and consider a polymorphic association for media to support different content types without schema changes.

1. Clarify Requirements and Scale

Ask about expected read/write patterns, scale (millions of users), and latency requirements to inform design decisions.

2. Identify Core Entities and Relationships

Define User, Post, Media, and possibly Comment/Like. Establish relationships: User has many Posts, Post has many Media items.

3. Design Primary and Foreign Keys

Choose ID strategies (e.g., auto-increment, UUID, Snowflake) for each entity. Define foreign keys linking Post to User and Media to Post, ensuring referential integrity.

4. Handle Multiple Content Types

Use a Media table with a type field (text, image, video) and a flexible payload (e.g., JSON or separate columns). Alternatively, use inheritance or polymorphic associations.

5. Optimize for Feed Retrieval and Discuss Trade-offs

Index foreign keys and timestamps for efficient feed queries. Discuss denormalization (e.g., caching feed) vs normalization, and how to scale with sharding.

Key Points to Mention

  • Use of globally unique IDs (e.g., Snowflake) for sharding and avoiding collisions
  • Polymorphic association or single-table inheritance for media types
  • Indexing strategies on foreign keys and timestamps for feed queries
  • Denormalization for read-heavy feeds (e.g., fan-out on write)
  • Handling of text, image, and video metadata (e.g., URLs, dimensions, duration)
  • Trade-offs between consistency and availability in distributed systems

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

In an analytics warehouse context, which of these tables would be dimensions and which would be facts? What are the core fields you'd include?

Data ModelingProduct Analytics & Metrics
Author's notes

This part actually went fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the grain and business processes the tables represent, then classify each as fact or dimension based on whether it captures measurable events or descriptive context. For each table, propose core fields that support common analytics queries, emphasizing surrogate keys, foreign keys, and time dimensions.

Pro tip: Mention that fact tables should have a clear grain and that dimension tables should be denormalized for query performance; also note that at Meta, user and event dimensions often include complex hierarchies like app, platform, and region.

1. Identify business processes and grain

Determine what each table represents: a business process (e.g., ad clicks, user sessions) or an entity (e.g., user, ad). Define the grain of fact tables (e.g., one row per click) to avoid ambiguity.

2. Classify as fact or dimension

Facts contain numeric measures and foreign keys to dimensions; dimensions contain descriptive attributes. For example, an 'ad_impressions' table is a fact, while 'user' and 'ad' tables are dimensions.

3. Define core fields for fact tables

Include foreign keys to related dimensions, degenerate dimensions (e.g., order_id), date/time keys, and additive measures (e.g., clicks, revenue). Ensure grain is reflected in the primary key.

4. Define core fields for dimension tables

Include a surrogate primary key, natural/business key, and descriptive attributes (e.g., user demographics, ad creative details). Consider slowly changing dimensions (SCDs) for historical tracking.

5. Validate with use cases

Check that the proposed schema supports common analytics queries (e.g., daily active users, click-through rate) and explain how joins would work.

Key Points to Mention

  • Fact tables store quantitative measures and foreign keys; dimension tables store descriptive attributes.
  • Grain of fact tables must be clearly defined (e.g., transaction-level, daily snapshot).
  • Surrogate keys in dimensions for efficient joins and SCD handling.
  • Conformed dimensions for consistency across fact tables.
  • Additive vs. semi-additive vs. non-additive measures in fact tables.
  • Role of date/time dimension for time-series analysis.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you extend the model to support sharing, where a user can share content to another user, to a group, or to an external channel?

Data ModelingTechnical Trade-offsSystem Design
Author's notes

This one tripped me up more than it should have.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of sharing (e.g., permissions, visibility, scale) and then propose a data model that represents shares as first-class entities with polymorphic targets (user, group, external channel). Discuss trade-offs between embedding share data in the content model versus a separate sharing service, and outline how to handle access control, notifications, and consistency at scale.

Pro tip: Emphasize idempotency and deduplication of shares to avoid spamming recipients, and mention how you'd leverage existing infrastructure (like Meta's TAO or social graph) to avoid reinventing the wheel.

1. Clarify requirements and scope

Ask questions to understand what 'sharing' means: is it one-time or persistent? What are the privacy and permission models? What scale (millions of shares per second)? This ensures you design for the right constraints.

2. Define the data model

Propose a Share entity with fields like sharer_id, target_type (user/group/channel), target_id, content_id, permissions, and timestamp. Consider using a graph model to represent relationships and enable efficient traversal.

3. Design access control and permissions

Explain how to enforce who can see or reshare content, using role-based or attribute-based access control. Discuss how permissions propagate (e.g., if a group share is later restricted).

4. Handle scale and consistency

Discuss partitioning strategies (e.g., by user or content), caching, and asynchronous processing for notifications. Address trade-offs between strong and eventual consistency for share visibility.

5. Consider extensions and edge cases

Mention how to support external channels (e.g., email, third-party APIs) via adapters, and handle scenarios like revoked shares, blocked users, or expired links.

Key Points to Mention

  • Polymorphic association for share targets (user, group, external channel) to keep the model extensible.
  • Idempotency and deduplication to prevent duplicate shares and ensure exactly-once semantics.
  • Access control lists (ACLs) or capability-based permissions for fine-grained sharing.
  • Use of existing social graph infrastructure (e.g., TAO) for efficient relationship queries.
  • Asynchronous processing for notifications and feed updates to decouple from the write path.
  • Trade-offs between embedding share metadata in content vs. separate service (e.g., read amplification vs. write complexity).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.