Redis core technology and actual combat

As a typical key-value database with high performance, high reliability and high scalability, Redis is not only powerful but also stable, and it has naturally become the first choice of large Internet companies.

When recruiting, many large companies will not only require the interviewee to simply use Redis, but also have a deep understanding of the underlying implementation principles and the ability to solve common problems. It can be said that proficiency in Redis has become an essential skill for technical people.

However, in the process of learning and using Redis, some thorny problems are inevitably encountered, such as:

  • How should Redis key and data structure be designed? What are the best practices?
  • How does Redis cluster balance data? How to scale horizontally?
  • How to ensure data consistency? How to solve the problem of hot data?
  • The data snapshot generated by RDB persistence, each update is a full update or an incremental update?
  • How to solve problems such as cache avalanche, cache penetration, cache warm-up, cache update, and cache degradation?
  • How to read Redis source code efficiently?

Teacher Jiang Dejun sorted out a set of systematic Redis learning methods based on his years of research and teaching experience. He summarized the complex Redis knowledge and problems in the framework of "two dimensions and three main lines", hoping to help you establish a system view and a global view, so as to give you a thorough understanding of the underlying implementation principles. In addition, Mr. Jiang Dejun will also analyze common problems and countermeasures in detail, and explain the application of Redis in typical scenarios (such as caching, spikes), so that you can quickly grasp effective practical experience and apply it to your own In the Redis project, improve your actual combat ability in all aspects.

Course catalog: 

The main body of the course is divided into 4 modules.

  • Basics : Start with the key structure of building a key-value database, which not only takes you to establish a global view, but also helps you quickly grasp the core main line. In addition, it will explain the data structure, thread model, network framework, persistence, master-slave synchronization, and slice cluster in detail to help you understand the underlying principles.

  • Practice : Focus on introducing the actual combat experience of Redis from the two dimensions of typical cases and common scenarios. At the "case" level, it will explain in detail the rational use of data structures, avoid request blocking and jitter, and improve the key techniques of memory usage efficiency; at the "scenario" level, it will thoroughly explain the basic principles of caching for the two scenarios of caching and clustering. , As well as response plans for abnormal situations such as avalanches, penetrations, and pollution, and will share specific and feasible solutions around cluster optimization, data consistency, and high concurrent access issues.

  • Future article : I will explain the new features of Redis 6.0 such as multi-threading, and introduce the latest explorations in the industry to help you grasp the development roadmap of Redis in advance and prepare for future development.

  • Snacks : Updates from time to time, will introduce Redis's common tools, client-side custom development, and classic usage specifications. It will also take you to interpret the Redis practices of major manufacturers to further enhance your actual combat capabilities.

Opening remarks (1 lecture)

Opening remarks | Learn Redis in this way, so that you can be more skilled and free

Basics (10 lectures)

01 | Basic architecture: What does a key-value database contain?

02 | Data structure: What are the slow operations of fast Redis?

03 | High-performance IO model: Why is single-threaded Redis so fast?

04 | AOF log: It's down, how does Redis avoid data loss?

05 | Memory snapshot: How does Redis achieve rapid recovery after a downtime?

06 | Data synchronization: How to achieve data consistency between master and slave libraries?

07 | Sentinel mechanism: How to provide uninterrupted service when the main library is down?

08 | Sentinel cluster: The sentry is down, can the master and slave libraries be switched?

09 | Slicing cluster: The data has increased, should I add memory or add instances?

10 | Answers to Questions and Frequently Asked Questions After Lectures 1~9

Practice (28 lectures)

11 | Why is the String of "magic oil" not easy to use?

12 | There are 100 million keys to be counted. Which set should be used?

13 | What is GEO? Can you also define new data types?

14 | How to save time series data in Redis?

15 | The test of message queues: What solutions does Redis have?

16 | Asynchronous mechanism: How to avoid the blocking of the single-threaded model?

17 | Why does the CPU structure also affect the performance of Redis?

18 | Fluctuations in response delays: how to deal with slowing Redis? (Top) 

19 | Fluctuation of response delay: How to deal with slow Redis? (Below) 

20 | Why is the memory usage still high after deleting data?

21 | Buffer zone: a place that may cause "tragedies"

22 | Answers to Questions and Frequently Asked Questions After Lectures 11-21 

23 | Bypass Cache: How does Redis work?

24 | Replacement strategy: what to do if the cache is full?

25 | Cache Exception (Part 1): How to solve the problem of data inconsistency between the cache and the database?

26 | Cache Exception (Part 2): How to solve the problem of cache avalanche, breakdown, and penetration?

27 | The cache is contaminated, what should I do?

28 | Pika: How to implement large-capacity Redis based on SSD?

29 | Lock-free atomic operations: How does Redis deal with concurrent access?

30 | How to use Redis to implement distributed locks?

31 | Transaction mechanism: Can Redis implement ACID properties?

32 | Redis master-slave synchronization and failover, what are the pitfalls?

33 | Split Brain: A Strange Data Loss

34 | Answers to Questions and Frequently Asked Questions After Lectures 23~33

35 | Codis VS Redis Cluster: Which cluster solution should I choose?

36 | What are the key technologies and practices for Redis to support the spike scenario?

37 | Data distribution optimization: how to deal with data skew?

38 | Communication overhead: the key factor limiting the scale of Redis Cluster

The future (4 lectures)

39 | New Features of Redis 6.0: Multithreading, Client Cache and Security

40 | Redis's next step: Practice based on NVM memory

41 | Answers to Questions and Frequently Asked Questions After Lectures 35~40

Final test | Have you mastered all the core knowledge of Redis?

Supper (7 lectures)

Supper (1) | What are the classic Redis learning materials?

Supper (2) | User Kaito: How did I learn Redis?

Supper (3) | User Kaito: I want to be a person who grows up under pressure

Supper (4) | How does the Redis client exchange commands and data with the server?

Supper (5) | What are some useful operation and maintenance tools for Redis?

Supper (6) | Redis usage specification tips

Supper (7) | What can we learn from the practice of Redis on Weibo?

Mid-term test (2 lectures)

Mid-term test questions | A set of exercises to measure your mastery 

Answers to Mid-term Test Questions | Did you answer all of these questions correctly?

Concluding remarks (1 lecture)

Conclusion | From learning Redis to learning from Redis

Friends in need leave their mailbox. It is for learning reference only, please do not use it for commercial use

 

 

Guess you like

Origin blog.csdn.net/MyySophia/article/details/114018617