# Are dataset values unique across bot groups?

> When the same dataset is used by more than one bot group, each group gets its own copy, so unique-per-bot values are not unique across groups.

Source: https://loadster.com/faqs/dataset-values-unique-across-bot-groups/

Within a single bot group, yes — but **not** across multiple bot groups, and this catches people off guard
fairly often.

When you run a load test, each [bot group](https://loadster.com/manual/load-test-scenarios/) runs as an independent cluster. The cluster
manager for a group downloads its own copy of any [dataset](https://loadster.com/manual/dynamic-datasets/) the group's script references,
and keeps track of each bot's position in that copy. Nothing about a dataset's position is shared between groups.

So if two groups run a script that pulls from the same dataset, each group works through its own private copy. A bot
in group one and a bot in group two can end up using the same row (the same email address, account, or search phrase),
at the same moment.

For example, with a dataset of unique email addresses and two groups running the same login script (each pulling a new
email *sequentially* *for each bot*), group one might hand `qa+user1@example.com` to its first bot, and group two will
independently hand the *same* `qa+user1@example.com` to its first bot, because neither group knows what the other is
doing.

## Why it works this way

It's a deliberate trade-off. Coordinating a single shared cursor across every bot, engine, and cloud region would
create a central bottleneck that every bot has to wait on for its next value. Giving each group its own copy is what
lets datasets scale cleanly to large tests spread across many engines and regions.

## How to keep values unique everywhere

If your test genuinely needs every bot to use a unique value regardless of how many groups are running, you have a
couple of options:

* **Run all the bots in a single group.** Within one group, when you select values *sequentially* *for each bot*, the
  cluster manager hands each row to only one bot at a time (until it reaches the end of the dataset and wraps around),
  so values stay unique.

* **Bind a different dataset to each group.** You can keep using a single script and
  [override its variables per bot group](https://loadster.com/manual/load-test-scenarios/#overriding-script-variables) in the scenario
  editor, pointing each group at a different dataset so their values don't overlap.

Either way, in most cases you'll want your dataset (or each group's dataset) to have at least as many rows as there are
bots. Once a group reaches the end of a dataset, it starts over from the beginning, and values will repeat. (That can
be intentional (for example, a few values you want bots to cycle through), but if you need unique values, size the
dataset accordingly.)

For more background, see [Datasets and Bot Groups](https://loadster.com/manual/dynamic-datasets/#datasets-and-bot-groups).

