Skip to content
Prompt Words
History Member

Data residency

Keeping each customer's data in a chosen place, such as the EU, and not letting it move out. A router sends each customer to their home region, every copy of their data stays in that place too (logs, search indexes, and backups kept in a second EU cloud region), and a report on everyone runs inside each region and sends out only totals for groups of at least 10 people. Laws such as the GDPR may limit when personal data can leave a region, and contracts may require it to stay, so ask your legal team which rules apply to you.

The router keeps a directory: customer id → home region. Sign up an EU or a US customer, then run a report on everyone. The same rule must cover backups, logs and support access, not only the database.

EU database: 1,240 profiles · US database: 860 profiles · Totals out of the EU: 0

Each customer's profile lives in one home region. The router's directory says which.

    No sign-ups yet

    Say it in a prompt

    Store each customer's data only in their home region: EU customers in eu-west, US customers in us-east. Keep a global directory that maps customer id to home region and holds no names or emails, and route every request through it. Give each region's database credentials that only that region's services hold, so us-east cannot read eu-west. Keep logs and search indexes in the same region, and back up eu-west to a second EU region, not to the US. Check third-party tools too (error tracking, email, analytics), since they often copy customer data to other countries. Reports on everyone run inside each region and return only totals for groups of at least 10 people. Let only support staff approved for a region see its data, and check the design with our legal team.

    Vague vs precise prompt

    Vague prompt

    EU customers' data needs to stay in Europe

    Typical resultAdds a second database in an EU region and writes EU sign-ups to it. Backups, logs, the search index and the nightly analytics export still go to the US region, so copies of EU data leave the EU every day.

    Precise prompt

    Give each customer a home region: EU in eu-west, US in us-east. A directory maps customer id to region (no names or emails) and the router sends every request there. Each region's database only accepts its own region's credentials. Logs and indexes stay in the region, eu-west backs up to a second EU region, and reports run per region and return only totals for groups of at least 10.

    Typical resultEach EU customer's profile, logs and backups stay in the EU, the report still covers everyone through per-region totals, and a job in us-east that tries to read EU rows is refused by the database. Your legal team can then check the design against the rules that apply.

    Seen on

    • European Commission: Under the GDPR, personal data sent outside the European Economic Area must keep its protection, through tools such as adequacy decisions, standard contractual clauses or binding corporate rules.
    • AWS: Customers choose the AWS Regions where their content is stored. AWS says it won't move or copy that content out of those Regions except to provide the service the customer started or to comply with the law, and customers may back it up in other Regions themselves.
    • Google Cloud: Data residency describes where data is stored at rest. Its commitments cover customer data in services that can be set to a location, and not resource names or labels, so some data falls outside them.

    You might describe it as

    • keep EU customers' data in the EU
    • this customer's data must not leave their country
    • give every customer a home region

    Not to be confused with

    • Sharding

      Data residency splits data by where the law or a contract says it may live, so a customer's rows stay in their region; sharding splits data to spread the load. Residency is often built with sharding, using the home region as the shard key.