2

"Talk about your understanding of Redis"!

Are you maddened by such broad questions during an interview?

Don't know where to start?

It doesn't matter, today I will teach you how to answer in 3 minutes.

Hi, my name is Mic, a Java programmer who has been working for 14 years.

What is the purpose of the interviewer's investigation? What kind of answer do you want to get?

Inspection target

For the problem of understanding of a certain technology, it is a relatively broad problem

During the interview process, examining these types of questions serves two important purposes:

  1. During the interview process, the interviewer hopes that the job seeker can say something more, so as to have a clearer judgment on your overall situation and ability, so these kinds of questions can find some breakthroughs in understanding you.
  2. In fact, there is no standard answer to this kind of question. It is more a summary based on your understanding of it, which can better examine your technical accumulation and logical expression ability.

Therefore, in the process of answering, job seekers need to express it as logically and clearly as possible.

Otherwise it will be difficult to get recognized.

Problem Analysis

Most people can blurt out what Redis is.

Is it a distributed cache middleware? Is there a problem with this answer? Of course there is

To be precise, Redis is a Nosql database based on an in-memory Key-Value data structure.

Note that there are three key points here.

  • memory storage
  • key-value structure
  • Nosql

The so-called memory storage means that all data is stored in the memory, and the IO performance of the data is relatively high.

Of course, Redis also provides a persistence strategy to avoid the problem of data loss in memory. The key-value structure represents the storage method of data. In addition to redis, there are also LevelDB, Scalaris, etc.

And Nosql, it refers to a non-relational database, compared to the traditional relational database.

More consideration is given to scalability, performance, storage of large amounts of data, etc., to make up for the shortcomings of relational databases such as columnar storage ClickHouse, Cassandra; document storage MongoDB graph storage Neo4J, etc. belong to the category of Nosql.

Expert:

Redis is a Nosql open source in-memory database based on the Key-Value storage structure.

It provides 5 commonly used data types, String, Map, Set, ZSet, List.

For different structures, problems in different scenarios can be solved.

Therefore, it can cover most of the business scenarios in application development, such as top10 questions, friends watch list, hot topics, etc.

Secondly, because Redis is based on memory storage and has done a lot of optimization on the data structure, the IO performance is relatively good. In actual development, it will be used as a distributed cache component between the application and the database.

And it is a non-relational data storage, there is no associated query problem between tables, so it can greatly improve the data IO efficiency of the application.

Finally, as an enterprise-level development, it also provides master-slave replication + sentinel, and cluster mode to achieve high availability in the Redis cluster, and realizes data sharding through hash slots, which further improves performance.

If you like my work, remember to like and subscribe! ! !

Need Java interview materials, resume template scan below!

Copyright notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated. Please indicate the source for Mic带你学架构 !
If this article is helpful to you, please help to follow and like, your persistence is the driving force for my continuous creation. Welcome to follow the WeChat public account of the same name to get more technical dry goods!

跟着Mic学架构
810 声望1.1k 粉丝

《Spring Cloud Alibaba 微服务原理与实战》、《Java并发编程深度理解及实战》作者。 咕泡教育联合创始人,12年开发架构经验,对分布式微服务、高并发领域有非常丰富的实战经验。