Skip to content
Settings

schema configuration

cyoda-go version 0.6.2

config.schema — schema-extension log tuning.

cyoda maintains a schema-extension log for tracking model schema changes over time. These variables control savepoint frequency and retry behaviour when extending schemas on storage backends.

  • CYODA_SCHEMA_SAVEPOINT_INTERVAL — number of schema extensions between savepoint rows in the schema-extension log (default: 64, minimum: 1). Lower values increase write amplification but reduce recovery time after a crash.
  • CYODA_SCHEMA_EXTEND_MAX_RETRIES — plugin-layer retry budget for ExtendSchema on backends that support native schema extension with optimistic concurrency (default: 8, minimum: 1). Increase if you observe contention under high concurrency.

High-write workload (more frequent savepoints):

CYODA_SCHEMA_SAVEPOINT_INTERVAL=16
CYODA_SCHEMA_EXTEND_MAX_RETRIES=16

Default:

CYODA_SCHEMA_SAVEPOINT_INTERVAL=64
CYODA_SCHEMA_EXTEND_MAX_RETRIES=8
  • config
  • models
  • run
  • cyoda help config — Environment variables beat default values. The _FILE suffix variant takes precedence over the plain variable when both are set — for example, CYODA_POSTGRES_URL_FILE=/etc/secrets/db-url wins over CYODA_POSTGRES_URL. There are no command-line flags for configuration values; env vars are the sole configuration surface.
  • cyoda help models — A model is a named, versioned schema registered per tenant. Every entity in the system is an instance of exactly one model. Models are identified by (entityName, modelVersion). The model ID is a deterministic UUID v5 derived from that key: UUID.newSHA1(NameSpaceURL, "{entityName}.{modelVersion}").
  • cyoda help run — cyoda-go is a single-process, multi-tenant REST and gRPC API server. It starts in serving mode when invoked with no subcommand. All configuration is via environment variables with a CYODA_ prefix. The binary, Docker image, and Helm chart run the same binary; only the environment configuration differs across run modes.