Question on logstash output to redis

in logstash 2.3, it says in redis it support host as array like below:
Does anyone know when i configure multiple server, the message are duplicated to those servers or load balanced to those servers???

host
Value type is array
Default value is ["127.0.0.1"]
The hostname(s) of your Redis server(s). Ports may be specified on any hostname, which will override the global port config.

For example:

"127.0.0.1"
["127.0.0.1", "127.0.0.2"]
["127.0.0.1:6380", "127.0.0.1"]

Hello,

The message are not duplicated on multiple redis:
The output behavior is the following:

  • when logstash start it will pickup a random server from the list.
  • On disconnect it will pickup another server from the list.

FYI - https://github.com/logstash-plugins/logstash-output-redis/pull/32

hi Pier, Thanks for your reply.
it makes me think how about logstash output to elasticsearch? it also supports hosts as array. Do you know the output behavior is it the same as output to redis?

output {
elasticsearch {
hosts => ["fslelkprod01", "fslelkprod02", "fslelkprod03"]
index => "host-%{+YYYY.MM.dd}"
workers => 4
}
}

It does the same, it also load balances requests.

the same? based on Pier's reply, my understanding is it is not load balanced, it only connects to 1 server at same time, the rest of servers are only "backup". Please correct me if I am wrong.

Pier was talking about the redis output, you asked about Elasticsearch.

As you said "it does the same" makes me a little confused. ok my bad. :slight_smile:
thanks for your reply anyway!