Confluent's Kafka REST Proxy vs Kafka Client

萝らか妹 提交于 2019-12-21 23:32:14

问题


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.

So, what are the advantages of the kafka client?


回答1:


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.

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.

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.

Also, your previous question What are the benefits of the Kafka REST Proxy API?




回答2:


With the REST proxy, it's much easier to run admin tasks without having to use the lower level Kafka protocol. You can do things like view the state of the cluster, for example. It basically allows you to do the same thing as you would at a lower level but in an easier way.



来源:https://stackoverflow.com/questions/51097721/confluents-kafka-rest-proxy-vs-kafka-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!