Skip to main content

Step 1: Start RisingWave

The following options start RisingWave in the standalone mode. In this mode, data is stored in the file system and the metadata is stored in the embedded SQLite database. See About RisingWave standalone mode for more details. For extensive testing or single-machine deployment, consider starting RisingWave via Docker Compose. For production environments, consider RisingWave Cloud, our fully managed service, or deployment on Kubernetes using the Operator or Helm Chart.

Script installation

Open a terminal and run the following curl command.
To start a RisingWave instance, run the following command.

Docker

Ensure Docker Desktop is installed and running in your environment.
Ensure your hardware supports the required SIMD extensions (AVX2 for x86_64, NEON for ARM64). See SIMD requirements for Docker images for details.

Homebrew

Ensure Homebrew is installed, and run the following commands:

Step 2: Connect to RisingWave

Ensure you have psql installed in your environment. To learn about how to install it, see Install psql without PostgreSQL. Open a new terminal window and run:

Step 3: Insert some data

RisingWave supports both direct data insertion and streaming data ingestion from sources like message queues and database change streams. To keep things simple, we’ll demonstrate the approach of direct data insertion. Let’s create a table and insert some data. For instance, we can create a table named exam_scores to store information about examination scores.
Create the table
Insert five rows of data

Step 4: Analyze and query data

As an example, let’s create a materialized view to calculate the average score for each examination, and then view the current result of the materialized view.
Create a materialized view
Query the current result
As new data is received, the average_exam_scores materialized view will be automatically updated. RisingWave performs incremental computations in the background to keep the results up to date. Now, let’s insert five additional rows of data into the exam_scores table and query the latest result from the average_exam_scores materialized view. This will provide us with the updated average score for each examination.
Insert more data
Query the latest result

About RisingWave standalone mode

RisingWave standalone mode is a simplified deployment mode for RisingWave. It is designed to be minimal, easy to install, and configure. Unlike other deployment modes, for instance Docker Compose or Kubernetes, RisingWave standalone mode starts the cluster as a single process. This means that services like compactor, frontend, compute and meta are all embedded in this process. For state store, we will use the embedded LocalFs Object Store, eliminating the need for an external service like minio or s3; for meta store, we will use the embedded SQLite database, eliminating the need for an external service like etcd. By default, the RisingWave standalone mode will store its data in ~/.risingwave, which includes both Metadata and State Data. For a batteries-included setup, with monitoring tools and external services like kafka fully included, you can use Docker Compose instead. If you would like to set up these external services manually, you may check out RisingWave’s Docker Compose, and run these services using the same configurations.

Configure RisingWave standalone mode

The instance of RisingWave standalone mode can run without any configuration. However, there are some options available to customize the instance. The main options which new users may require would be the state store directory (--state-store-directory) and in-memory mode (--in-memory). --state-store-directory specifies the new directory where the cluster’s Metadata and State Data will reside. The default is to store it in the ~/.risingwave folder.
--in-memory will run an in-memory instance of RisingWave, both Metadata and State Data will not be persisted.
You can view other options with:

Monitoring RisingWave standalone mode with Grafana and Prometheus

To monitor your standalone cluster, you may wish to integrate metrics monitoring with Grafana and Prometheus. First install Grafana and Prometheus. Next, clone the RisingWave repository, it contains various configuration files. Start the RisingWave standalone cluster. Make sure you’re in the RisingWave directory. Start your prometheus instance:
Then start the Grafana instance:
Next, add the Prometheus Data Source on the Grafana Dashboard: http://localhost:3001/connections/datasources/prometheus.
Finally, add the User and Dev Dashboard: http://localhost:3001/dashboard/import. The file paths are grafana/risingwave-dev-dashboard.json, grafana/risingwave-user-dashboard.json. With that you can now monitor your standalone cluster with Grafana and Prometheus.

What’s next?

Congratulations! You’ve successfully started RisingWave and conducted some initial data analysis. To explore further, you may want to: