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

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

问题描述

Log stash 与 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天全站免登陆