consumer 2

# Kafka - 2 # Kafka Multi Cluster ๊ตฌ์„ฑ

์ง€๋‚œ ํฌ์ŠคํŒ…์— ์ด์–ด ์ด๋ฒˆ์—” Kafka๋ฅผ Multi Cluster๋กœ ๊ตฌ์„ฑํ•ด๋ณด๊ฒ ๋‹ค. ๊ตฌ์„ฑ์€ ์•„๋ž˜์™€ ๊ฐ™์ด ํ•  ๊ฒƒ์ด๋‹ค. Step 1. Kafka Download # ๋ฒ„์ „ ํ™•์ธ ํ•„์ˆ˜ $ wget http://mirror.navercorp.com/apache/kafka/2.3.0/kafka_2.12-2.3.0.tgz # ์„ค์น˜ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ๋กœ์—์„œ ์••์ถ• ํ’€๊ธฐ $ tar -xzf kafka_2.12-2.3.0.tgz $ cd kafka_2.12-2.3.0 Step 2. Zookeeper ์„ค์ • ( All Node ) => vi zookeeper.properties initLimit=10 syncLimit=5 server.1= :2888:3888 server.2= :2888:3888 server.3= :2888:3888 St..

# Kafka - 1 # Kafka ๊ฐœ๋…

์นดํ”„์นด๋ž€? ๋Œ€์šฉ๋Ÿ‰์˜ ์‹ค์‹œ๊ฐ„ ๋กœ๊ทธ ์ฒ˜๋ฆฌ์— ํŠนํ™”๋˜์–ด ์žˆ๋Š” ์†”๋ฃจ์…˜์ด๋ฉฐ ๋ฐ์ดํ„ฐ๋ฅผ ์œ ์‹ค์—†์ด ์•ˆ์ „ํ•˜๊ฒŒ ์ „๋‹ฌํ•˜๋Š” ๊ฒƒ์ด ์ฃผ๋ชฉ์ ์ธ ๋ฉ”์„ธ์ง€ ์‹œ์Šคํ…œ์—์„œ ์•ˆ์ •์ ์ธ ์•„ํ‚คํ…์ฒ˜์™€ ๋น ๋ฅธ ํผํฌ๋จผ์Šค๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ๋ถ„์‚ฐ ์ŠคํŠธ๋ฆฌ๋ฐ ํ”Œ๋žซํผ์ด๋‹ค. ํฌ๊ฒŒ ์•„๋ž˜์™€ ๊ฐ™์€ ํŠน์ง•์ด ์žˆ๋‹ค. 1. ๋ฉ”์‹œ์ง€ ๋ถ„์‚ฐ ์ฒ˜๋ฆฌ ์นดํ”„์นด๋Š” ํŒŒํ‹ฐ์…˜์ด๋ž€ ๊ฐœ๋…์„ ๋„์ž…ํ•˜์—ฌ ์—ฌ๋Ÿฌ๊ฐœ์˜ ํŒŒํ‹ฐ์…˜์„ ์„œ๋ฒ„๋“ค์— ๋ถ„์‚ฐ์‹œ์ผœ ๋‚˜๋ˆ„์–ด ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. Producer๊ฐ€ ๋ฉ”์‹œ์ง€๋ฅผ ์–ด๋–ค ํŒŒํ‹ฐ์…˜์œผ๋กœ ์ „์†กํ• ์ง€๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๊ตฌํ˜„ํ•œ ๋ถ„๋ฐฐ ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋”ฐ๋ฅธ๋‹ค. ๊ฐ ํŒŒํ‹ฐ์…˜์— ๊ท ๋“ฑํ•˜๊ฒŒ ์ €์žฅํ•˜๊ฑฐ๋‚˜, ๋ฉ”์‹œ์ง€์˜ ํ‚ค๋ฅผ ํ™œ์šฉํ•˜์—ฌ ํŠน์ • ๋ฌธ์ž๋กœ ์‹œ์ž‘ํ•˜๋Š” ๋ฉ”์‹œ์ง€๋Š” ํŠน์ • ํŒŒํ‹ฐ์…˜์— ํ• ๋‹นํ•  ์ˆ˜ ์žˆ๋‹ค. => ํŒŒํ‹ฐ์…˜์„ ๋‚˜๋ˆ„์—ˆ์„ ๋•Œ, ๋ฉ”์‹œ์ง€์˜ ์ˆœ์„œ๋Š” ๋ณด์žฅํ•ด์ฃผ์ง€ ์•Š๋Š”๋‹ค. ํ•œ๋ฒˆ ๋Š˜๋ฆฐ ํŒŒํ‹ฐ์…˜์€ ์ ˆ๋Œ€๋กœ ์ค„์ผ ์ˆ˜ ์—†๋‹ค. 2. ๊ณ ๊ฐ€์šฉ์„ฑ(HA..