CnosDBAbout 7 minAbout 2075 words


This page provides some instructions for installing, starting, and configuring CnosDB.

CnosDB contains two services: CnosDB meta and CnosDB, named with cnosdb-meta and cnosdb.

CnosDB meta is used to maintain the consistency of the cluster. It stores the metadata in the cluster, including the topology of the cluster, the distribution of replicas, the distribution of data, etc.

CnosDB is used to store data from a database.

CnosDB meta Network port:

  • TCP 8901 : The communication port used for inter-Meta services, but also responsible for receiving requests from cnosdb.

CnosDB Network port:

  • TCP 8902 : indicates the http listening port for receiving requests from the client.
  • TCP 8903 : Grpc listening port, used to receive GRPC requests from clients.
  • TCP 8904 : Listening port of the Flight RPC, used to receive client requests of the Flight SQL protocol.
  • TCP 8905 : Indicates the TCP listening port of CnosDB, which is used to receive TCP client requests.

Start a CnosDB Instance

docker run --name cnosdb -p 8902:8902 -d cnosdb/cnosdb:community-latest cnosdb run -M singleton

Start a CnosDB Cluster

In CnosDB, the cnosdb program has a variety of startup modes

  • singleton : meta, storage, and query services all reside in the same instance. Cluster mode is not supported.
  • query_tskv : provides query and storage services in cluster mode.
  • query : The instance provides only the query service and supports the cluster mode.
  • tskv : The instance provides only storage services and supports cluster mode.


CnosDB is hybrid deployment enabled, and you can customize the number of queries and storage services. However, a complete cluster contains at least one meta service, one query service, and one storage service.

So in your CnosDB cluster, your collocation should look at least like this:

  • 1 meta service
  • One query_tskv service


  • 1 meta service
  • 1 query service
  • 1 tskv service

In general, multiple meta services are deployed within a cluster service to ensure high availability of the cluster.

The cluster in this article is based on a 3 + 2 cluster distributed cluster, namely three meta services and two query_tskv services.


The engineers are actively developing the Sandbox and it is not guaranteed to work at this stage.

  1. Clone the repository
    git clone
  2. Start the cluster
    cd distributed-sandbox
    chmod +x ./