# Rally does not work for multiple Elasticsearch clusters

**URL:** <https://discuss.elastic.co/t/rally-does-not-work-for-multiple-elasticsearch-clusters/224006>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [March 17, 2020, 11:43pm UTC](https://discuss.elastic.co/t/rally-does-not-work-for-multiple-elasticsearch-clusters/224006 "2020-03-17T23:43:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![b\_hossein](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@b\_hossein](https://discuss.elastic.co/u/b_hossein)\
**Post date:** [March 17, 2020, 11:43pm UTC](https://discuss.elastic.co/t/rally-does-not-work-for-multiple-elasticsearch-clusters/224006/1 "2020-03-17T23:43:09Z")

</div>

I have the following configuration to run esrally:  
"target\_hosts.json"

> {  
> "default": [  
> {"host": "127.0.0.1", "port": 9200},  
> {"host": "127.0.0.1", "port": 9201}  
> ],  
> "remote":[  
> {"host": "10.1.1.1", "port": 9200},  
> {"host": "10.1.1.2", "port": 9200}  
> ]  
> }

And I made my multiple Elasticsearch clusters as follows:

> curl -XPUT '127.0.0.1:9200/\_cluster/settings' -H 'Content-Type: application/json' -d '  
> {  
> "persistent": {  
> "cluster": {  
> "remote": {  
> "node1": {  
> "seeds": ["10.1.1.1:9300"]  
> }  
> }  
> }  
> }  
> }'

and two clusters are connected successfully.

I used the following rally command to get the performance of the multiple Elasticsearch clusters:

> esrally --offline --track=eventdata --target-hosts="target\_hosts.json" --pipeline=benchmark-only --challenge=append-no-conflicts --track-params='number\_of\_shards:4, number\_of\_replicas:0'

rally start to benchmark the clusters, but unfortunately, it did not use the remote cluster and just put 4 shards on the local cluster and finished the benchmarking.  
Could you please let me know, what is wrong with this configuration? Is there any link that I can follow to run this benchmark.

---

<div class="post-metadata">

**Author:** ![dliappis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dliappis/32/56174_2.png) [@dliappis](https://discuss.elastic.co/u/dliappis)\
**Post date:** [March 18, 2020, 8:37am UTC](https://discuss.elastic.co/t/rally-does-not-work-for-multiple-elasticsearch-clusters/224006/2 "2020-03-18T08:37:08Z")

</div>

In terms of bulk indexing Rally will always use the cluster specified in `default`.

Out of the box, the `node-stats` and `ccr-stats` telemetry devices are capable of taking advantage of the remote cluster. See the note in [Advanced topics/target-hosts](https://esrally.readthedocs.io/en/stable/command_line_reference.html#id1):

**All** [built-in operations](https://esrally.readthedocs.io/en/stable/track.html#track-operations) will use the connection to the `default` cluster. However, you can utilize the client connections to the additional clusters in your [custom runners](https://esrally.readthedocs.io/en/stable/adding_tracks.html#adding-tracks-custom-runners).

So if you need additional operations done by Rally towards the remote cluster you can use a custom runner targeting the remote [custom runners](https://esrally.readthedocs.io/en/stable/adding_tracks.html#adding-tracks-custom-runners)

You can also take a look at this recipe: [https://esrally.readthedocs.io/en/stable/recipes.html#testing-rally-against-ccr-clusters-using-a-remote-metric-store](https://esrally.readthedocs.io/en/stable/recipes.html#testing-rally-against-ccr-clusters-using-a-remote-metric-store)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2020, 8:37am UTC](https://discuss.elastic.co/t/rally-does-not-work-for-multiple-elasticsearch-clusters/224006/3 "2020-04-15T08:37:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
