Multi-site realms
Serve one realm from more than one site, each taking sign-ins and changes, all converging on the same realm.
AvailableAPI
A realm can be served from more than one site at once, for nearness to your users or to keep running when a site is lost. Every site takes sign-ins, issues tokens and accepts changes, and each change made at one site reaches every other. Your users, groups, apps, sessions, keys and settings are the same wherever a request lands.
There is nothing to switch on per realm: a realm is served from every site that serves your realm. What you choose is how users reach it, usually with a host name at each site.
Before you begin
Section titled “Before you begin”- Which sites, and where. The sites that serve your realm, and the regions they’re in, are agreed with Cvyūh when your realm is set up. Ask your Cvyūh contact to confirm them; no API lists them.
- Privilege: none to use it. Giving the realm a host name at each site needs
DELEGATEover the realm’s parent: see Host names. - Where: host names through the API; nothing else to set.
How it works
Section titled “How it works”A change takes effect at the site that took it, and reaches the other sites in the background, encrypted on the way, usually within seconds. Until it arrives, the other sites answer from what they have.
| What | Where it is |
|---|---|
| Users, groups, apps, policies, settings, host names | Every site |
| Sessions, revocations, lockouts, one-time codes | Every site |
| Signing keys, storage keys, secrets | Every site |
| TLS certificates for the realm’s host names | Every site |
| A sign-in in progress | The site where it started, until it finishes |
| The audit trail | Each site keeps its own records of what it did |
When two sites change the same thing at nearly the same moment, the later change wins. The earlier one is recorded, and Cvyūh can retrieve it on request. A deletion can’t be undone by an older change arriving late.
When a site is lost
Section titled “When a site is lost”Every site already serves the realm, so there is no failover to wait for: the other sites keep taking sign-ins, issuing tokens and accepting changes. Users who reached the lost site by its own host name reach the realm at another site’s host name. What a user may notice:
- A sign-in in progress at the lost site has to start again.
- A change the lost site took in the seconds before it went, and hadn’t yet passed on, reaches the others only when that site returns.
Cvyūh doesn’t publish a recovery time or recovery point objective yet.
Set it up
Section titled “Set it up”Give the realm a host name at each site, listing them all in its host names. If apps should see one issuer whichever site they reach, set a base URL. The guide Sign in at either site walks through it.
Limits and defaults
Section titled “Limits and defaults”| What | Default | Can it change |
|---|---|---|
| Time for a change to reach the other sites | Usually seconds | No |
| Time for a suspension to reach every site | Up to about a minute | No |
| Sites a realm’s data is kept at | Every site that serves it | Choosing sites per realm is planned |
| Recovery time and recovery point objectives | Not published | No |
Troubleshooting
Section titled “Troubleshooting”- A user is asked to sign in again at the other site. Their session hadn’t reached it yet. It arrives within seconds; until then, the other site doesn’t know the session.
- A change you just made doesn’t show in a read. The read was answered by another site. Read through the host name of the site you wrote at; see Read your own writes.
- A refresh fails at the other site. Each host name is its own issuer unless you set a base URL, and a token
refreshed under another host name than it was issued under is refused (
invalid_grant). Set a base URL. - A one-time code was accepted twice. Each site spends a code at once, and the others once its first use has reached them, usually seconds. Keep a sign-in at one site.
Audit record
Section titled “Audit record”Each site writes its own records of what it did, so a trail read at one site shows what that site recorded. To read
every site’s records, make the same read on the host name that reaches each site and merge the answers by
eventTime: see Read every site’s records.
There’s no record of a change moving between sites.
Good to know
Section titled “Good to know”- A sign-in finishes where it started. A sign-in begun at one site can’t be finished at another.
- A sign-out, a revoked token or a removed app takes effect at the other sites when it reaches them.
- A realm doesn’t see the sites themselves. There is no realm API for which sites run or how far behind each is.
Coming next
Section titled “Coming next”See What’s next for sites: data residency, and reading your own writes at every site.
Related
Section titled “Related”- Sign in at either site: one session across two sites.
- Host names: a host name for each site.
- Realm base URL: one issuer across them.