Ory Network or self-hosted Ory Kratos for data residency and control-plane latency
0 reputation · 02 Nov 2021, 12:17 UTC
0 reputation · 02 Nov 2021, 12:17 UTC
This design decision requires choosing between Ory Network and self-hosted Ory Kratos for an identity platform that must keep personal data within a specific jurisdiction while minimizing control-plane latency for self-service flows.
Ory Network operates the control plane, including updates, backups, and high availability, but identity traffic passes through Ory-operated regions. That may introduce a third-party subprocessor and add latency depending on the tenant region. Self-hosted Ory Kratos keeps identity data and session cookies inside the customer network, but the team assumes patching, database migrations, and secret rotation for PostgreSQL or MySQL plus Redis.
Both models share Kratos self-service JSON schema concepts, but version-sensitive defaults such as cookie names and SameSite attributes changed after v0.7, creating uncertainty about endpoint parity until the target version is confirmed.
Which deployment model better satisfies strict data-residency requirements when Ory Network regions do not include the required jurisdiction? How should control-plane latency be measured against self-hosted infrastructure when comparing Ory Network tenant endpoints to self-hosted Kratos? What operational responsibilities are unavoidable if self-hosting is chosen to meet residency constraints?
36775 reputation · 02 Nov 2021, 16:43 UTC
Choose self-hosted Ory Kratos. If the required jurisdiction is absent from current Ory Network regions, Ory Network cannot be treated as residency-compliant: the control plane, identity requests, and session cookies run through Ory-operated regions and may involve Ory subprocessors. Self-hosted Kratos keeps personal data, cookies, PostgreSQL/MySQL data, and cache inside your network. This assumes Ory Network has no confirmed Bring-Your-Own-Database escape hatch and that region lists can change; verify the exact jurisdiction against the current Ory Network region list before sign-off. That is the one diagnostic detail that can change the recommendation: if Ory adds a region in your jurisdiction, reassess.
For browser self-service flows, measure end-to-end request latency from representative client locations to both endpoints: the Ory Network tenant URL and self-hosted Kratos behind a regional load balancer in the target jurisdiction. Collect p50, p95, and p99 for /self-service/login/browser, /self-service/registration/browser, and /self-service/settings/browser, including redirects and Set-Cookie. For self-hosted Kratos, also instrument time-to-first-byte at the Kratos API and database/cache query time; deploy Kratos, database, and cache in the same region or AZ as users to minimize hops. Do not use the Ory Network SLA as a latency guarantee; it covers control-plane availability, not data-plane response time. Verify config with grep -n \"session.cookie\" config.yaml after selecting a target Kratos version, because cookie name and SameSite defaults changed after v0.7.
Assumes the required jurisdiction is truly absent from current Ory Network regions, no confirmed BYODB option exists for Ory Network, and browser self-service traffic plus session cookies are in scope. Region lists, version defaults, and BYODB availability are unverified until checked against current Ory docs. Next step: confirm current region coverage, run the latency benchmark from representative clients, and compare operational effort against team capacity.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.