preface
Redis is the most widely used cache in the technology architecture of the Internet today. Support complex data structures, support persistence, support primary/secondary clusters, support high availability, support large value stores…
Redis is also one of the most popular questions to be asked in technical interviews for middle and senior back-end engineers. Especially those excellent and highly competitive large Internet companies (such as Twitter, Sina Weibo, Ali Cloud, Tencent Cloud, Taobao, Zhihu, etc.) usually require interviewees not only to master the basic use of Redis, but also to have a deep understanding of the details and principles of the internal implementation of Redis. It is no exaggeration to say that if you can understand all the knowledge points of Redis, your half foot has already stepped into the technology research and development department of the big company you want.
However, the vast majority of developers only use Redis for data caching, using the simplest get/set methods, and little else about the details of Redis’ internal implementation. Such as:
-
Some students know the distributed lock of Redis, but do not know its internal implementation mechanism at all
-
Some of you know that Redis is a single-threaded structure, but do not understand why Redis can support high concurrency
-
Some of you know that Redis supports master and slave, but have no idea about the internal implementation mechanism
Redis In Action will be a book that takes readers into the world of Redis and points them in the right direction to avoid the usual pitfalls. I think Redis In Action is very helpful for the Redis ecosystem and Redis users will enjoy it.
— Salvatore Sanfilippo, “Father of Redis”
Easy to understand Redis
The book is divided into three parts: The first part gives a basic introduction to Redis and shows some examples of how to use Redis. The second part gives a detailed introduction to the commands of Redis, followed by an introduction to Redis management operations and how to use Redis to build more complex applications. The third part introduces how to expand Redis through memory optimization, horizontal sharding and Lua scripting.
Chapter 1 gives a basic introduction to Redis, enumerates 5 data structures provided by Redis, compares the similarities and differences between Redis and other databases, and realizes a simple article aggregation website that can vote articles.
Chapter 2 describes how to use Redis to improve application performance and how to use Redis for basic network analysis. Readers who don’t know Much about Redis should begin to understand why Redis has become more and more popular in recent years — because of its ease of use and its powerful performance.
Chapter 3 is basically a command document that goes through Redis common commands, basic transaction commands, sort commands, and expiration time commands, and gives examples of how to use these commands.
Chapter 4 introduces concepts such as data persistence, performance testing, failover, and preventing data loss. While the first few sections of this chapter focus on Redis management, sections 4.4 and 4.5 delve into the performance of Redis transactions and pipelined commands.
Chapter 5 describes using Redis as a database and using it to implement logs, counters, IP location finders, and service configurators.
Chapter 6 covers components that are useful for growing applications, such as auto-completion, locking, task queuing, messaging, and file distribution.
directory
Part 1 Introduction
The second part core knowledge points
The third part advanced content
Limited to the space limit of the platform, but also for everyone to better read, xiaobian Redis related to the information and interview related information are sorted out, interested friends can help forward the article, pay attention to the private letter reply [learning] to get access to it