본문 바로가기
Open Source/Apache Kafka

Apache Kafka 3.0 RELEASE

by Remover 2021. 10. 2.
반응형

Apache Kafka 3.0이 최근 RELEASE 되었습니다.

해서 어떤 부분이 바뀌었는지 간단하게 정리해보았습니다.

자세한 내용은 아래 원문에서 확인해주세요.

 

원문 : https://www.confluent.io/blog/apache-kafka-3-0-major-improvements-and-new-features/

 

Apache Kafka 3.0 - Major Improvements, Breaking API Changes, and New Features

AK 3.0 introduces major improvements to KRaft (Kafka's ZooKeeper replacement), KStreams, Kafka Connect, MirrorMaker 2, the strongest producer delivery guarantees, and more.

www.confluent.io

 

1. Java 8 지원 중단

JAVA LTS(11, 17)에 최신 버전에 대해서만 지원을 할 예정이기 때문에 Java 8에 대한 지원이 중단되었습니다. 4.0부터는 Java 8 코드가 모두 제거 될 예정입니다.


2. Scala 2.12 지원 중단

Java와 마찬가지로 Scala 2.12 역시 Scala 3.0이 나오면서 지원에서 제거 된 것으로 확인 됩니다. 4.0부터 Scala 2.12 코드는 모두 제거 예정이라고 하네요.


3. KRaft

https://developer.confluent.io/learn/kraft/

 

KRaft - Apache Kafka® without Zookeeper

Apache Kafka® Raft (KRaft) simplifies Kafka architecture by consolidating metadata into Kafka, removing the ZooKeeper dependency. Learn how it works, benefits, and what this means for Kafka's scalability.

developer.confluent.io

 

KRaft는 Metadata 관리를 위해 Zookeeper를 사용하던 Kafka의 종속성을 제거하기 위해 도입 된 프로토콜입니다.

Zookeeper를 통해 Leader 등의 Metadata를 관리 되던 부분이 Kafka 자체적으로 Quorum(쿼럼) 컨트롤러를 통해 Leader 등의 Metadata를 관리 할 수 있게 변경 되었습니다.

 

> 변경으로 인한 이점

 

1) Kafka Partition 수의 확장

이전에는 Broker 당 2,000~4,000개, Cluster 내에서 10,000 개의 파티션으로 제한하는것을 추천하였습니다.

 

https://blogs.apache.org/kafka/entry/apache-kafka-supports-more-partitions#:~:text=Apache%20Kafka%20Supports%20200K%20Partitions%20Per%20Cluster%20%3A%20Kafka

 

Apache Kafka Supports 200K Partitions Per Cluster : Kafka

Apache Kafka Supports 200K Partitions Per Cluster In Kafka, a topic can have multiple partitions to which records are distributed. Partitions are the unit of parallelism. In general, more partitions leads to higher throughput. However, there are some facto

blogs.apache.org

 

그 이유는 Metatdata를 Zookeeper가 관리하고 있다보니 비정상적으로 Broker가 종료되는 경우 서비스 복구 까지 시간이 오래 걸리는 문제가 있었지만 3.0에서는 이 부분을 Quorum Controller로 변경함으로써 성능향상을 이루어 냈습니다.

2) 안정성 개선과 소프트웨어 단순화

3) 전체 시스템에 대한 단일 보안 모델을 가지게 됨.

 


4. List<T> 직렬화 및 역직렬화 지원

List<T> 에 대한 직/역직렬화를 직접 구현해서 사용하였어야 하나 ArrayList, LinkedList에 대한 직/역직렬화를 지원합니다.


5. Stream 시 Offset 정보 및 Consumer Lag 정보 제공

Stream 으로 Event Consuming 시 Offset 정보와 Consumer Lag 정보를 알 수 있습니다.


Quorum Controller 사용으로 인한 API 변경 등 많은 부분들이 바뀌었습니다.

가장 많이 바뀐 부분은 Zookeeper에 대한 종속성이 제거 되었다는 것이 가장 큰 변경점으로 보여집니다.

 

댓글