GithubHelp home page GithubHelp logo

tacademy-kafka's Introduction

header

Kafka 기본 개념 및 생태계

End to End 의 연결방식 (데이터 연동의 복잡성 증가), 각기 다른 파이프라인 연결구조 모든 데이터를 통신을 할 수 있고 Scale 아웃 프로듀서와 컨슈머를 분리하고, 메세지 데이터를 여러 컨슈머에게 허용 다양한 관련 생태계 제공

Kafka Broker

실행된 카프카 애플리케이션 서버 중 1대 N 개의 Broker중 1대는 컨트롤러(Controller) 기능 수행 주키퍼의 메타 데이터로 누가 컨트롤러 인지 저장

Record

객체를 프로듀서에서 컨슈머로 전달하기 위해 Kafka 내부에 Byte 형태로 저장할 수 있도록 직렬화/역직렬화하여 사용

Topic & Partition (메세지 분류 단위)

Topic 은 여러개의 파티션 할당 가능 메세지 순서는 파티션 별로 다르다.

Producer는 Record를 생성하여 Broker로 전송한다. Consumer는 Record를 Broker로 가져온다. 여러개의 Consumer가 동일한 Record도 가져올 수 있다.

Kafka Log and Segment

메세지가 저장되는 파일 시스템 단위

Topic에 파티션 의 개수 >= Consumer의 개수 리밸런스 발생 : 파티션 컨슈머 할당 재조정

컨슈머 그룹에 따라 파티션을 접근할 수있다.

하둡에 적재를 못해도 엘라스틱서치는 무관하게 장애 격리가 된다.

Broker Partition Replication(고 가용성을 위한 복제) 리더 파티션 (Kafka 클라이언트와 데이터를 주고 받는 역할) 팔로워 파티션 (리더 파티션을 계속 복제)

ISR(In-Sync Replica) : 모든 레코드가 복제되어 Sync가 맞는 상태

ISR이 아닌 상태에서 장애가 나면 : unclean.leader.election.enable (Default : False) False이면 리더가 복구될때까지 기다린다. 유실해도 괜찮다면 True 이다. Network를 탄다.(Latency도 유의한다) Replica Factor는 주로 2~3

Kafka rack-awareness(Server Rack 이슈에 대응) Rack에 다수의 브로커를 넣지 않는다(서버 운용 개념)

왜 카프카 클러스터는 서버 장애에 대응한 로직이 많나요?

고 가용성을 보장해야 한다.

브로커 버젼과 클라이언트 버젼 호환성 맞추는게 중요 Kafka Connect 를 통해 Data를 Import/Export 가능하다.

이벤트 브로커와 메세지 브로커 메세지 브로커는 이벤트 브로커로 사용 불가능 이벤트 브로커는 메세지 브로커로도 사용 가능

footer

tacademy-kafka's People

Contributors

andersonchoi avatar dgreghub avatar lee95292 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.