← Meta Interview Insights

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

Senior
Jul 2026

Summary

Meta data engineer interview, one system design question about building a warehouse schema for Instagram. Pretty open-ended and I wasn't totally sure how deep they wanted me to go.

Questions Asked (1)

Q1

Design a data warehouse schema for Instagram.

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

I started with users and posts as the obvious fact/dimension split, but then spent way too long debating whether to normalize engagement events or just denormalize everything into wide tables.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business goals and key metrics (e.g., user engagement, content performance) to determine the grain and dimensions. Then propose a star schema with fact tables for core interactions (posts, likes, comments, follows) and dimension tables for users, content, and time, while discussing trade-offs between normalization and query performance.

Pro tip: Emphasize scalability and real-time analytics: Instagram's massive scale requires partitioning, columnar storage, and possibly a lambda architecture for batch and stream processing. Mention how you'd handle slowly changing dimensions (e.g., user profile updates) to show depth.

1. Clarify Requirements and Metrics

Ask about the primary use cases (e.g., ad-hoc analysis, dashboards, ML features) and key performance indicators (DAU, engagement rate, content virality). This shapes the schema design.

2. Identify Facts and Dimensions

Determine the core fact tables (e.g., user_engagement, content_creation) and their grain (e.g., one row per user-post interaction). Identify conformed dimensions like user, content, time, and device.

3. Design Star Schema

Propose a star schema with fact tables linked to dimension tables via foreign keys. For example, a fact_post_engagement table with user_key, content_key, date_key, and measures like likes, comments, shares.

4. Address Scalability and Trade-offs

Discuss partitioning (e.g., by date), distribution keys, and storage formats (Parquet, ORC). Compare star vs. snowflake schema, and consider real-time vs. batch processing needs.

5. Handle Slowly Changing Dimensions

Explain how to manage changes in dimensions (e.g., user profile updates) using SCD Type 2 to preserve history, and discuss impact on ETL and query performance.

Key Points to Mention

  • Grain of fact tables (e.g., one row per user-post interaction per day)
  • Conformed dimensions (user, content, time, device) for consistency across facts
  • Partitioning and clustering for scalability (e.g., partition by date, cluster by user_id)
  • Trade-offs between star and snowflake schemas (query simplicity vs. storage normalization)
  • Real-time vs. batch processing (Lambda architecture, streaming ingestion)
  • Slowly changing dimensions (SCD Type 2) for historical tracking

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