Persistence ,Redis The persistence function can effectively avoid data loss caused by process exit , This chapter begins with RDB and AOF Two persistence configurations and running processes , Secondly, the common persistence problems are located and optimized , Finally, combine Redis Common single machine multi instance deployment scenarios are optimized .
5.3 Problem location and optimization
5.4 Multi instance deployment
Tips： Because of too much content , In the following chapters, I will mainly show the knowledge points and some screenshots
Copy , In order to solve the single point problem in distributed system , It is common to deploy multiple copies of data replication to other machines , For requirements such as fault recovery and load balancing ,Redis So it is with . It provides us with replication （replication） function , Implement multiple data of the same Redis copy . Replication is highly available Redis The basis of , Sentinel and cluster in the following chapters are based on replication to achieve high availability .
6.1 To configure
6.4 Problems in development and operation and maintenance
Blocking ,Redis Is a typical single thread architecture , All read and write operations are done in one main thread . When Redis When used in high concurrency scenarios, this thread becomes its lifeline . If there is blocking, even for a short time, it is a nightmare for our application . The scenarios leading to the blocking problem can be roughly divided into internal causes and external causes , This chapter will be analyzed in detail .
7.1 Found a blockage
7.2 The inner cause
7.3 External causes
Understanding memory ,Redis All the data is in memory , How to use it efficiently Redis Memory becomes very important . Efficient use of Redis Memory first needs to understand Redis Where is the memory consumption , How to manage memory , Finally, it goes into how to optimize memory . After mastering these knowledge, I believe that readers can save more data with less memory, so as to reduce the cost .
8.1 Memory consumption
8.2 memory management
8.3 Memory optimization
sentry ,Redis from 2.8 The version is officially available Redis Sentinel, It effectively solves some problems in the mode of master-slave replication , by Redis Provides highly available features . This chapter will analyze step by step Redis Sentinel Related concepts of 、 Installation and deployment 、 To configure 、 Command to use 、 Principle analysis , In the end, it analyzes Redis Sentinel Some problems in operation and maintenance .
9.1 Basic concepts
9.2 Install and deploy
9.4 Client connection
9.5 Realization principle
9.6 Problems in development and operation and maintenance
colony , It's the highlight of the book ,Redis Cluster yes Redis3 Provided Redis Distributed solutions , Effectively solved Redis Distributed requirements , Understand and apply well RedisCluster Will greatly liberate us from distributed Redis The needs of , It's also a great example of learning distributed storage . This chapter will focus on RedisCluster Data distribution of , Set up the cluster , Node communication , Request routing , Cluster scaling , Failure transfer and other aspects of the analysis .
10.1 The data distribution
10.2 Set up the cluster
10.3 Node communication
10.4 Cluster scaling
10.5 Request routing
10.6 Fail over
10.7 Cluster operation and maintenance
Caching can effectively speed up the reading and writing speed of applications , And reduce the back-end load , It is very important for developers to develop daily applications , But adding caching to the application architecture also brings some problems , This chapter introduces the problems encountered in cache usage and design , Specific include ： The benefits and costs of caching 、 Cache update strategy 、 Cache granularity control 、 Penetration problem optimization 、 Optimization of bottomless problems 、 Avalanche optimization 、 hotspot key Optimize .
11.1 The benefits and costs of caching
11.2 Cache update strategy
11.3 Cache granularity control
11.4 Penetration optimization
11.5 Bottomless optimization
11.6 Avalanche optimization
11.7 hotspot key Reconstruction optimization
Introduce Redis Some thorny problems in development and operation and maintenance , Specific include ：Linux Configuration optimization 、flush Misoperation data recovery 、 How to make Redis Become safe 、bigkey problem 、 hotspot key problem .
12.1 Linux Configuration optimization
12.2 flushall/flushdb Misoperation
12.3 Safe Redis
12.4 Handle bigkey
12.5 Looking for hot spots key
Redis Monitoring the O & M cloud platform CacheCloud, Introduce the open source of my team Redis Operation and maintenance tools CacheCloud, It effectively solves Redis Some problems in monitoring and operation and maintenance , This chapter will be based on rapid deployment 、 Machine deployment 、 Access applications 、 User functions 、 Comprehensive introduction of operation and maintenance functions from multiple dimensions CacheCloud, Believe that with its help , Readers can monitor and operate better Redis.
13.1 CacheCloud What is it?
13.2 Rapid deployment
13.3 Machine deployment
13.4 Access applications
13.5 User functions
13.6 Operation and maintenance functions
13.7 Client escalation
Redis Configure statistics Dictionary , Would be right Redis System status information and all configuration to do a comprehensive comb , I hope this chapter can become Redis Configure statistics Dictionary , Help you to analyze and solve problems encountered in daily development and operation and maintenance .
14.1 info System status description
14.2 standalone Configuration description and Analysis
14.3 Sentinel Configuration description and Analysis
14.4 Cluster Configuration description and Analysis
Many people have been interviewing recently , I have also collated a lot of interview materials , There are also other big factories . I hope I can help you .
The latest interview questions
The answers to the above interview questions are all organized into document notes . I also sorted out some interview materials & newest 2021 I collected some real interview questions from big factories
Latest finishing e-book
The latest collation of large factory interview documents
The above is the whole content of this paper , I hope it will be helpful for your study , I also hope that you can support .