pattern Commons

Share pattern

Share the full pattern page.

Private · saved on this device

Location-Aware Placement

Constrain where data is stored, processed, and recovered, including temporary copies and logs, so placement follows an explicit geographic policy.

A customer dataset lives in an approved cloud region. Its transformation job runs elsewhere, writes temporary files to a default bucket, and sends failed records to a centralized troubleshooting service. Disaster recovery creates another copy in a third location.

The primary database has the right address. The data’s wider lifecycle does not.

Location-aware placement makes geography an explicit constraint when assigning data, processing, and recovery resources. It selects suitable locations from an approved set, then keeps routing, replication, exports, and operational tooling consistent with that decision.

The purpose may be contractual residency, proximity to users, reduced transfer costs, or resilience. These goals interact, but they are different requirements. A nearby location may be unauthorized; an authorized location may provide insufficient disaster recovery.

Describe the requirement before selecting the region

“Keep this data local” is too vague to implement reliably. Local to the customer, the application, a country, or a cloud region?

A placement policy needs a defined scope and separate answers for different activities:

Concern Required decision
Storage Where may primary data and persistent copies reside?
Processing Where may services read and transform the content?
Recovery Which locations may hold backups and run restored workloads?
Access Who may retrieve data, and are access-origin restrictions required?
Supporting information What rules cover logs, metadata, keys, and diagnostic payloads?

Legal and contractual requirements must first become approved technical constraints. Geography alone does not establish compliance, and a provider’s region label should not be assumed to cover every service component.

Within those constraints, the system can optimize latency, capacity, availability, and cost.

An illustrative tenant policy allows regions A and B. Primary storage, processing, temporary data, and logs use A; recovery resources use B. Region C is blocked for content exports, replicas, and failover. Access authorization and service guarantees require separate verification.
Tenant T17 permits regions A and B. Its primary is in A and recovery copy in B; region C is excluded. Workers, logs, replicas, and supporting copies are part of the placement boundary. Allowed placement does not itself authorize access.Scroll horizontally for readable labels; open the visual for full detail.

The approved set applies to the illustrated tenant and data scope. Another tenant may have a different policy.

Example: routing tenants into approved regional deployments

A software service maintains this placement directory:

Tenant Primary region Permitted regions
T17 A A, B
T28 C C, D

An authenticated request for T17 resolves through that directory to the deployment in A. Its data stores, queues, workers, and content-bearing diagnostic paths follow the same placement policy.

The directory is trusted configuration. A client cannot choose region C merely by adding a request parameter. Nor should the application infer the tenant’s placement from the user’s current IP address: travel, corporate networks, and proxies can change apparent location without changing the tenant’s requirements.

During an outage in A, T17 may move to an approved recovery deployment in B. Routing it to whichever region currently has spare capacity would violate the placement contract.

Correctness depends on reliable tenant identification, consistent placement metadata, and enforcement across every relevant write and processing path. A regional application tier cannot compensate for a background worker that sends all tenants’ records to one unrestricted global queue.

Example: placing analytical dependencies together

An analytics team puts order facts in BigQuery’s EU location and reference data in europe-west4. Both sound geographically compatible, so the team expects an ordinary join to work.

BigQuery treats its multi-region locations as distinct from individual regions. Its dataset documentation specifies that tables referenced by a query must be in datasets with the same location. Geographic containment does not make two service locations interchangeable. BigQuery dataset location rules, BigQuery locations

The team must choose a supported arrangement deliberately: colocate the required datasets, maintain an approved reference-data copy, or use another explicitly supported architecture whose data movement satisfies the policy.

Placement therefore affects dependency design. Shared dimensions, lookup tables, staging areas, output datasets, and compute capacity all need compatible locations.

A small reference table may be inexpensive to replicate into approved locations. A large shared fact table may make that approach costly. A global reporting requirement can instead motivate regional calculations followed by approved summary publication—but aggregation does not automatically exempt an output from placement restrictions.

The location decision belongs in the dataset interface, where producers and consumers can see it before building dependencies.

Example: recovery inside the permitted geography

A document service requires storage and recovery within a specified geographic area. It initially chooses one regional bucket and assumes that this also handles a complete regional outage.

Recovery needs a separate design. Multiple availability zones within one region address a different failure scope from copies across regions.

Google Cloud Storage offers regional, dual-region, and multi-region locations. A dual-region identifies a specific pair of regions, whereas a multi-region gives the service more discretion within the selected area. Those choices affect replication and placement control. Cloud Storage bucket locations

Where supported, the service can select two approved regions and place recovery compute, dependencies, and credentials so the application can actually operate there.

Replication timing matters too. Cloud Storage documents asynchronous cross-region replication; newly written objects that have not finished replicating can be unavailable during a regional outage. Cloud Storage availability and durability

Provider terminology requires careful interpretation. BigQuery’s documented US and EU multi-region locations do not themselves provide cross-region redundancy. A familiar label is not a portable recovery guarantee. BigQuery location and redundancy behavior

Recovery testing must verify the permitted destination, restoration process, application dependencies, and achievable recovery objectives.

Follow processing and request paths

Storage location is only one part of placement.

An approved dataset can still be read by an external transformation service, a remote inference endpoint, or an administrator downloading an extract. Temporary files and failed-message payloads may persist somewhere different from the main output.

Request endpoints can matter as well. Cloud Storage regional endpoints constrain supported requests to the resource’s specified location and provide documented processing and data-location guarantees. The documentation explicitly excludes certain resource metadata from those guarantees. Cloud Storage regional endpoints

This illustrates why service-specific scope matters. A guarantee about object content should not silently become a claim about every object name, IAM policy, support process, or control-plane record.

Access authorization remains independent. Storing data in A does not prevent an authorized principal elsewhere from retrieving it. If access origin or operator location is part of the requirement, it needs its own controls and evidence.

Enforce placement throughout change

A useful implementation combines preventive controls with observed configuration.

Provisioning should require explicit locations rather than silently accepting defaults. Pipeline configuration should identify permitted input, processing, and output locations. Replication and export permissions should reflect the approved set.

AWS Control Tower provides an implementation example: its data-residency controls help detect and inhibit creation, sharing, or copying outside selected AWS Regions. AWS also documents exemptions for certain global services, so the controls require an understood scope. AWS Control Tower data-residency controls

Inventory and audit evidence should establish actual resource locations, replication targets, job execution locations, and export destinations. Test recovery and failure paths as well as ordinary operation.

A placement-policy change is often a migration. Updating a tenant’s directory entry does not move existing objects, replicas, backups, or queued work. Migration needs copy verification, controlled routing changes, treatment of in-flight operations, and disposition of old copies.

Unknown placement metadata should become visible work with an owner. It should not silently select an arbitrary region.

Costs, limits, and related patterns

Regional deployments duplicate capacity, configuration, monitoring, and operational effort. Cross-region replication adds transfer costs and lag; synchronous coordination across distance can increase write latency. Narrow placement requirements can reduce available service choices and recovery options.

The pattern is especially useful for platforms serving tenants with different location requirements, data-intensive regional workloads, and systems whose recovery geography must be controlled.

It cannot resolve an impossible combination of requirements. A policy permitting only one region cannot simultaneously obtain protection from that region’s loss by placing copies in another. That conflict needs an explicit decision about the requirement or recovery objective.

Horizontal Sharding can partition tenants by placement policy, while routing preserves the association.

Co-Located Joins keeps frequently combined data near its compute and dependencies.

Policy as Code can enforce approved locations during provisioning and deployment.

Access Audit Trails supplies evidence of operations and movement, complementing resource-location inventories.