← Discord Interview Insights

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

Senior
May 2026

Summary

Discord data engineering interview, system design round focused entirely on dimensional modeling for their server activity data. One meaty question that took the whole session, which I wasn't expecting to go that deep on the schema design side.

Questions Asked (1)

Q1

Design a fact/dimension data model for Discord server activity, given raw event tables for server creation, server views, server joins, and messages. Define your dimension and fact tables, explain your grain choices, how you'd handle slowly changing dimensions for users and servers, partitioning strategy, and what query patterns the model is optimized for.

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

This ran the entire interview.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business questions and query patterns the model must support, then design a star schema with conformed dimensions and fact tables at the appropriate grain. Explain your grain choices, SCD strategies, partitioning, and how the model optimizes for common analytics like DAU, retention, and engagement.

Pro tip: Mention that Discord's scale demands partitioning by date and possibly server_id, and that using a Type 2 SCD for users and servers is critical for accurate historical analysis, but balance storage costs with query performance.

1. Clarify Requirements and Query Patterns

Ask about the key metrics (e.g., daily active users, messages per server, retention) and query patterns (e.g., time-series analysis, cohort analysis) to ensure the model serves its purpose.

2. Identify Dimensions and Facts

Define dimensions (e.g., dim_user, dim_server, dim_date) and fact tables (e.g., fact_server_activity, fact_message_activity) based on the raw events, ensuring they capture the necessary measures and foreign keys.

3. Choose Grain for Fact Tables

For each fact table, decide the grain (e.g., one row per server per day for activity, one row per message for message events) and justify why it supports the required queries efficiently.

4. Handle Slowly Changing Dimensions

Explain how to track historical changes for users (e.g., username, avatar) and servers (e.g., name, owner) using Type 2 SCDs with effective dates and current flags, and discuss trade-offs.

5. Partitioning and Optimization

Describe partitioning strategies (e.g., by date on fact tables, by server_id for large dimensions) and how the model optimizes for common queries like aggregations over time and joins.

Key Points to Mention

  • Star schema design with conformed dimensions for consistency across fact tables.
  • Grain selection: daily snapshot for server activity vs. transaction grain for messages.
  • Type 2 SCDs for users and servers to track historical changes, with effective_date and end_date.
  • Partitioning by date on fact tables to enable efficient time-range queries and data lifecycle management.
  • Optimization for query patterns: pre-aggregated daily tables for DAU/MAU, and message fact for detailed engagement analysis.
  • Handling late-arriving data and backfilling in a partitioned environment.

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