# Does using a script in elastic output plugin for Logstash impact's performance

**URL:** <https://discuss.elastic.co/t/does-using-a-script-in-elastic-output-plugin-for-logstash-impacts-performance/197547>\
**Category:** Logstash\
**Created:** [August 30, 2019, 3:43pm UTC](https://discuss.elastic.co/t/does-using-a-script-in-elastic-output-plugin-for-logstash-impacts-performance/197547 "2019-08-30T15:43:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Goyal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_goyal/32/46306_2.png) [@Rahul\_Goyal](https://discuss.elastic.co/u/Rahul_Goyal)\
**Post date:** [August 30, 2019, 3:43pm UTC](https://discuss.elastic.co/t/does-using-a-script-in-elastic-output-plugin-for-logstash-impacts-performance/197547/1 "2019-08-30T15:43:00Z")

</div>

Hi,

I am trying to insert data from multiple Kafka topics to ES. However, there are scenarios where I need to append message in an existing array or update message in multiple JSON documents, for which I am using the "script" in the ES output plugin.

I wanted to know does it impact the overall performance, for the JSON to be processed by logstash, thereafter indexed and updates available in ES index.

Thanks,  
Rahul

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 30, 2019, 4:43pm UTC](https://discuss.elastic.co/t/does-using-a-script-in-elastic-output-plugin-for-logstash-impacts-performance/197547/2 "2019-08-30T16:43:51Z")

</div>

Yes, an update is always more costly than indexing a new document where Elasticsearch sets the id.

---

<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 27, 2019, 4:43pm UTC](https://discuss.elastic.co/t/does-using-a-script-in-elastic-output-plugin-for-logstash-impacts-performance/197547/3 "2019-09-27T16:43:55Z")

</div>

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