filebeat & kafka
์๋ก ์ฌ๋ฆฐ ๋ฐฐ์น ์๋ฒ๋ aws ec2 ์ธ์คํด์ค์ ์ฌ๋ผ๊ฐ ์๊ณ , ๊ทธ ์ธ์คํด์ค์ docker๋ก filebeat์ ๋์ด๋์๋ค. ๊ทธ๋ฆฌ๊ณ ๊ธฐ์กด ์์ฉ ์๋ฒ์๋ docker๊ฐ ์๋, ๊ทธ๋ฅ ๋ฐ๋ชฌ์ผ๋ก filebeat์ ์คํํด๋์๋ค.ย
์ผ๋จ docker๋ก ์ฌ๋ฆฐ filebeat์ ์์๋ก ์ข ๋ฃ๋๋ ์ผ์ด์ค๊ฐ ์์ง๊น์ง ์๋ค. ๋ฐ๋ฉด ๋ฐ๋ชฌ์ผ๋ก ๋๊ณ ์๋ filebeat์, ํด๊ทผ ์ ์คํ์ค์ธ๊ฒ์ ํ์ธํ๊ณ ๋ค์๋ ์ถ๊ทผํด์ ํ์ธํ๋ฉด ์ฃฝ์ด์๋ค.ย
-> ์ด๊ฒ๋ ํ์ธํด๋ด์ผ ํ๋ ๋ฌธ์ ย
๊ทธ๋ฆฌ๊ณ , ๋ค์ filebeat์ ๋์ฐ๋ฉด, ๊ทธ ๋์ ์ํํ์ง ๋ชปํ๊ณ ์์ฌ์๋ ๋ก๊ทธ๋ค์ ๊ธ์ด์ ์กฐ๊ธ ๋ง์ ์์ ๋ฐ์ดํฐ๋ฅผ kafka๋ก ๋ณด๋ด๊ธฐ ๋๋ฌธ์ธ์ง, filebeat์ ์๋์ ๊ฐ์ ๋ก๊ทธ ๋ฉ์์ง๋ฅผ ์ฐ๋๋ค.
2019-11-21T10:32:37.813+0900 INFO kafka/log.go:53 producer/broker/1 maximum request accumulated, waiting for space
์ ํํ ์ด๋ค ์๋ฏธ์ผ๊น? ๊ตฌ๊ธ๋ง ๊ตฌ๊ธ๋ง.
์ผ๋จ, ์๋ฌ๋ ์๋.
This is not an exception but an info message. kafka client's buffer is full, and it's probably waiting for some ACKs before sending more messages.
filebeat์ ์ก์ ๋ฒํผ๊ฐ full์ด๋ผ๋ ๋ป.
The message is logged because the send buffers are full. The kafka client is waiting for ACK from kafka for an older batch in order to flush it's buffers. So network of kafka itself might create some backpressure. All in all data will not be lost, as filebeat will retry until there is enough space.ย
๋ด ์ค์ ์ ํ์ธํด ๋ณด์.
1. producer์ธ, filebeat ์ค์ .
output.kafka: ย ย ... ย ย required_acks: 1 ย ย compression: gzip ย ย max_message_bytes: 1000000
2. kafka broker ์ค์ . (server.properties)
num.network.threads=3
# The number of threads that the server uses for processing requests, which may include disk I/O num.io.threads=8
# The send buffer (SO_SNDBUF) used by the socket server socket.send.buffer.bytes=102400
# The receive buffer (SO_RCVBUF) used by the socket server socket.receive.buffer.bytes=102400
# The maximum size of a request that the socket server will accept (protection against OOM) socket.request.max.bytes=104857600
์ด๋ป๊ฒ ์กฐ์ ํด์ผํ ๊น?











