Logo
Cluster Deployment

Cluster Deployment #

Scenarios

Considering the deployment scenarios of users, SphereEx-DBPlusEngine provides three operation modes, and cluster mode is one of them. Cluster mode is the recommended production deployment mode for SphereEx-DBPlusEngine. In the cluster mode, the horizontal capacity expansion can be achieved by adding computing nodes. At the same time, multi-node deployment is also the basis to ensure the high availability of services.

  • Operation Mode

Cluster mode is one of the operation modes of SphereEx-DBPlusEngine. Cluster mode is applicable to the deployment of production environment. In addition to cluster mode, SphereEx-DBPlusEngine also provides memory mode and stand-alone mode, which are used for integration test and local development test respectively. Unlike stand-alone mode, memory mode does not persist any metadata and configuration information, all modifications take effect in the current process. The operation mode of SphereEx-DBPlusEngine covers all scenarios of users from development to test and production deployment.

  • Registration Center

The registry center is the basis for the implementation of the cluster mode. SphereEx-DBPlusEngine realizes the sharing of metadata and configuration in the cluster environment by integrating the third-party registry components ZooKeeper and etcd. At the same time, with the help of the notification and coordination ability of the registry center, it ensures the real-time synchronization of the cluster when the shared data changes.

Prerequisites

Take DBPlusEngine-Proxy as an example, download and unzip the proxy, refer to the following configuration, configure the corresponding configuration file in the conf directory, and then start the proxy.

Configuration Example

If the cluster mode needs to be enabled in the production environment, it needs to be enabled by configuring mode tag in server.yaml:

mode:
  type: Cluster
  repository:
    type: ZooKeeper
    props:
      namespace: governance_ds
      server-lists: localhost:2181
      retryIntervalMilliseconds: 500
      timeToLiveSeconds: 60
      maxRetries: 3
      operationTimeoutMilliseconds: 500

At the same time, when multiple compute nodes need to be added to the cluster, it is necessary to ensure that the configurations of ‘namespace’ and ‘server lists’ are the same to ensure that these compute nodes work in the same cluster.