preface

When it comes to interviews , Then you have to prepare well , Not prepared for an interview , It's a total waste of time , Is not responsible for their own . So what are the knowledge points of the interview ?

Feedback after most fans interview ,Java The key points of the interview are as follows :

Data structure and algorithm ,JVM Memory structure , Garbage collector , Recovery algorithm ,GC, Concurrent programming related ( Multithreading , Thread pool, etc ),NIO/BIO, performance optimization , Design patterns ,Spring frame : Distributed correlation :Redis, agreement Hash algorithm , Distributed storage , Load balancing, etc , Microservices and Docker Containers, etc .
Because there are so many words here , I concluded java The range of frequently asked questions involved in the interview and the frequently asked interview questions are shared with you free of charge , At the end of the paper is the address !

The following is a list today Redis Interview questions related to , See if you can answer .

Redis Advanced interview topics

 

* What is? Redis? Describe its advantages and disadvantages ?
* Redis And memcached What are the advantages of comparison ?
* Redis What data types are supported ?
* Redis What are the main physical resources consumed ?
* Redis What are the data elimination strategies ?
* Redis Why doesn't the government provide it Windows edition ?
* What is the maximum storage capacity of a string type value ?
* Why? Redis All data needs to be put into memory ?
* Redis What should cluster solutions do ? What are the plans ?
* Redis Under what circumstances will the cluster scheme make the whole cluster unavailable ?
* MySQL There are 2000w data ,redis Only exist in China 20w Data for , How to guarantee redis The data in is hot data ?
* Redis What are the appropriate scenarios ?
* Redis Supported Java What are the clients ? Which is the official recommendation ?
* Redis and Redisson What does it matter ?
* Jedis And Redisson What are the advantages and disadvantages of comparison ?
* say something Redis The concept of hash slot ?
* Redis What is the master-slave replication model of cluster ?
* Redis Will any write operations be lost in the cluster ? Why? ?
* Redis How are clusters replicated ?
* Redis What is the maximum number of nodes in the cluster ?
* Redis How to select database for cluster ?
* Redis What's the use of the pipe in ?
* How to understand Redis affair ?
* Redis What are the transaction related commands ?
* Rediskey How to set the expiration time and permanent validity of ?
* Redis How to do memory optimization ?
* Redis How does the recycle process work ?
* Lock mechanism
* Lock mutex mechanism
* watchdog Automatic extension mechanism
* Reentrant locking mechanism
* Release lock mechanism
* above Redis Disadvantages of distributed locks
* Used Redis Distributed lock , How does it work ?
* Used Redis Asynchronous queue , How do you use it ? What are the disadvantages ?
* What is cache penetration ? How to avoid it ? What is cache avalanche ? How to avoid ?
Answers to interview questions

1, What is? Redis? Describe its advantages and disadvantages ?

Redis Is the full name of :RemoteDictionary.Server, It's essentially a Key-Value In memory database of type , It's very similar memcached, The entire database is loaded in memory for operation , The database data is periodically transferred through asynchronous operations flush Save on hard disk .

Because it's a pure memory operation ,Redis The performance of is excellent , Can handle more than 10 10000 read and write operations , Is the fastest known performance Key-ValueDB.

Redis It's not just performance ,Redis The greatest charm is that it supports the preservation of multiple data structures , In addition, single value The maximum limit of 1GB, No memcached Save only 1MB Data for , therefore Redis It can be used to implement many useful functions . For example, with his List To do it FIFO Double linked list , Implementation of a lightweight high performance Message Queuing service , Use his Set It can be made with high performance tag System and so on .

in addition Redis You can also save Key-Value set up expire time , Therefore, it can also be used as a feature enhanced version memcached To use .Redis The main disadvantage of is that the database capacity is limited by physical memory , Cannot be used as high-performance read-write for massive data , therefore Redis The suitable scenarios are mainly limited to high-performance operations and operations with small amount of data .

2,Redis And memcached What are the advantages of comparison ?

* memcached All values are simple strings ,redis As its substitute , Support richer data types
* redis Speed ratio of memcached Much faster redis Speed ratio of memcached Much faster
* redis Can persist its data redis Can persist its data
3,Redis What data types are supported ?

String,List,Set,SortedSet,hashes

4,Redis What are the main physical resources consumed ?

Memory .

5,Redis What are the data elimination strategies ?

* noeviction: Returns an error when the memory limit is reached , And the client tries to execute commands that will allow more memory to be used .
* allkeys-lru: Try to recycle the least used key (LRU), Make the newly added data have space to store .
* volatile-lru: Try to recycle the least used key (LRU), But only for keys in expired sets , Make the newly added data have space to store .
* allkeys-random: Reclaim random keys to make space for newly added data .
* volatile-random: Reclaim random keys to make space for newly added data , But only for keys in expired sets .
* volatile-ttl: Reclaim keys in expired sets , And give priority to the recovery of survival time (TTL) Shorter keys , Make the newly added data have space to store .
Due to space constraints , Too long will be boring , It also affects the reading experience , The following will be shown in the form of pictures . For the original file and more resources, please

If you need to get it, please click three times to see the wechat of the assistant :(vip1024x) Add it and get it for free

It's OK to be interested in learning brain map in the article

If you need to get it, please click three times to see the wechat of the assistant :(vip1024x) Add it and get it for free

If you need to get it, please click three times to see the wechat of the assistant :(vip1024x) Add it and get it for free

 

Technology
©2019-2020 Toolsou All rights reserved,
How to prevent Mac put to sleep ? Tell you 4 This is an effective way be based on C# Students' grades / mis solve element-ui The drop-down box of has a value but cannot be selected Student information management system source code -C language VR,AR and MR The difference between these technologies 【 Data structure and algorithm 6】 Stack implementation of comprehensive calculator utilize python Yes monkey Automatic log analysis Laya Wechat games sub package loading Alibaba enterprise email smtp set up ( practice )【Java Details of knowledge points 3】 Serializable and Deserialize