Skip to main content

PlaceableDatacenter

One datacenter an app can be created in. The code is exactly what createApp takes as input.datacenter.

type PlaceableDatacenter {
code: String!
gameApiUrl: String
gameApiWsUrl: String
placeable: Boolean!
appShardCount: Int!
serving: DatacenterServingStatus!
}

Fields

PlaceableDatacenter.code ● String! non-null scalar

Datacenter code, e.g. 'or' or 'va'. Pass this verbatim as createApp's input.datacenter; it is compared lowercase.

PlaceableDatacenter.gameApiUrl ● String scalar

HTTPS GraphQL origin clients of an app in this datacenter should use. Null only where no topology has been pushed, which on a Citus deployment means the datacenter cannot yet be reached and on a single-node one means there is nothing to route. Informational for a picker: createApp does not need it, and appDiscovery is what a client reads per app.

PlaceableDatacenter.gameApiWsUrl ● String scalar

The wss:// form of gameApiUrl. Null under the same conditions.

PlaceableDatacenter.placeable ● Boolean! non-null scalar

Whether createApp will accept this datacenter right now. False means it holds no shards of the app colocation group, so no app id can hash into it and creation would fail after exhausting its candidates. Do not offer a false entry as a choice — show it as unavailable, because dropping it hides a half-built datacenter from the only person who would notice.

PlaceableDatacenter.appShardCount ● Int! non-null scalar

How many shards of the app colocation group this datacenter currently holds. This is the placement odds: createApp mints candidate app ids until one hashes into the requested datacenter, so a datacenter holding half the shards is satisfied in about two attempts. Zero means unplaceable. Always 0 on a deployment that distributes nothing, where the number does not exist and placeable is true regardless — read placeable, not this, to decide whether a choice is offerable.

PlaceableDatacenter.serving ● DatacenterServingStatus! non-null enum

Whether any ck-api instance in this datacenter is currently serving clients. NOT part of whether an app can be PLACED here: placement is about where the data lands and survives a datacenter being down, while this is about whether players could connect today. A datacenter that is placeable but NOT_SERVING will hold the app fine and answer its clients with APP_UNAVAILABLE until an instance comes back, so it is worth warning about and wrong to forbid. UNKNOWN means the liveness signal itself could not be read and must not be shown as an outage — a fleet-wide heartbeat failure once made every datacenter look dead while all of them were fine.

Member Of

PlaceableDatacenters object