is not suitable for production deployments. Additionally, simulating multiple geographically distributed nodes on a single host is not representative of the in a production deployment. To learn more about production multi-region deployments, refer to and , and review the .
Before you begin
and .Step 1. Start the cluster
Use the following command to start the cluster. This particular combination of flags results in a demo cluster of 9 nodes, with 3 nodes in each region. It sets the appropriate and also simulates the network latency that would occur between nodes in these localities. For more information about each flag, see the documentation, especially for .- Viewing the :
http://127.0.0.1:8080. - Connecting to the database from a or a :
postgres://root@127.0.0.1:26257?sslmode=disable.
Step 2. Enter SQL statements at the prompt
Now that your simulated multi-region cluster is running, you are presented with a SQL prompt:Step 3. View cluster health and performance in the DB Console
The gives you insight into the overall health of your cluster, as well as the performance of any . To verify that the 9 nodes you specified are up and running as expected, go to the at http://localhost:8080/#/overview/list.Capacity metrics can be incorrect when running multiple nodes on a single machine. For more details, see this .
- The page at http://localhost:8080/#/databases shows details about your databases and tables.
- The page at http://localhost:8080/#/statements is used to assess the performance of specific queries.
- The page at http://localhost:8080/#/jobs is used to monitor the status of long-running operations like .
Step 4. Wipe the cluster
When you’re done with your demo cluster, you can wipe the cluster by typing the command shown below at the SQL prompt. Note that because this is a temporary, in-memory cluster, this will wipe any data you have added to the cluster. For more information, see the documentation.What’s next?
- for your preferred language
- Learn more about and the
- Further explore CockroachDB capabilities like:

