[英]Logstash high availability deployment
I am using logstash in a mode where it reads log files from disk and puts in ElasticSearch. 我使用logstash在其从磁盘中读取日志文件,并在ElasticSearch提出的模式。
What is the best way to deploy logstash for high availability (especially failover)? 部署logstash以获得高可用性(尤其是故障转移)的最佳方法是什么? I'm ok with both active/active mode where two logstash instances are always active, and with active/passive mode where one instance is working and the other one will start only if the first one is down.
对于两个logstash实例始终处于活动状态的主动/主动模式,以及一个实例正在工作而另一个实例仅在第一个实例关闭时才能启动的主动/被动模式,我都可以。
I'm specifically asking about logstash and not ElasticSearch. 我专门问的是logstash,而不是ElasticSearch。
It seems, that Logstash does not have built in HA options, where we remain with Linux classic - Virtual IP. Logstash似乎没有内置的HA选项,而我们仍然使用Linux经典版本-虚拟IP。 I was thinking on the same topick, and currently decided to try the following option (hot/cold version):
我在考虑相同的主题,因此决定尝试以下选项(热/冷版本):
Here are issues, that need to be solved out, yet: 这里是需要解决的问题:
As far as I know, Active/Active Logstash is available only with the following options taken in mind: 据我所知,Active / Active Logstash仅在考虑以下选项的情况下可用:
You could use a queue that will act as a buffer between input and indexing process. 您可以使用一个队列,该队列将充当输入和索引过程之间的缓冲区。
It's always a good thing to separate tier with a queue, so if elasticsearch crashs, your application will not suffer. 用队列分隔层始终是一件好事,因此,如果Elasticsearch崩溃,您的应用程序将不会受到影响。
在这种情况下,最好的方法是使用某种硬件平衡器,例如F5(如果有的话)池,因此您要定义具有相应端口的VIP,然后将该VIP与主机的N个IP地址相关联。 N个logstash主机,因此您可以从logstash中获得任意数量的节点或需要运行的任何服务,然后应用循环算法并平衡连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.