# Buffer between logstash and elasticsearch

**URL:** <https://discuss.elastic.co/t/buffer-between-logstash-and-elasticsearch/33124>\
**Category:** Logstash\
**Created:** [October 28, 2015, 6:39am UTC](https://discuss.elastic.co/t/buffer-between-logstash-and-elasticsearch/33124 "2015-10-28T06:39:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![camarasingham](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@camarasingham](https://discuss.elastic.co/u/camarasingham)\
**Post date:** [October 28, 2015, 6:39am UTC](https://discuss.elastic.co/t/buffer-between-logstash-and-elasticsearch/33124/1 "2015-10-28T06:39:35Z")

</div>

Hi All,

We are using logstash tcp/udp json input plugin and the elasticsearch output plugin. I was wondering if there was a buffer of sorts between the two, so that, if the elasticsearch instance is restarted, messages are not lost.

I have read about using redis as a broker and so forth, redis seems to be installed on our server, but I can't find any association with it and logstash. I have also come across a queue depth of 20, hardcoded it seems, and was wondering if that was some kind of buffer. If so, is it persistent so that it can survive a logstash restart? and can it be increased?

Kind Regards,  
Chandra

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 28, 2015, 6:40am UTC](https://discuss.elastic.co/t/buffer-between-logstash-and-elasticsearch/33124/2 "2015-10-28T06:40:43Z")

</div>

You need to use the redis output/input to use it with LS. So TCP/UDP \> LS \> Redis \> LS \> ES.

> [@camarasingham](#):
>
> I have also come across a queue depth of 20, hardcoded it seems, and was wondering if that was some kind of buffer. If so, is it persistent so that it can survive a logstash restart? and can it be increased?

"Some kind" yes. Persistent, no. Increased, no.  
Use Redis for now 🙂

---

<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:** [July 6, 2017, 5:25am UTC](https://discuss.elastic.co/t/buffer-between-logstash-and-elasticsearch/33124/3 "2017-07-06T05:25:07Z")

</div>


