Design Data Residency Routing That Keeps EU User Data in Region
Last updated: November 29, 2026
Quick Overview
Design how Meta's systems store and process data for users in a regulated jurisdiction (for example the European Union) inside that region, routing reads and writes accordingly while still supporting cross-border features like messaging a friend in the US.
Meta
November 29, 20260
0
0 solved
Design how Meta's systems store and process data for users in a regulated jurisdiction (for example the European Union) inside that region, routing reads and writes accordingly while still supporting cross-border features like messaging a friend in the US.
Regulatory pressure on cross-border data transfers has made data residency a real infrastructure concern at Meta. The interviewer checks how you assign users a home jurisdiction, route storage and processing by it, handle data that involves users from two jurisdictions, and audit compliance.
What the Interviewer Expects
- Define what data is covered and which jurisdiction a user belongs to
- Pin storage of covered data to in-region shards
- Route requests to in-region processing where required
- Handle shared objects like a chat between an EU and a US user
- Provide auditing, data flow controls and tests
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle a user who moves from Germany to the US?
- What about caches and CDNs that hold copies near the viewer?
- How do you prevent a new service from accidentally logging EU data in a US warehouse?
- What latency cost do residency rules add, and how do you reduce it?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: each user has a jurisdiction (EU, other). Covered data (profile, posts, messages metadata, logs with user ids) for EU users is stored at rest in EU data centers. Processing that reads ...
High-Level Design
Jurisdiction service: assigns each user a jurisdiction from signup country and residence signals, stored with the account. Placement: the sharding layer allocates EU users' data to shards whos...