Skip to main content
Version: 3.9

ScalarDB Cluster Configurations

This document describes the configurations for ScalarDB Cluster. ScalarDB Cluster consists of multiple cluster nodes, and you need to configure each cluster node.

In addition to the configurations described in Transaction manager configurations and Other configurations, you can configure the following configurations for each cluster node.

Basic configurations​

The basic configurations for a cluster node are as follows:

NameDescriptionDefault
scalar.db.cluster.membership.typeMembership type. Currently, only KUBERNETES can be specified.KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_nameThis configuration is for the KUBERNETES membership type. Namespace name for the endpoint resource.default
scalar.db.cluster.membership.kubernetes.endpoint.nameThis configuration is for the KUBERNETES membership type. Name of the endpoint resource to get the membership info.
scalar.db.cluster.node.decommissioning_duration_secsDecommissioning duration in seconds.30
scalar.db.cluster.node.grpc.max_inbound_message_sizeMaximum message size allowed to be received.The gRPC default value
scalar.db.cluster.node.grpc.max_inbound_metadata_sizeMaximum size of metadata allowed to be received.The gRPC default value
scalar.db.cluster.node.portPort number of the ScalarDB Cluster node.60053
scalar.db.cluster.node.prometheus_exporter_portPort number of the Prometheus exporter.9080
scalar.db.cluster.grpc.deadline_duration_millisDeadline duration for gRPC in milliseconds.60000 (60 seconds)
scalar.db.active_transaction_management.expiration_time_millisScalarDB Cluster nodes maintain ongoing transactions, which can be resumed by using a transaction ID. This configuration specifies the expiration time of this transaction management feature in milliseconds.60000 (60 seconds)

ScalarDB Cluster GraphQL Configurations​

The configurations for ScalarDB Cluster GraphQL are as follows:

NameDescriptionDefault
scalar.db.graphql.enabledWhether ScalarDB Cluster GraphQL is enabled.false
scalar.db.graphql.portPort number of the GraphQL server.8080
scalar.db.graphql.pathPath component of the URL of the GraphQL endpoint./graphql
scalar.db.graphql.namespacesComma-separated list of namespaces of tables for which the GraphQL server generates a schema. Note that at least one namespace is required.
scalar.db.graphql.graphiqlWhether the GraphQL server serves GraphiQL IDE.true
scalar.db.graphql.schema_checking_interval_millisInterval in milliseconds at which GraphQL server will rebuild the GraphQL schema if any change is detected in the ScalarDB schema.30000 (30 seconds)

Creating or modifying the ScalarDB schema when the server is running​

Since the GraphQL schema is statically built at server startup, if the ScalarDB schema is modified (for example, if a table is added, altered, or deleted), then the corresponding GraphQL schema won't reflect the changes unless it is rebuilt. To address this, the GraphQL server provides two mechanisms: a periodic check and an on-demand check.

Run periodic checks​

The server periodically checks if changes in the ScalarDB schema occur and rebuilds the corresponding GraphQL schema if necessary. By default, the check occurs every 30 seconds, but the interval can be configured by using the scalar.db.graphql.schema_checking_interval_millis property.

If you don't need to run periodic checks, you can disable it by setting the property value to -1.

Run on-demand checks​

You can also request the server to check changes in the ScalarDB schema and rebuild the corresponding GraphQL schema if necessary by performing a POST request to the /update-graphql-schema endpoint of the HTTP API.

For example, if the HTTP API is running on localhost:8080 and the scalar.db.graphql.path property is set to /graphql, this endpoint can be called by running the following command:

curl -X POST http://localhost:8080/graphql/update-graphql-schema

ScalarDB Cluster SQL Configurations​

The configurations for ScalarDB Cluster SQL are as follows:

NameDescriptionDefault
scalar.db.sql.enabledWhether ScalarDB Cluster SQL is enabled.false
scalar.db.sql.statement_cache.enabledEnable the statement cache.false
scalar.db.sql.statement_cache.sizeMaximum number of cached statements.100
scalar.db.sql.default_transaction_modeDefault transaction mode. TRANSACTION or TWO_PHASE_COMMIT_TRANSACTION can be set.TRANSACTION
scalar.db.sql.default_namespace_nameDefault namespace name. If you don't specify a namespace name in your SQL statement, this value is used.