Logstash与Kafka有何不同 [英] How Logstash is different than Kafka

查看:93
本文介绍了Logstash与Kafka有何不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

日志存储与Kafka有何不同?如果两者相同,哪个更好?以及如何?

How Log stash is different than Kafka? and if both are same which is better? and How?

我发现这两个都是可以将数据推入进一步处理的管道.

I found both are the pipelines where one can push the data for further processing.

推荐答案

Kafka比Logstash强大得多.为了将数据从PostgreSQL同步到ElasticSearch,Kafka连接器可以对Logstash进行类似的工作.

Kafka is much more powerful than Logstash. For syncing data from such as PostgreSQL to ElasticSearch, Kafka connectors could do the similar work with Logstash.

一个主要的区别是:Kafka是一个集群,而Logstash基本上是单个实例.您可以运行多个Logstash实例.但是这些Logstash实例彼此不知道.例如,如果一个实例发生故障,其他实例将无法接管其工作.Kafka自动处理该节点.而且,如果您将Kafka连接器设置为以分布式模式工作,则其他连接器可以接管向下连接器的工作.

One key difference is: Kafka is a cluster, while Logstash is basically single instance. You could run multiple Logstash instances. But these Logstash instances are not aware of each other. For example, if one instance goes down, others will not take over its work. Kafka handles the node down automatically. And if you set up Kafka connectors to work in the distributed mode, other connectors could take over the work of the down connector.

Kafka和Logstash也可以一起工作.例如,在每个节点上运行Logstash实例以收集日志,然后将日志发送到Kafka.然后,您可以编写Kafka消费者代码以执行所需的任何处理.

Kafka and Logstash could also work together. For example, run a Logstash instance on every node to collect logs, and send the logs to Kafka. Then you could write the Kafka consumer code to do any handling you want.

这篇关于Logstash与Kafka有何不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆