# Logstash in distributed environment

**URL:** <https://discuss.elastic.co/t/logstash-in-distributed-environment/97677>\
**Category:** Logstash\
**Created:** [August 20, 2017, 8:09am UTC](https://discuss.elastic.co/t/logstash-in-distributed-environment/97677 "2017-08-20T08:09:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunvijayam](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@arunvijayam](https://discuss.elastic.co/u/arunvijayam)\
**Post date:** [August 20, 2017, 8:09am UTC](https://discuss.elastic.co/t/logstash-in-distributed-environment/97677/1 "2017-08-20T08:09:09Z")

</div>

Hi All,

Could any one tell me how logstash can be used in distributed environment

I want to configure logstash in distributed environment and have to run on ETL batch jobs in distributed environment.

Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 20, 2017, 9:59am UTC](https://discuss.elastic.co/t/logstash-in-distributed-environment/97677/2 "2017-08-20T09:59:40Z")

</div>

Please be more specific. What, exactly, does "distributed environment" mean? What's the end goal?

---

<div class="post-metadata">

**Author:** ![arunvijayam](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@arunvijayam](https://discuss.elastic.co/u/arunvijayam)\
**Post date:** [August 20, 2017, 2:08pm UTC](https://discuss.elastic.co/t/logstash-in-distributed-environment/97677/3 "2017-08-20T14:08:52Z")

</div>

Hi Magnusbaeuk,

Since I have to do ETL load for more than billion records from various databases. So If I run logstash in single node. It will take huge time. So, I planned to run the same conf file in many nodes. I am just asking you how to achieve it?. What are the configurations need in logstash.yml file?. I have to complete this task with lesser time and later the same script to be used for incremental load too.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 20, 2017, 6:20pm UTC](https://discuss.elastic.co/t/logstash-in-distributed-environment/97677/4 "2017-08-20T18:20:04Z")

</div>

There's no mechanism for Logstash instances to talk to each other so you have to figure out a way for them to work independently. A few options come to mind:

- Use different queries for each instance. Instance 1 only fetches rows whose id ends with 1 or 2, instance 2 only fetches rows whose is ends with 3 or 4, and so on.
- Use a message broker like Kafka or RabbitMQ as a buffer between some process that pull from the database (may or may not be Logstash) and the Logstash instances that work on the broker's queue.

---

<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:** [September 17, 2017, 6:20pm UTC](https://discuss.elastic.co/t/logstash-in-distributed-environment/97677/5 "2017-09-17T18:20:06Z")

</div>

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