Confluent的Kafka REST Proxy与Kafka Client [英] Confluent's Kafka REST Proxy vs Kafka Client

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

问题描述

我对Confluent的Kafka REST Proxy和使用kafka官方客户端库实现的生产者/消费者的优缺点感到好奇。
i知道Confluent的Kafka REST Proxy用于管理任务和kafka客户端不支持的语言。

I am curious about the advantages and disadvantages of Confluent's Kafka REST Proxy and the producer/consumer implemented with the kafka official client library. i know that Confluent's Kafka REST Proxy is used for administrative tasks and for languages ​​not supported by the kafka client.

那么, kafka客户端?

So, what are the advantages of the kafka client?

推荐答案

本机客户端的一个优势是通过直接TCP传递给代理而不是往返HTTP序列化的原始性能。 + JVM序列化在REST代理内进行。

One advantage of a native client would be raw performance via direct TCP to the brokers rather than round trip HTTP serialization + JVM serialization taking place within the REST Proxy.

上述缺点是可能以各种语言为所有客户维护安全策略;否则任何人都可以制作和使用其他人的主题。如果您没有多租户Kafka集群,那么也许这不是一个因素。与REST代理相比,只有一个SSL证书,但是对主题使用ACL仍然是一个好主意。

A disadvantage with the above could be maintaining security policies for all your clients in various languages; otherwise anyone could produce and consume any one's other topics. If you don't have a multi-tenant Kafka cluster, maybe that's not a factor. Compared to the REST proxy, there's only one SSL cert, but having ACLs on topics might still be a good idea.

REST代理的明显优势是任何HTTP客户端都可以使用标准接口进行交易。除了代理本身支持的功能外,无需在客户端中区分Kafka版本或受支持的API。但是,随着时间的流逝,随着客户的发展,这将变得越来越少。

The obvious advantage of the REST proxy is that there's a standard interface for any HTTP client to transact with. There's no need to distinguish Kafka versions or supported APIs in clients besides what the proxy itself supports. Over time, though, this will become less and less needed as clients are being developed.

此外,您先前的问题 Kafka REST Proxy API有什么好处?

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

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