# Multiple logstash instances listening to the same redis channel

**URL:** <https://discuss.elastic.co/t/multiple-logstash-instances-listening-to-the-same-redis-channel/323506>\
**Category:** Logstash\
**Created:** [January 19, 2023, 12:05pm UTC](https://discuss.elastic.co/t/multiple-logstash-instances-listening-to-the-same-redis-channel/323506 "2023-01-19T12:05:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trondhindenes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trondhindenes/32/10534_2.png) [@trondhindenes](https://discuss.elastic.co/u/trondhindenes)\
**Post date:** [January 19, 2023, 12:05pm UTC](https://discuss.elastic.co/t/multiple-logstash-instances-listening-to-the-same-redis-channel/323506/1 "2023-01-19T12:05:29Z")

</div>

We're using redis to pass data between logstash instances. I have 2 logstash instances currently with the same config:

```auto
input {
    redis {
        data_type => "channel"
        host => "${REDIS_HOST}"
        key => "logs"
        id => "logs"
    }
}

```

This results in duplicate data in Elasticsearch, so I'm guessing each logstash node will read the same data and write it to elasticsearch.

Is it possible to use the redis input in a way where this doesn't occur? I would assume logstash would use some mechanism to ensure that data duplication didn't occur. I can't see anything in the documentation about how to go about solving this.

---

<div class="post-metadata">

**Author:** ![trondhindenes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trondhindenes/32/10534_2.png) [@trondhindenes](https://discuss.elastic.co/u/trondhindenes)\
**Post date:** [January 19, 2023, 12:33pm UTC](https://discuss.elastic.co/t/multiple-logstash-instances-listening-to-the-same-redis-channel/323506/2 "2023-01-19T12:33:21Z")

</div>

I ended up switching from `channel` to `list`, which seems to work a lot better in a setup with multiple logstash nodes

---

<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:** [February 16, 2023, 12:33pm UTC](https://discuss.elastic.co/t/multiple-logstash-instances-listening-to-the-same-redis-channel/323506/3 "2023-02-16T12:33:30Z")

</div>

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