Hi! We're currently evaluating SpiceDB for our per...
# spicedb
g
Hi! We're currently evaluating SpiceDB for our permission storage and I've got a few things that I'm still a bit unclear on: * What is the "canonical" way to handle schema migrations? The guides only briefly mention this as "you will want to write data migrations and apply those changes using a schema migration toolchain". Is there some prior art on this somewhere? * We want to use the SpiceDB operator to manage our instance. Is there documentation on the
config
part of a `SpiceDBCluster`'s spec? * Are there recommendations on how many resources to allocate for the SpiceDB server?
v
hi! Today is US holiday so the team will be slow to respond, apologies! I'll do my best to answe your questions >* What is the "canonical" way to handle schema migrations? The guides only briefly mention this as "you will want to write data migrations and apply those changes using a schema migration toolchain". Is there some prior art on this somewhere? - I don't think we've written about schema migrations extensively. We like to draw parallels with relation database migrations in that you may need to do a phased execution: - You need to make sure your application stops writing relationships of any relation you are about to drop, and make sure all relationships defined after a given relation are removed. SpiceDB will prevent writing a new schema that drops a relation for which relationships exist. - Nothing immediately actionable if you are adding a new relation. It's a backward compatible change. >* We want to use the SpiceDB operator to manage our instance. Is there documentation on the config part of a SpiceDBCluster's spec? SpiceDB Operator example: https://github.com/authzed/spicedb-operator/blob/main/examples/cockroachdb-tls-ingress/spicedb/spicedb.yaml#L8-L20 In general what goes into
config
is typically everything that SpiceDB accepts as an CLI flag / environment variable, except you turn the name as described in the CLI help output from
kebab-case
into
camelCase
. For example
--log-level
turns into
logLevel
>* Are there recommendations on how many resources to allocate for the SpiceDB server? Not 100% sure we have a "formula" for this. It largely depends on what you schema looks like. It's better to experiment on a case by case basis, but we always recommend starting with SpiceDB clusters of 3-5 nodes depending on the workload. What datastore are you going to use?
opened https://github.com/authzed/spicedb/issues/895 to add documentation around schema migration
g
Awesome, thanks a bunch 🙂