This topic describes how to start RisingWave as a multi-node cluster. With this option, data is persisted in storage. However, please be aware that certain critical features such as failover and resource management are not implemented in this mode. Therefore, this option is not recommended for production deployments.
This option uses a pre-defined Docker Compose configuration file to set up a multi-node RisingWave cluster.
The cluster is composed of multiple RisingWave components, including:
- A frontend node
- A compute node
- A meta node
- A compactor node
RisingWave also incorporates these third-party components:
Download the source file and start a cluster
As prerequisites, you need to install Docker Desktop in your environment. Ensure that it is running before launching the cluster.
Then, clone the risingwave repository.
git clone https://github.com/risingwavelabs/risingwave.git
Now run the following commands to navigate to the
Start a RisingWave cluster
You can now start a RisingWave cluster. You can use the following storage options as the storage backend of RisingWave:
- S3 or S3-compatible storage
- Google Cloud Storage
- Alicloud OSS
- Azure Blob Storage
For each of the options, we have a Docker Compose configuraion file that you can use after necessary configurations.
This is the default option. To start a RisingWave cluster with MinIO as the storage backend, run the following command:
docker compose up -d
S3 or S3-compatible storage
To use S3 as the storage backend, configure your AWS credential information in
To use S3-compatible storage options like Tencent Cloud COS, you need to configure the endpoint via the
RW_S3_ENDPOINT parameter in
/docker/aws.env. Don't include the bucket name in the endpoint.
docker-compose-with-s3.yml, specify the bucket name via the
Run this command to start the RisingWave cluster:
docker-compose -f docker-compose-with-s3.yml up
Google Cloud Storage, Alibaba Cloud OSS, or Azure Blob Storage
Configure the credentias for the cloud service you want to use in
In the corresponding
docker-compose-with-xxx.yml file (for example,
docker-compose-with-gcs.yml for Google Cloud Storage), specify the bucket name via the
Run the following command to start the RisingWave cluster with one of the cloud storage service that you choose.
docker-compose -f docker-compose-with-xxx.yml up
Remember to replace the
docker-compose-with-xxx.yml with the full file name of the corresponding configuration file.
HADOOP_HOME in the volumns of the compactor node, the computer node, and the meta node.
/docker-compose-with-hdfs.yml, specify the cluster name via the
Run the following command to start a RisingWave cluster:
docker-compose -f docker-compose-with-hdfs.yml up
Connect to RisingWave
After RisingWave is up and running, you need to connect to it via the Postgres interactive terminal
psql so that you can issue queries to RisingWave and see the query results. If you don't have
psql installed, install
psql -h localhost -p 4566 -d dev -U root
Notes about the
-hoption is used to specify the host name or IP address of the PostgreSQL server to connect to.
-poption is used to specify the port number that the server is listening on.
-doption is used to specify the name of the database to connect to.
-Uoption is used to specify the name of the database user to connect as.
- By default, the PostgreSQL server uses the
rootuser account to authenticate connections to the
devdatabase. Note that this user account does not require a password to connect.
Manage your RisingWave cluster
When the cluster is running, you can monitor the status of RisingWave and the additional components and make adjustments when necessary.
Access the RisingWave Dashboard at http://127.0.0.1:5691/. RisingWave Dashboard displays an overview of the cluster, as well as sources, sinks, tables, materialized views, and indexes available on the cluster.
Access Grafana at http://127.0.0.1:3001/, and search for
risingwave_dashboard. In this dashboard, you can view the internal metrics such as node count, memory consumption, thoroughputs, and latencies. You can use these metrics to troubleshoot and optimize the cluster performance.
Access the MinIO instance at http://127.0.0.1:9400/. Use the following credentials to log in.
Access Prometheus at http://127.0.0.1:9500/. No credentials are needed. You can use Prometheus for real-time alerting.
Optional: Remove containers and data
If you don't need the RisingWave containers and the associated networks and persisted data, run the following command to delete them:
docker-compose down -v