The architect of Ali P8 stayed up for three months and compiled this limited edition note of Kafka essence.

Preface

Distributed is one of the necessary skills for programmers. It belongs to the necessary category in the interview process, and it is often used in work. Kafka is a distributed publish-subscribe-based message queue. At present, its charm is endless. For the mystery of Kafka, we still need to explore in detail.

To talk about how familiar with Kafka, I believe that Ali’s bigwigs have the most say, so the content shared today is the "limited notes" provided by Alibaba. All the essence of Kafka is written here. Exclamation: As expected of Alibaba's technical officer, I really took it!

Regarding this limited Kafka note, I can only show part of the chapter content and core screenshots in the article. If you need a complete pdf, just add the VX below!

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

1. Understanding of Kafka

1. Basic concepts of Kafka

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Installation and configuration

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Production and consumption

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Server parameter configuration

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Producer

1. Client development

  • Necessary parameter configuration
  • Message sending
  • Serialization
  • Partitioner
  • Producer interceptor

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Principle analysis

  • Overall structure
  • Metadata update

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Important producer parameters

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Three, consumers

1. Consumers and consumer groups

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Client development

  • Necessary parameter configuration
  • Subscribe to topics and partitions
  • Deserialization
  • Message consumption
  • Displacement submission
  • Control or close consumption
  • Specify displacement consumption
  • Rebalance
  • Consumer interceptor
  • Multi-threaded implementation
  • Important consumer parameters

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Four, themes and divisions

1. Subject management

  • Create theme
  • Distribution of partition copies
  • View topic
  • Edit theme
  • Configuration management
  • Subject parameters
  • Delete topic

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. First meet KafkaAdminCilent

  • Basic use
  • Subject legality verification

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Partition management

  • Election of the first copy
  • Partition redistribution
  • Replication limit
  • Modify the copy factor

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. How to choose the right number of partitions

  • Performance testing tool
  • The more partitions, the higher the throughput
  • Maximum number of partitions
  • Considerations

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Five, log storage

1. File directory layout

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Evolution of log format

  • v0 version
  • v1 version
  • Message compression
  • Variable length field
  • v2 version

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Log Index

  • Offset index
  • Timestamp index

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Log cleanup

  • Log deletion
  • Log compression

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

5. Disk storage

  • Page cache
  • Disk I/O process
  • Zero copy

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Six, in-depth server

1. Protocol design

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Time wheel

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Delay operation

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Controller

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

5. Parameter decryption

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Seven, in-depth client

1. Partition allocation strategy

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Consumer Coordinator and Group Coordinator

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Analysis of _consumer_offsets

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Affairs

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

8. Reliability research

1. Copy analysis

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Log synchronization mechanism

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Reliability analysis

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Nine, Kafka application

1. Command line tools

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2.Kafka Connect

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3.Kafka Mirror Maker

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4.Kafka Streams

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

Ten, Kafka monitoring

1. Source of monitoring data

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Consumption lags behind

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Synchronize failed partitions

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Description of monitoring indicators

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

5. Monitoring module

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

11. Advanced applications

1. Expiration time (TTL)

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2. Delay queue

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3. Dead letter queue and retry queue

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Message routing

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

5. Message track

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

6. Message audit

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

7. Message Broker

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

8. Selection of message middleware

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

12. Integration of Kafka and Spark

1.Spark installation and simple application

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

2.Spark programming model

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

3.Spark operating structure

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

4. Introduction to Spark Streaming

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

5. Integration of Kafka and Spark Streaming

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

6.Spark SQL

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

7.Structured Streaming

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

8. Integration of Kafka and Structured Streaming

As expected to be the technical officer of Alibaba, the essence of Kafka is written in this "Limited Notes", served

 

to sum up

We always like to pay tribute to the great gods of big factories, but in fact, great gods are no more than mortals. Compared with rookie programmers, they spend a little more thought. If you don't work hard, the gap will only grow bigger and bigger. In fact, as a programmer, it is necessary to enrich one's knowledge reserve and enhance the depth and breadth of one's knowledge. In my opinion, the rewards will be as much as you pay.

Learning Kafka is not as difficult as imagined. The content in this limited Kafka note will inspire and help you to learn Kafka. If you need this full version of Kafka notes , you just need to support me in this article.

——Repost + comment on the article, follow me, then scan the code and add the VX below to get

 

 

 

Guess you like

Origin blog.csdn.net/JavaJIAMIN/article/details/109258177