Skip to content

Example scenario · Multi-region IaaS · customer-keyed data residency · CA + US

Data residency done right for a Canadian SaaS with a US enterprise base

A 14-week dual-region rebuild for a Canadian healthcare-adjacent SaaS — customer-keyed residency on Stack Harbor Cloud Compute, with audit trails that hold up under PIPEDA, Law 25 and HIPAA BAA scrutiny.

Illustrative client profile: Canadian SaaS · healthcare-adjacent workflow · ~28 employees. This example scenario shows how we approach the work; it does not describe a specific client, and its figures are illustrative.

Outcomes

Monthly traffic
~4M API calls/mo · ~180k authenticated daily users across regions
Uptime
99.97% Canadian region · 99.96% US region
Response p95
p95 210 ms Canadian users · p95 230 ms US users
Tickets
−32% (routing clarity reduced "where is my data" support load)
Incident response
Sev-1 ack 12 min · region-isolated runbooks
Migration window
Customer-by-customer windows · zero data crossings · documented residency log
MRR
4 enterprise deals closed in 90 days post-launch · CA region attribution confirmed
Infra cost change
+38% on infra (second region) · enterprise revenue unlocked outweighs it ~7x

The first email came in March. A Canadian hospital network procurement officer, three rounds into a deal: “Before we sign, can you confirm in writing that our data — including backups — will be stored on infrastructure located in Canada?” The founder forwarded it with the subject line “this again.” The deal closed at a tier below the original ARR because residency was a checkbox the platform could not honestly tick.

The second came in May. A regional US health system. “We need documented assurance that our patient-adjacent records are not processed or stored in a Canadian region. Our auditors flagged it.” That deal died.

The third came in July. A Canadian provincial RFP, page seven: a written architecture diagram showing where every byte of personal information lived at every point of its lifecycle, with no transit through US-hosted infrastructure. The CEO called us the morning it landed. By the end of that call the question was no longer whether to add a Canadian region — it was how to add one without breaking the US customers already on the platform, on a fourteen-week clock.

At a glance

  • Fourteen-week dual-region build on Stack Harbor Cloud Compute (Montréal + northern Virginia) with customer-keyed edge routing through Cloudflare Workers.
  • Sixty-three customer tenants migrated across nine weekend windows. Two needed bespoke handling.
  • Ninety-day window: 99.97% uptime in CA, 99.96% in US. p95 API latency 210 ms CA, 230 ms US. Sev-1 mean acknowledged response 12 minutes, region-isolated runbooks.
  • Four enterprise deals closed inside ninety days with residency as a named contract clause. Infra spend rose 38%; attributable enterprise revenue in the same window was roughly seven times that delta.

What the audit revealed

Textbook single-region SaaS for a 2021 build: one AWS us-east-1 stack, PostgreSQL primary plus replica, S3 for documents, Redis sessions, Cognito user pool, Stripe billing, single Datadog and Snowflake accounts.

We spent two weeks on one question: could the data store be partitioned along a residency dimension without rewriting the application? Conditional yes — the team had built tenant_id into every row, every S3 prefix, and every Cognito group claim from day one. Five dependencies had to follow each customer’s residency shard rather than live in a global control plane: tenant rows, the document store, the audit log, the auth identity pool, and per-region analytics extraction. Billing in Stripe stayed US-resident under a commercial-activity exception documented with general counsel and reviewed with three customer privacy officers. The hard cross-cutting question was the ticketing platform — solved by keeping no customer attachments on tickets and proxying attachment reads through the customer’s contracted region. The centralized audit log quietly mattered most: log records were personal-information-adjacent and had to break into per-region retention.

The compliance frame

Privacy officers on the other side of these contracts read this kind of document the way an engineer reads logs, so we have to be precise. None of what follows is legal advice. The platform’s general counsel and the customer privacy officers own the legal interpretation; the infrastructure has to satisfy what those interpretations require.

PIPEDA applies to Canadian commercial activity through the platform, with an accountability principle that keeps the customer accountable to their end users even when we run the infrastructure. Quebec’s Law 25 applies to personal information from Quebec residents and adds cross-border transfer assessment, a defined breach-notification window, and a stated preference for privacy officers being able to demonstrate concrete operational measures, not policies. For US healthcare customers under BAAs, HIPAA flows down — encryption, audit trails, access control, its own notification timing.

In infrastructure terms: encryption at rest in each region’s database, document store, and backup tier; encryption in transit terminating in the customer’s contracted region; an incident-response playbook with notification timing that respects both Law 25 and the BAA depending on the affected customer; per-region audit logs sufficient for a privacy officer to demonstrate in writing where every byte of personal data lived at every point of its lifecycle; and a sub-processor list region by region. We do not certify a platform compliant — the customer’s privacy officer does. We make sure the infrastructure supports those determinations with operational evidence.

The architecture

Two Cloud Compute regions: Montréal and northern Virginia. Each is a fully independent stack — own VPC, own PostgreSQL primary plus replica, own document store, own Redis, own application fleet, own audit log retention, own backup tier. Backups stay in-region. DR for the Canadian region targets a second Canadian AZ, not the US region — that boundary is the residency commitment.

Edge routing runs on Cloudflare Workers. Every request hits a Worker that resolves the customer’s residency tag from a denormalized lookup table at the edge and routes to the correct region. The routing key is the customer subdomain — a stable identifier the customer’s IT team can audit.

# edge-routing/customer-residency.yaml
schema: customer-residency-tag-v2
fields:
  customer_id:        string
  contracted_region:  enum    # ca-1 | us-1
  effective_from:     iso8601
  prior_region:       enum?   # set during migration only
  exceptions:
    - sub_processor:  string?
      scope:          enum    # auth | billing | analytics
      documented:     uri     # customer-signed exception
worker_behavior:
  on_match:           route_to.contracted_region
  on_miss:            return_308 -> contracted_region.canonical_host
  on_unknown_tenant:  return_404 + log.security_event
  audit_log:          dual_write -> both_regions

Auth was rebuilt as two regional Cognito pools with no shared users, federated at customer creation. Region change requires explicit re-provisioning that emits audit events on both sides. Datadog and Snowflake are forked per region; Canadian data never crosses into the US analytics warehouse.

The migration

Fourteen weeks. The first eight built the Canadian region as a mirror of the existing stack, with the application modified just enough to make auth pool partitioning and audit-log region-pinning work. Weeks nine through fourteen were the customer-by-customer windows.

Sixty-three tenants across nine weekend windows, batched by workflow profile and time zone. The rehearsed Canadian-residency cutover: snapshot the tenant in the US region, ship to the Canadian staging instance, replay the audit log forward, verify row and object counts and auth records, flip the edge routing tag, redirect in-flight sessions, emit a closing audit event on both sides. Measured downtime per customer: under forty seconds. No data crossed a residency boundary during any window — the audit log on both sides confirms it, and general counsel signed a residency attestation against that log after the final window.

Two customers needed bespoke handling. A large Canadian hospital network had independently contracted a US-based document signature sub-processor whose callbacks carried personal information into us-east-1; the fix was a documented exception clause, the customer’s written acknowledgement of the residency boundary their own sub-processor created, and routing that recognized those callbacks as Canadian-destination. A US health system was federated to a single-tenant Active Directory only reachable from US IP space; they were a US-region customer anyway, so this was alignment, not residency, but we documented the constraint explicitly.

What landed at 90 days

Uptime: 99.97% CA, 99.96% US. The single Sev-1 was a Redis failover in the Canadian region during the second weekend — failover completed within target, but the session-validation path had a stale connection pool that took six extra minutes. Acknowledged in eight, resolved in forty-three against the four-hour target. Root cause identified, runbook updated, backoff tuned, change deployed both regions.

API latency stabilized at p95 210 ms for Canadian users and p95 230 ms for US users. The Canadian p95 came down meaningfully from a pre-migration baseline near 380 ms — those users had been crossing the border to hit us-east-1. US-user latency held flat.

Inbound tickets were down 32%, concentrated in a category nobody had been measuring: “where is my data?”, auditor-attestation requests, and status-page-shows-the-wrong-region complaints. The status page is now region-aware; attestations point at a self-service compliance portal built in week twelve.

Four enterprise deals closed inside ninety days with residency as a named clause: three Canadian (the provincial RFP among them), one US. Infra cost rose 38% from running a second region plus dual Datadog and Snowflake postures. Attributable enterprise revenue in the same window was roughly seven times that delta. The CFO’s spreadsheet paid the second region back inside a quarter.

What we’d say to a Canadian SaaS thinking about US expansion

Three things, senior-operator practical.

Residency is not a procurement objection you finesse with a policy document — it is an architecture conversation. The customer’s privacy officer will read the AWS resource ID in your support ticket and conclude the policy is aspirational. Build the diagram. Build the audit log. Train support not to paste cross-region identifiers into customer-visible communications.

The second region is not the expensive part. The cross-cutting dependencies are — auth, billing, audit logs, analytics, support tooling. Three weeks for the rack-and-stack; eleven untangling the global control-plane assumptions that accreted over four years of single-region growth. Budget against the untangling.

Customer-by-customer migration windows are slower than a big-bang cutover and they are the right call almost every time. The auditor on the customer side needs a closing entry saying their tenant moved at this timestamp, with these row counts, signed on both sides. They can file a per-tenant record and close it. Your engineers will be tired by week fourteen. That is the right trade.


This is an example scenario: an illustrative engagement that shows how we approach this kind of work. It does not describe a specific client, and its figures are illustrative.

If your file looks like this — a Canadian SaaS with US customers and a residency conversation that keeps surfacing in late-stage deals — read about Cloud Compute on Stack Harbor and our migration practice, or book a residency architecture assessment. For the privacy frame in depth, our notes on PIPEDA data residency for SaaS operators and Quebec’s Law 25 for SaaS walk through the operational measures that sit alongside an engagement like this one.

Tell us what you're running. We'll tell you what needs to change.

Book a consult with Stack Harbor. We will review your current environment, risk points, support needs, and the best path forward.