Redis is more than just caching! I'm a fan of Baidu's strong push of "Redis Growth Notes"!

Redis

I believe everyone's first impression of Redis is "cache", which is easier to understand, use and control than Memcache. But Redis, as the most widely used storage middleware in the field of Internet technology, actually has many other application scenarios. When the concurrency of the system reaches a certain level and the traffic rises, other Redis functions need to be applied.

How important is Redis?

Regardless of its super high performance, the fact that many large Internet companies and many small and medium-sized companies at home and abroad have applications can show that Redis has become an indispensable skill for middle and advanced back-end developers! If you cannot understand the deep principles behind Redis in depth, many problems cannot be understood at all, let alone solved. So how do you know what Redis is and why, and prepare for future growth as an architect? Don't panic, I just got a copy of his internal "Redis Growth Notes" from a friend of Baidu from Lei Feng on the Internet (in my editor) some time ago. After reading it, there is really more than a slight gap!

 

 

There are 6 parts of this note. Due to space limitations, it can only be displayed in the form of screenshots of the main content, one-click three consecutive + comments, and then add my VX (tkzl6666) to receive it for free.

Basics

  • Redis installation
  • Redis basic data structure
  1. string (string)
  2. lit (list)
  3. hash (dictionary)
  4. set

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • General rules for container data structures

Application

(Distributed lock, delay queue, bitmap, HyperLogLog, Bloom filter, simple current limit, funnel current limit, GeoHash, Scan)

  • Distributed lock
  1. Distributed lock
  2. Timeout problem
  3. Reentrancy

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • bitmap
  1. Basic use
  2. Statistics and lookup
  3. Magic instruction bitfield

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Bloom filter
  1. What is a Bloom filter?
  2. Bloom filter in Redis
  3. Basic use of Bloom filter
  4. Precautions
  5. Principle of Bloom filter
  6. Space occupation estimate
  7. How will the false positive rate change when the actual element exceeds
  8. What should I do if I can't use Redis 4.0?
  9. Other applications of bloom filters

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Funnel current limit
  1. Redis-Cell
  2. summary

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

Principles

(Thread IO model, communication protocol, persistence, pipeline, transaction, PubSub, small object compression, master-slave synchronization)

  • Thread IO model
  1. Non-blocking IO
  2. Event polling (multiplexed)
  3. Instruction queue
  4. Response queue
  5. Timed task

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Endurance
  1. Snapshot principle
  2. fork (multi-process)
  3. AOF principle
  4. AOF rewrite
  5. fsync
  6. Operation and maintenance
  7. Redis 4.0 hybrid persistence

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Master-slave synchronization
  1. CAP principle
  2. Eventually unanimous
  3. Master-slave synchronization
  4. Incremental synchronization
  5. Snapshot synchronization
  6. Add slave node
  7. Diskless copy
  8. Wait instruction

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

Cluster

(Sentinel 、 Codes 、 Cluster

  • Sentinel
  1. Message lost
  2. Sentinel basic use

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Codes
  1. Codis fragmentation principle
  2. How to synchronize the slot relationship between different Codis instances?
  3. Expansion
  4. Automatic equalization
  5. The price of Codis
  6. Advantages of Codis
  7. Operation process of MGET instruction
  8. Architecture changes
  9. Codis embarrassment
  10. Codis background management

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Cluster
  1. Slot location algorithm
  2. Jump
  3. migrate
  4. Fault tolerance
  5. Network jitter
  6. Possible offline (PALPossibll Fail and confirm offline (Fail)
  7. Basic use of Cluster
  8. Slot migration awareness
  9. Cluster change awareness

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

Expansion

(Stream, Info instruction, talk about distributed locks, expiration strategy, LRU, lazy deletion, use Jedis gracefully, protect Redis, Redis secure communication)

  • Talk about distributed locks again
  1. Redlock algorithm
  2. Redlock usage scenarios

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • LRU
  1. LRU algorithm
  2. Approximate LRU algorithm
  3. Extended reading

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Redis secure communication
  1. spiped principle
  2. Getting started with spiped

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

Source code

(Explore the internal structure of "string", "dictionary", "[compressed list", "quick list", "jump list", "compact list", and "radix tree")

  • String
  1. embstr vs raw
  2. Expansion strategy

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Explore the internal structure of the "jump list"
  1. basic structure
  2. Find process
  3. Random layer
  4. Insertion process
  5. Delete process
  6. Update process
  7. What if the score values ​​are all-like?
  8. How is the element ranking calculated?

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

  • Explore the inside of the "Cardinal Tree"
  1. application
  2. structure
  3. Add and delete nodes

Redis is more than just caching!  Baidu strongly promoted "Redis Growth Notes", I fan

 

Due to space limitations, we can only show part of the content in this form. I hope everyone will understand

Write at the end

There are many knowledge points involved in Redis. A note alone will definitely not be able to take care of all aspects of Redis, but this Redis growth note will definitely help those who are eager to improve and expand their knowledge! As programmers, we must never stop learning! ! We must lay a good foundation for our future architecture.

One-click triple + comment, then add my VX (tkzl6666) to receive it for free.

Guess you like

Origin blog.csdn.net/JavaBUGa/article/details/112789863