So we have a bunch of servers running on EC2 Amazon Web Services, and are looking to set up logstash/elasticsearch for distributed logging.
From what I read there are several options generally chosen:
- logstash on each server node, using the File input filter and going directly to ElasticSearch cluster as an output filter
- logstash on each server node, using the logstash forwarder, connecting to a logstash on the ElasticSearch cluster, which forwards it to ElasticSearch as an output filter
- logstash on each server node, using the File input filter and using Redis as a queue. Then a logstash on each ElasticSearch node picking up from redis and passing to ElasticSearch.
There are also variants using AsyncAppender (which has a not so good reputation).
I am tempted to choose #1, particular since we are using a patternLayout that automatically converts to JSON. So we'll save extra files with the JSON on each server node, and have a File input send directly to ElasticSearch.
What are the negatives of this? Why is a queue/broker often recommended?