Esrally how to run two search queries parallelly
This was based on https://esrally.readthedocs.io/en/stable/track.html?highlight=parallel#running-tasks-in-parallel
Imagine a scenario where you want to send multiple search queries parallelly.
For that, use below track.json
{"version": 2,"description": "Tutorial benchmark for Rally Search","indices": [{"name": "customrecords","types": ["docs"]}],"schedule": [{"parallel": {"clients": 4,"warmup-iterations": 1000,"iterations": 9999,"tasks": [{"operation": {"name": "01-term-search","operation-type": "search","body": {"query": {"term": {"key_architecture": "RODSozpcCCyoYXIUPIsAVfnoubWyYNcMFpWtbQkXxUxEeiNGKa"}}}}},{"operation": {"name": "02-match-all-query","operation-type": "search","body": {"query": {"match_all": {}}}}}]}}]}
Save the file as track.json and use the below command in Centos to run it.
nohup /usr/local/bin/esrally — track-path=/home/usernamefolder/samfiles — target-hosts=https://demo-site.tools — pipeline=benchmark-only — client-options=”use_ssl:true,verify_certs:false,basic_auth_user:’username’,basic_auth_password:’password’,timeout:120" >> rally_stdout.log 2>> rally_stderr.log < /dev/null &
If the existing rally processes were their it won’t run so kill them.
pgrep esrally
kill -KILL pid
If it’s running parallelly, below screenshot should be displayed , that two queries are running together.
To see rally logs and the final result.
cd /home/username/.rally/logs