docs/content/v2.25/explore/cluster-setup-local.md
Use the following instructions to set up universes for running the examples in Explore.
<ul class="nav nav-tabs-alt nav-tabs-yb"> <li> <a href="../cluster-setup-local/" class="nav-link active"> Local
</a>
YugabyteDB Aeon
</a>
YugabyteDB Anywhere
</a>
You can run examples using a universe set up on your local machine, assuming you have Installed YugabyteDB.
Use the yugabyted utility to create and manage universes.
If a local universe is currently running, first destroy it.
You can create a single-node local universe with a replication factor (RF) of 1 by running the following command:
./bin/yugabyted start --advertise_address=127.0.0.1
Or, if you are running macOS Monterey, use the following command:
./bin/yugabyted start --advertise_address=127.0.0.1 \
--master_webserver_port=9999
To check the status of a running single-node universe, run the following command:
./bin/yugabyted status
For more information, refer to Quick Start.
The following instructions show how to simulate a multi-node universe on a single computer. To deploy an actual multi-zone universe using yugabyted, follow the instructions in Create a multi-zone cluster.
{{<setup/local>}}
To run the examples in your universe, you use either the ysqlsh or ycqlsh CLI to interact with YugabyteDB via the YSQL or YCQL API.
You can start ysqlsh as follows:
./bin/ysqlsh
ysqlsh (15.2-YB-{{<yb-version version="v2.25">}}-b0)
Type "help" for help.
yugabyte=#
You can start ycqlsh as follows:
./bin/ycqlsh
Connected to local cluster at 127.0.0.1:9042.
[ycqlsh 5.0.1 | Cassandra 3.9-SNAPSHOT | CQL spec 3.4.2 | Native protocol v4]
Use HELP for help.
ycqlsh>
YB Workload Simulator is a Java application that simulates workloads against YugabyteDB and provides live metrics of latency and throughput from the application's point of view.
The application is used to demonstrate the following Explore topics:
The application uses the YugabyteDB JDBC Smart Driver, which features universe- and topology-aware connection load balancing. The driver automatically balances application connections across the nodes in a universe, and re-balances connections when a node fails. For more information, see YB Workload Simulator.
YB Workload Simulator requires Java 11 or later installed on your computer. {{% jdk-setup %}}
Download the YB Workload Simulator JAR file using the following command:
wget https://github.com/YugabyteDB-Samples/yb-workload-simulator/releases/download/v0.0.8/yb-workload-sim-0.0.8.jar
To start the application against a running local universe, use the following command:
java -jar \
-Dnode=127.0.0.1 \
./yb-workload-sim-0.0.8.jar
The -Dnode flag specifies the IP address of the node to which to connect.
The -Dspring.datasource flag enables topology-aware load balancing for the application connections. If you created a universe using different zones, replace the zones with the corresponding zones in your universe, comma-separated, in the format cloud.region.zone.
To view the application UI, navigate to http://<machine_ip_or_dns>:8080 (for example, http://localhost:8080).
You can start a workload that performs read and write operations across all the nodes of the universe as follows:
The Latency and Throughput charts show the workload running on the universe.