← Meta Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

System design round at Meta for a software engineer role. The whole session was basically one massive question about building a distributed config service, and they kept pushing deeper into every layer. Brutal but fair.

Questions Asked (5)

Q1

Design a globally distributed key-value configuration service that serves thousands of microservices. Walk through your key schema design including namespacing, versioning, and composability, as well as your value schema covering serialization format, validation, and schema evolution.

System DesignData ModelingTechnical Trade-offs
Author's notes

I started with namespacing because it felt like the safest entry point, something like service/environment/feature_flag as a hierarchical key.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a high-level architecture with a globally distributed, eventually consistent store (e.g., multi-region replication). Dive into the key schema design (namespacing, versioning, composability) and value schema (serialization, validation, evolution), explaining trade-offs and how they support thousands of microservices.

Pro tip: Emphasize that configuration is read-heavy and latency-sensitive, so caching and push-based updates are critical; also highlight the need for a robust schema registry to manage evolution across teams.

1. Clarify Requirements and Scale

Ask about consistency needs, read/write patterns, latency SLAs, and number of microservices. Establish that the system must be highly available and partition-tolerant.

2. High-Level Architecture

Propose a multi-region, eventually consistent key-value store with replication and caching layers. Discuss how to handle global distribution and failover.

3. Key Schema Design

Define a hierarchical key structure with namespacing (e.g., /service/env/config), versioning (e.g., v1, v2), and composability (e.g., inheritance or overlays). Explain how this enables isolation and reuse.

4. Value Schema Design

Choose a serialization format (e.g., JSON, Protobuf, Avro) with validation (e.g., JSON Schema, Protobuf descriptors). Discuss schema evolution strategies (backward/forward compatibility) and a schema registry.

5. Trade-offs and Operational Concerns

Discuss trade-offs between consistency and latency, push vs. pull updates, and how to handle schema evolution without breaking consumers. Mention monitoring, access control, and auditability.

Key Points to Mention

  • Namespacing: hierarchical keys with service, environment, and region segments to avoid collisions and enable access control.
  • Versioning: immutable versions with aliases (e.g., 'latest') for safe rollbacks and gradual rollouts.
  • Composability: support for inheritance or overlays so services can define base configs and override specific values.
  • Serialization: use a schema-based format like Protobuf or Avro for efficiency and strong typing, with JSON for human readability.
  • Validation: enforce schemas at write time and provide client-side validation to catch errors early.
  • Schema evolution: use a schema registry with compatibility checks (backward/forward) and support for optional fields.
  • Global distribution: multi-region replication with conflict resolution (e.g., last-write-wins) and caching for low-latency reads.

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

Q2

How would you design the partitioning and sharding strategy, indexing approach, and storage engine for this config service? Compare LSM-tree vs B-tree tradeoffs and explain the read and write paths, including how you'd handle hot keys.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This is where I spent the most time and also made the most mistakes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the config service's requirements (read/write ratio, consistency, scale) and then propose a partitioning strategy that balances load and minimizes cross-shard operations. Compare LSM-tree and B-tree storage engines in terms of write amplification, read performance, and space efficiency, and justify your choice based on the workload. Finally, detail the read/write paths, including caching and replication, and address hot keys with techniques like key salting or dynamic partitioning.

Pro tip: Demonstrate awareness of real-world trade-offs by mentioning that hot keys often require a combination of client-side caching, request coalescing, and adaptive sharding, and that the choice of storage engine should align with the dominant access pattern (e.g., LSM for write-heavy, B-tree for read-heavy).

1. Clarify Requirements and Constraints

Ask about the expected read/write ratio, data size, latency requirements, consistency needs, and access patterns to inform design decisions.

2. Design Partitioning and Sharding

Propose a sharding key (e.g., config ID or namespace) and strategy (range, hash, or consistent hashing) to distribute load evenly and avoid hotspots.

3. Compare Storage Engines

Contrast LSM-tree (write-optimized, higher read amplification) and B-tree (read-optimized, write amplification) and select based on workload characteristics.

4. Define Indexing Approach

Choose appropriate indexes (e.g., primary key, secondary indexes) to support efficient queries, considering trade-offs in write overhead and storage.

5. Explain Read/Write Paths and Hot Key Handling

Describe how reads and writes flow through caches, storage, and replication, and detail mitigation strategies for hot keys such as key salting, caching, and load balancing.

Key Points to Mention

  • LSM-tree vs B-tree trade-offs: write amplification, read amplification, space amplification, and suitability for write-heavy vs read-heavy workloads.
  • Partitioning strategies: range vs hash partitioning, consistent hashing, and rebalancing considerations.
  • Indexing: primary vs secondary indexes, covering indexes, and the impact on write performance.
  • Read/write paths: caching layers (e.g., Redis), write-ahead logging, replication (sync vs async), and consistency models.
  • Hot key mitigation: key salting, client-side caching, request coalescing, and dynamic shard splitting.
  • Monitoring and adaptive strategies: detecting hotspots and automatically rebalancing or adjusting sharding.

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

Q3

What consistency model would you choose for this service, and how would you handle leader election, replication quorums, network partitions, and failover?

System DesignTechnical Trade-offs
Author's notes

I said linearizability for config reads because a microservice getting a stale feature flag could cause real production issues.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the service's requirements (e.g., consistency, availability, latency) and then propose a consistency model that balances these needs. Explain how you would implement leader election, replication quorums, partition handling, and failover, referencing established algorithms like Raft or Paxos and discussing trade-offs.

Pro tip: Demonstrate awareness of real-world constraints by mentioning that the choice often depends on the specific use case, and cite examples from systems like Spanner, DynamoDB, or Cassandra to show practical knowledge.

1. Clarify Requirements

Ask questions to understand the service's consistency, availability, and latency requirements, as well as the expected scale and failure modes.

2. Choose Consistency Model

Select a consistency model (e.g., strong, eventual, causal) that aligns with the requirements, and justify your choice with trade-offs.

3. Design Replication and Quorums

Describe how data will be replicated across nodes and how quorums (e.g., majority) will be used to ensure consistency and fault tolerance.

4. Handle Leader Election and Failover

Explain the leader election algorithm (e.g., Raft, Paxos) and how failover occurs when the leader fails, ensuring minimal downtime.

5. Address Network Partitions

Discuss how the system behaves during network partitions, referencing CAP theorem and strategies like quorum-based decisions or conflict resolution.

Key Points to Mention

  • CAP theorem and the trade-offs between consistency and availability
  • Consensus algorithms like Raft or Paxos for leader election and replication
  • Quorum-based replication (e.g., write quorum + read quorum > replication factor)
  • Handling network partitions with techniques like majority quorums or CRDTs
  • Failover mechanisms and ensuring high availability
  • Real-world examples (e.g., Google Spanner, Amazon DynamoDB, Apache Cassandra)

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

Q4

How would you support transactions, watch/subscribe functionality for live config updates, TTLs on config entries, and backup and restore for this service?

System DesignAPI & Integrations
Author's notes

Watches were the fun part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and scale (e.g., read/write ratio, consistency needs, latency targets) to frame the design. Then, systematically address each feature—transactions, watch/subscribe, TTLs, and backup/restore—by proposing appropriate technologies and trade-offs, ensuring they integrate cohesively. Conclude by discussing how these features interact and potential optimizations for Meta's scale.

Pro tip: Emphasize idempotency and versioning for watch notifications and transactions to handle retries and out-of-order updates, which is critical in distributed systems. Also, mention using a write-ahead log or change data capture for backup/restore to ensure consistency without impacting live traffic.

1. Clarify Requirements and Scale

Ask questions to understand expected throughput, latency, consistency requirements, and client capabilities. This ensures your design aligns with Meta's scale and the specific use case.

2. Design Transactions

Propose a transactional model (e.g., ACID via a distributed database or optimistic concurrency control) and discuss isolation levels, conflict resolution, and how to handle failures.

3. Implement Watch/Subscribe

Outline a pub/sub mechanism for live config updates, using technologies like WebSockets, long polling, or a message queue. Discuss how to ensure reliable delivery, ordering, and scalability.

4. Add TTL Support

Explain how to implement TTLs, such as using a time-to-live index, lazy deletion, or a background sweeper. Consider trade-offs between precision and performance.

5. Backup and Restore Strategy

Describe a backup approach (e.g., periodic snapshots plus incremental logs) and a restore process that minimizes downtime. Highlight consistency guarantees and testing.

Key Points to Mention

  • Use of a distributed database like Spanner or a consensus protocol (e.g., Raft) for transactions to ensure ACID properties at scale.
  • Watch/subscribe implementation with change data capture (CDC) or a publish-subscribe system, ensuring at-least-once delivery and idempotent clients.
  • TTL enforcement via a time-ordered index or a dedicated TTL service, with considerations for clock skew and garbage collection.
  • Backup and restore using snapshots and write-ahead logs, with point-in-time recovery and minimal impact on live traffic.
  • Versioning of config entries to handle concurrent updates and enable clients to detect stale data.
  • Monitoring and alerting for each feature to ensure reliability and performance in production.

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

Q5

How would you approach capacity planning, define SLAs, design multi-region replication, and test a system like this end to end?

System DesignTechnical Trade-offsProduct Analytics & Metrics
Author's notes

Ran low on time here so this felt rushed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements and scale, then walk through each area (capacity planning, SLAs, multi-region replication, end-to-end testing) in a logical order, emphasizing trade-offs and how they interconnect. Use concrete examples and metrics to demonstrate practical experience and a holistic view.

Pro tip: Tie everything back to user experience and business impact—e.g., how SLA targets drive capacity buffers and replication strategy—showing you think beyond technical components to product outcomes.

1. Clarify Requirements and Scale

Ask questions to understand expected traffic, growth, latency targets, consistency needs, and budget constraints. This sets the foundation for all subsequent decisions.

2. Capacity Planning

Estimate resource needs using historical data and load testing, then plan for headroom and elasticity. Discuss techniques like forecasting, autoscaling, and bottleneck analysis.

3. Define SLAs

Translate business requirements into measurable SLIs (e.g., latency, availability) and set SLOs with error budgets. Explain how SLAs are derived and monitored.

4. Design Multi-Region Replication

Choose a replication strategy (active-active, active-passive) based on consistency, latency, and failover needs. Address data synchronization, conflict resolution, and traffic routing.

5. End-to-End Testing

Outline a testing plan covering load, failover, chaos, and canary tests. Emphasize automation, observability, and validating SLAs under realistic conditions.

Key Points to Mention

  • Use of metrics like QPS, latency percentiles (p99), and error rates for capacity and SLA definitions.
  • Trade-offs between consistency, availability, and latency in multi-region replication (e.g., CAP theorem).
  • Techniques for capacity planning: load testing, forecasting, autoscaling, and capacity buffers.
  • SLA/SLO/error budget framework and how to monitor and alert on them.
  • Multi-region patterns: active-active vs. active-passive, data replication methods (sync vs. async), and conflict resolution.
  • End-to-end testing strategies: chaos engineering, canary deployments, and synthetic monitoring.

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