Successfully jumped into the big factory to pay 8K from the three-line small company, it will be completely

Let’s talk about Redis

Getting started with the foundation of Redis, mastering the knowledge points listed in the following picture.


If you advance, you have to work hard, business, master-slave copy, sentinel, cluster, etc., don’t understand, you can’t go.


Reproduction US $ 100 billion traffic Redis actual combat, Redis distributed lock, session, cache and database consistency, caching avalanches, etc. are the heavy technical points, must be mastered, no discussion.


Look at these technical points, then I will come to test you now.Redis interview problem(Ready, pick it up):

  1. Why use Redis? / Why use cache?
  2. Why do you want to use Redis without Map / Guava?
  3. How do I guarantee data consistency when cache is double-written?
  4. What is the common data structure and use scenario analysis? (String / Hash / List / SET / SORTED SET)
  5. How do I set up expiration time?
  6. Reis memory phase-out mechanism (2000W data in MySQL, only 20W data in Redis, how to ensure that data in REDIS is hot data?
  7. What kind of ways do you have for lasting? (How to ensure that the redis will restart the data after it hangs?)
  8. Redis transaction?
  9. What is the common anomaly and solution? (Cache penetration / cache avalanche / cache preheating / cache downgrade)
  10. What are the common application scenarios in a distributed environment? (Distributed Lock / Distributed Self-increment ID)
  11. Redis cluster mode? (Main from mode / sentry mode / Cluster cluster mode)
  12. How do I solve the comparison of the REDIS?


If you can’t get it, please see the answer screenshot below (there are many parses, the interception is not finished, and the original answer will be paid):



Continue to get it,Reedis necessary 70 questions (concept + data structure and instruction + high concurrency processing policy + cluster + cache management and persistence mechanism + application scenario design)The answer has been organized

  • Part 1: Reconciliation of Redis

  • 1. What is redis?

  • 2. What are the characteristics of Redis?

  • 3. What are the differences between Memcache and REDIS?

  • 4. What is the advantage of memory compared to Memcached?

  • 5. How to achieve local cache? Please describe how you know

  • 6. What is the Redis Communication Agreement? What is the character?

  • Part 2: Redis data structure and instructions

  • 1. Redis supported data type

  • 2. What are the orders commonly used?

  • 3. What is the maximum capacity of a string type?

  • 4. What is the maximum storage amount of each data type?

  • 5. Please introduce the Redis’s data type sortedset (zset) and the underlying implementation mechanism?

  • 6. What are the redis transaction related commands?

  • 7. What is the Redis transaction? What is the principle?

  • 8. What are the attention points of the Redis transaction?

  • 9. Why does Redis not support rollback?

  • 10. Please introduce Redis’s PIPELINE (pipeline), and use the scene

  • 11. Please explain what is the difference between the REDIS’s batch command and PIPELINE?

  • 12. Please tell us about the re-issuing subscription function of REDIS.

  • 13. What are the characteristics of the LED data structure of Redis?

  • 14. Please tell us about the bottom level implementation of Redis?

  • 15. REDIS’s String type uses the benefits of SSD mode?

  • 16. What are the commanding time and expiration time of the setting key?

  • Part III: REDIS High Certical Processing Strategy

  • 1. Why does Redis need to put all data in memory?

  • 2. Is Redis?

  • 3. Why is Redis designed to a single thread?

  • 4. What is a cache penetration? How to deal with it?

  • 5. What is a cache anchor? How to deal with it?

  • 6. Several cache update strategies? What are the precautions?

  • 7. Please introduce several reasons that may lead to redis blocking

  • 8. How to discover the abnormal abnormality of Redis?

  • Part 4: Redis cluster structure and design concept

  • 1. What kinds of REDIS cluster architecture mode?

  • 2. What is the maximum number of REDIS clusters?

  • 3. What is the master-slave replication model of the Redis cluster?

  • 4. Please introduce the REDIS cluster implementation plan

  • 5. Is the REDIS cluster will have a write operation? why

  • 6. What is the slow inquiry? What configuration is it?

  • 7. What are the experience of slow query repair? How to fix it?

  • 8. How to optimize the performance of the Redis service?

  • 9. What is the advantages and disadvantages of REDIS?

  • 10. What are the advantages and disadvantages of Redis Sentinel?

  • 11. How to set the maximum number of reicers? View Redis’s maximum connection number? View Redis’s current

  • 12. Introduction Some redis common security settings?

  • Part 5: REDIS Cache Management and Working Mechanism

  • 1. What are the REDIS persistence mechanism?

  • 2. What are the differences between the REDIS persistence mechanism AOF and RDB?

  • 3. Please introduce the advantages and disadvantages of the RDB persistence mechanism.

  • 4. Please introduce the advantages and disadvantages of AOF persistence mechanism.

  • 5. How does the data of the AOF file have an exception? How does the Redis service processed?

  • 6. What are the common phase-out algorithms?

  • 7. What are the REDIS phase-out strategy?

  • 8. What are the REDIS cache failure strategy?

  • 9. How to do memory optimization?

  • 10. What is BIGKEY? What is the impact?

  • 11. How to find Bigkey?

  • 12. What are the REDIS’s memory consumption classification? What is the memory statistics?

  • 13. Brief introduction What are the way REDIS’s memory management?

  • 14. How to set the upper limit of the REDIS? what’s the effect?

  • 15. How to deal with REDIS?

  • Section 6: Redis Application Scenario

  • 1. What are the applicable scenes?

  • 2. What are the business scenarios commonly used by Redis?

  • 3. What are the Java clients supported by Redis? Briefly illustrate the characteristics.

  • 4. Please briefly describe the basic method of JEDIS?

  • 5. What is the advantage of JEDIS connection pool link?

  • 6. What is a distributed lock? what’s the effect?

  • 7. What can distributed locks to achieve?

  • 8. What do you need to pay attention to the distributed lock implementation?

  • 9. How to achieve a distributed lock?

  • 10. What is the cache hit rate?

  • 11. How to improve the cache hit rate?

  • 12. Please introduce Spring annotation cache

Talk to the interview, the hand, look at the actual combat, such as the translation below“Redis in action”is a very good reference material


The whole book is divided into three parts: entry, core concept, advanced content.

  • The first part describes the REDIS, which illustrates the basic use of REDIS. It has the five data structures and operations of these five data structures, and explain how to use Redis to build an article aggregate website, cookie, shopping A series of programs such as cars, web cache, and database caches.


  • The second part provides a more detailed introduction to the Redis command and showing how to use Redis to build a more complex auxiliary tools and applications, and in the final show how to use Redis to build a simple social networking site.


  • The third part introduces some of the issues that Redis users often encounter, explaining the method of reducing REDIS memory, and how to extend the REDIS performance, and methods of scripting scripting using the LUA language.


Reedis said so much, don’t forget that there is Mongdb


mongdb from the entry to advance to actual combat, I have all the above technical points, I have a big name ~

In order to help you become a big evergreen character, I think this“MongoDB uses – quickly” + “MongoDB to use – Cluster security”Two note PDF You still can’t miss.

First book: MongoDB quickly

1 MongoDB Related Concepts

  • 1.1 Business Application Scene
  • 1.2 MongoDB Introduction
  • 1.3 architecture
  • 1.4 Data Model
  • 1.5 MongoDB features

2 stand-alone deployment

  • 2.1 Installation start in the Windows system
  • 2.2 shell connection (Mongo command)
  • 2.3 Compass-graphical interface client
  • 2.4 Installation start and connection in Linux system

3 Basic common orders

  • 3.1 Case Consumption
  • 3.2 Database Operation
  • 3.3 Collection operation
  • 3.4 Document Basic Crud
  • 3.5 paging query of the document
  • 3.6 More inquiry

4 Index -index

  • 4.1 Overview
  • 4.2 Type of Index
  • 4.3 Management Operation of Index
  • 4.4 Use of indexes

5 Article Review

  • 5.1 Demand Analysis
  • 5.2 Analysis of Table Structure
  • 5.3 Technology selection
  • 5.4 Article Micro Service Module Construction
  • 5.5 Article Review Entity Class Writing
  • 5.6 Basic increase in articles
  • 5.7 Paging list based on the previous ID ID
  • 5.8 MONGOTEMPLATE implementation comment



Second: MongoDB cluster and security

1 copy set – REPLICA SETS

  • 1.1 Introduction
  • 1.2 Three characters of a copy set
  • 1.3 Representation Structure Target
  • 1.4 Creation of a copy set
  • 1.5 Data read and write operations of a copy set
  • 1.6 Electoral Principles of the main node
  • 1.7 fault test
  • 1.8 COMPASS connection copy set
  • 1.9 SpringDataMongoDB connection copy set

2 Split Cluster –sharded Cluster

  • 2.1 Split Concept
  • 2.2 Split Clusters Contains Components
  • 2.3 Split Cluster Architecture Target
  • 2.4 Creation of Split (Storage) Node Copy Set
  • 2.5 Configuration Node Creation Creation
  • 2.6 Creation and operation of routing nodes
  • 2.7 COMPASS Connection Split Cluster
  • 2.8 SpringDataMongDB Connection Split Cluster
  • 2.9 Clear all node data (alternate)

3 Safety Certification

  • 3.1 MongoDB users and role permissions
  • 3.2 Single Mechanical Environment
  • 3.3 copy set environment
  • 3.4 Split Cluster Environment (Extension)


Reader Welfare

Share a Java interview manual that is tired, and some interviews PDF

Don’t stop your own learning



This article has beenCoding Open Source Project: [First-line big factory Java interview questions analysis + core summary learning note + latest explanation video + actual combat project source code]Compute