https://www.pepperdata.com/blog/kafka-optimization-four-best-practices/
Kafka Optimization: Boost Kafka Performance | Pepperdata
Kafka is important for leveraging big data, but optimizing Kafka performance can be hard. Here are 4 Kafka optimization best practices to start with.
www.pepperdata.com
요약
- Upgrade to the latest version of Kafka.
- 2021 년 7월 릴리즈된 버젼부터는 zookeeper 가 없어도 구동이 가능하게끔 변경되었(오호호호 관리포인트 하나 줄어듬?)
- Understand data throughput rates.
- The data-rate-per-partition is the average size of the message multiplied by the number of messages-per-second. Put simply, it is the rate at which data travels through the partition. Desired throughput rates dictate the target architecture of the partitions.
- 메트릭 측정에 대해서 알아야 한다.. 뭐.. 당연한 이야기 . 그걸 알아서 향상되는지 줄어드는지 파악이 됨
- 내부적으로 metricbeat, kafka manager JMX 를 사용해서 측정하고 있는데 딱히 불편함은 없다.
- Implement random partitioning.
- 이건 문제다. 순서보장이 되려면 단일 파티션을 써야 하고..현실적으로..
- Adjust consumer socket buffers.
- 네트워크가 10Gbps 이상에서 실행되고 대기 시간이 1밀리초 이상인 경우 소켓 버퍼를 8MB 또는 16MB로 조정하는 것이 좋습니다. 메모리가 문제인 경우 1MB를 고려하십시오. 라고 한다.
- In the newer Kafka versions, the parameter is socket.receive.buffer.bytes, with 100kB as the default.
- 이 수치를 늘려야 한다.
'인프라 > kafka' 카테고리의 다른 글
kafka consumer 성능 올리기 (0) | 2021.09.11 |
---|---|
kafka advertised listener 설정 (0) | 2021.06.14 |
[KSQL] (0) | 2021.05.26 |