メインコンテンツまでスキップ
バージョン: 3.18

Network Requirements

Before you deploy ScalarDB, you typically need to configure firewall rules so that the required network traffic between clients, ScalarDB components, and other Scalar products is allowed. This page lists the connections that you need to allow, including the direction, default port, and use case of each connection, organized by ScalarDB Cluster feature.

注記

The port numbers in the following tables are the default values. If you have changed the default ports in your configuration, use your custom port numbers instead when you configure firewall rules.

ScalarDB Core–related connections​

If you're embedding ScalarDB Core as a library in your application, rather than deploying ScalarDB Cluster, you must allow the following connections.

FromToPort (default)Use case example
Client applicationBackend databasesDepends on databaseReading/writing requests, including transaction metadata in the Coordinator table

For more details about the Coordinator table, see Consensus Commit Protocol.

ScalarDB Cluster–related connections​

If you're deploying ScalarDB Cluster, you must allow the following connections.

FromToPort (default)Use case example
Client (user applications)ScalarDB Cluster Node60053/TCPExecuting transactions
ScalarDB Cluster NodeScalarDB Cluster Node60053/TCPRouting transaction requests in the cluster internally
Scalar Admin for KubernetesScalarDB Cluster Node60053/TCPExecuting pause/unpause requests for backup operations
Scalar Admin for KubernetesKubernetes API server443/TCPGetting pod, service, and deployment information
Client (monitoring tools)ScalarDB Cluster Node9080/TCPScraping metrics of ScalarDB Cluster Node
ScalarDB Cluster NodeBackend databasesDepends on databaseReading/writing requests to backend databases
ScalarDB Cluster NodeKubernetes API server443/TCPWatching the Endpoints resource to discover cluster nodes
Client (direct-kubernetes mode)Kubernetes API server443/TCPResolving the cluster node IP addresses to connect to
ScalarDB Cluster NodeCluster DNS (Kubernetes)53/UDP, 53/TCPResolving hostname through DNS
注記

You can change these default ports by setting the following properties:

  • scalar.db.cluster.node.port: the Administrative API, Transaction API, SQL API, and administrator service (default: 60053)
  • scalar.db.graphql.port: the GraphQL interface (default: 8080)
  • scalar.db.cluster.node.prometheus_exporter_port: metrics (default: 9080)

If you configure scalar.db.cluster.node.admin.port to run the administrator service (pause, unpause, and checkPaused) on a dedicated port, that port must also be accessible. In this case, only the administrator service runs on that port, and scalar.db.cluster.node.port must remain accessible for the other gRPC APIs.

Authentication and authorization–related connections​

If you use OIDC-based JWT access tokens for authentication, you must allow the following connection.

FromToPort (default)Use case example
ScalarDB Cluster NodeOIDC IdPDepends on IdPFetching the OpenID provider metadata and the JWK Set to verify a JWT access token

For more details, see Control User Access via OIDC-Based JWT Access Tokens.

If you encrypt column values, you must allow the following connections, depending on the encryption key storage type you use.

FromToPort (default)Use case example
ScalarDB Cluster NodeHashiCorp VaultDepends on vault.addressEncrypting a column value before writing it (type=vault)
ScalarDB Cluster NodeKubernetes API server443/TCPReading/writing a data encryption key stored as a Kubernetes secret (type=self)

For more details, see Encrypt Data at Rest.

GraphQL interface–related connections​

If you use the GraphQL interface, you must allow the following connection.

FromToPort (default)Use case example
Client (user applications)ScalarDB Cluster Node8080/TCPExecuting GraphQL queries

For more details, see Getting Started with ScalarDB Cluster GraphQL.

If you export metrics and traces by using OpenTelemetry, you must allow the following connections.

FromToPort (default)Use case example
ScalarDB Cluster NodeOTLP endpoint for metrics (Collector)Depends on endpoint URLExporting metrics of a transaction
ScalarDB Cluster NodeOTLP endpoint for traces (Collector)Depends on endpoint URLExporting traces of a transaction

If you use remote replication for high availability, you must allow the following connections.

FromToPort (default)Use case example
ScalarDB Cluster Node (primary)Coordinator databaseDepends on databaseWriting a transaction state
ScalarDB Cluster Node (primary)Replication databaseDepends on databaseWriting a transaction log before the prepare phase
ScalarDB Cluster Node (backup)Coordinator databaseDepends on databaseChecking whether a transaction was committed before applying it
ScalarDB Cluster Node (backup)Replication databaseDepends on databaseGetting a transaction log and applying it to the backup database
ScalarDB Cluster Node (backup)ScalarDB Cluster Node (backup)60054/TCPReading a coordinator state cached on another node
Client (Replication CLI)ScalarDB Cluster Node60053/TCPGetting the replication status
注記

You can change this default port by setting the following property:

  • scalar.db.cluster.internal.node.port: reading coordinator states cached on other nodes (default: 60054). This port only needs to be reachable between cluster nodes and should typically be restricted from client and public networks.

For more details, see Replicate Data for High Availability.

Transaction Coordinator–related connections​

If you're deploying the Transaction Coordinator to manage two-phase commit transactions across multiple ScalarDB Cluster instances, you must allow the following connections.

FromToPort (default)Use case example
Client (user applications)Transaction Coordinator Node60055/TCPExecuting transaction management requests
Transaction Coordinator NodeTransaction Coordinator Node60055/TCPRouting transaction requests in the Transaction Coordinator cluster internally
Transaction Coordinator NodeScalarDB Cluster Node60053/TCPSending transaction management requests to ScalarDB Cluster Node (participants)
Transaction Coordinator NodeBackend databasesDepends on databaseReading/writing transaction metadata in the coordinator table
Transaction Coordinator NodeKubernetes API server443/TCPWatching the Endpoints resource to discover Transaction Coordinator Nodes
Scalar Admin for KubernetesTransaction Coordinator Node60055/TCPExecuting pause/unpause requests for backup operations
Client (monitoring tools)Transaction Coordinator Node9080/TCPScraping metrics of Transaction Coordinator Node
Transaction Coordinator NodeCluster DNS (Kubernetes)53/UDP, 53/TCPResolving hostname through DNS
注記

You can change these default ports by setting the following properties:

  • scalar.db.cluster.transaction_coordinator.port: the Transaction API (default: 60055)
  • scalar.db.cluster.transaction_coordinator.prometheus_exporter_port: metrics (default: 9080)

The Transaction Coordinator nodes communicate with each other by using the port specified by scalar.db.cluster.transaction_coordinator.port, which is the same port that clients use. Therefore, this port can't be restricted to communication between Transaction Coordinator nodes only.

If you configure scalar.db.cluster.transaction_coordinator.admin.port to run the administrator service (pause, unpause, and checkPaused) on a dedicated port, that port must also be accessible. In this case, only the administrator service runs on that port, and scalar.db.cluster.transaction_coordinator.port must remain accessible for the Transaction API.

Deprecated – Envoy-related connections for Transaction Coordinator
注意

Using Envoy in front of ScalarDB Cluster has been deprecated for performance reasons.

If you use Envoy in front of ScalarDB Cluster, you must allow the same connections described in Envoy-related connections instead of the connections from the client to ScalarDB Cluster Node in ScalarDB Cluster–related connections.

If you also use Envoy in front of ScalarDB Cluster for Transaction Coordinator participant requests, you must allow the following connection instead of the connection from Transaction Coordinator Node to ScalarDB Cluster Node in the previous table.

FromToPort (default)Use case example
Transaction Coordinator NodeEnvoy (for ScalarDB Cluster)60053/TCPSending transaction management requests to ScalarDB Cluster Node (participants)

Vector search interface–related connections​

If you use the vector search interface for embeddings, you must allow the following connections.

FromToPort (default)Use case example
ScalarDB Cluster NodeEmbedding model providersDepends on providersGenerating an embedding vector for a given text
ScalarDB Cluster NodeVector storesDepends on storesReading/writing vector data

For more details, see Getting Started with ScalarDB Cluster for Vector Search.

ScalarDB Analytics–related connections​

If you use ScalarDB Analytics, you must allow the following connections.

FromToPort (default)Use case example
Client (user applications)ScalarDB Analytics catalog service11051/TCPQuerying catalog metadata
Client (user applications)ScalarDB Analytics metering service11052/TCPReporting usage metering data
注記

The port that Apache Spark uses for ScalarDB Analytics depends on how you deploy your Spark cluster. For details about which ports to allow, see your Spark service provider's documentation.