---
title: "Run the examples"
url: "https://docs.yugabyte.com/stable/explore/cluster-setup-anywhere/"
---

# Run the examples

Set up clusters to run Explore examples.

Set up YugabyteDB to run Explore examples

Docs MCP Server

Developing with YugabyteDB? Access the YugabyteDB Docs AI from your IDE or CLI. See [Docs MCP Server](/stable/reference/docs-mcp-server/ "Docs MCP Server").

Use the following instructions to set up universes for running the examples in Explore.

- [![Server Icon](/icons/database.svg) Local](/stable/explore/cluster-setup-local/)
- [![Cloud Icon](/icons/cloud.svg) YugabyteDB Aeon](/stable/explore/cluster-setup-aeon/)
- [![Server Icon](/icons/server.svg) YugabyteDB Anywhere](/stable/explore/cluster-setup-anywhere/)

## Set up YugabyteDB universe

You can run examples using a universe, assuming you have [Installed](/stable/yugabyte-platform/install-yugabyte-platform/ "Installed") YugabyteDB Anywhere and [configured](/stable/yugabyte-platform/configure-yugabyte-platform/ "configured") it to run in AWS.

To run the examples, you need to create a single- or multi-node universe.

For instructions on creating a universe in YugabyteDB Anywhere, refer to [Create a multi-zone universe](/stable/yugabyte-platform/create-deployments/create-universe-multi-zone/ "Create a multi-zone universe").

## Set up YB Workload Simulator

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:

- [Horizontal scalability](/stable/explore/linear-scalability/scaling-universe-yba/ "Horizontal scalability")
- [Resiliency](/stable/explore/fault-tolerance/macos-yba/ "Resiliency")
- [Multi-region deployment](/stable/explore/multi-region-deployments/synchronous-replication-yba/ "Multi-region deployment")

The application uses the YugabyteDB JDBC [Smart Driver](/stable/develop/drivers-orms/smart-drivers/ "Smart Driver"), which features universe- and topology-aware connection load balancing. The driver automatically balances application connections across the nodes in a universe, and rebalances connections when a node fails. For more information, see [YB Workload Simulator](https://github.com/YugabyteDB-Samples/yb-workload-simulator/ "YB Workload Simulator").

### Download

YB Workload Simulator requires Java 11 or later installed on your computer. JDK installers for Linux and macOS can be downloaded from [Oracle](http://jdk.java.net/ "Oracle"), [Adoptium (OpenJDK)](https://adoptium.net/ "Adoptium (OpenJDK)"), or [Azul Systems (OpenJDK)](https://www.azul.com/downloads/?package=jdk "Azul Systems (OpenJDK)"). Homebrew users on macOS can install using `brew install openjdk`.

Download the YB Workload Simulator JAR file using the following command:

```sh
wget https://github.com/YugabyteDB-Samples/yb-workload-simulator/releases/download/v0.0.8/yb-workload-sim-0.0.8.jar
```

### Use the application

To start the application against a running YugabyteDB Anywhere universe, use the following command from a local terminal:

```sh
java -Dnode=<node_ip> \
      -Ddbname=<dbname> \
      -Ddbuser=<dbuser> \
      -Ddbpassword=<dbpassword> \
      -Dspring.datasource.hikari.data-source-properties.topologyKeys=<cloud.region.zone> \
      -jar ./yb-workload-sim-0.0.8.jar
```

Replace the following:

- `<node_ip>` - The IP address of the node in your YugabyteDB Anywhere universe. You can find this information by navigating to **Universes &gt; UniverseName &gt; Nodes** in YugabyteDB Anywhere.
- `<dbname>` - The name of the database you are connecting to (the default is `yugabyte`).
- `<dbuser>` and `<dbpassword>` - The user name and password for the YugabyteDB database.
- `<cloud.region.zone>` - The zones in your universe, comma-separated, in the format `cloud.region.zone`, to be used as topology keys for [topology-aware load balancing](/stable/develop/drivers-orms/smart-drivers/#topology-aware-load-balancing "topology-aware load balancing"). Node details are displayed in **Universes &gt; UniverseName &gt; Nodes**. For example, to add topology keys for a single-region multi-zone universe, you would enter the following:
  
  ```sh
  -Dspring.datasource.hikari.data-source-properties.topologyKeys=aws.us-east-1.us-east-1a,aws.us-east-1.us-east-1b,aws.us-east-1.us-east-1c
  ```

To view the application UI, navigate to `http://<machine_ip_or_dns>:8080` (for example, `http://localhost:8080`).

### Start a read and write workload

You can start a workload that performs read and write operations across all the nodes of the universe as follows:

1. In the [application UI](http://localhost:8080 "application UI"), click the hamburger icon at the top of the page beside Active Workloads for Generic.
2. Select **Usable Operations**.
3. Under **Create Tables**, click **Run Create Tables Workload** to add tables to the database.
4. Under **Seed Data**, click **Run Seed Data Workload** to add data to the tables.
5. Under **Simulation**, select the **Include new Inserts** option, and click **Run Simulation Workload**.
6. Click **Close**.

The Latency and Throughput charts show the workload running on the universe.
