The study of Redis-related data requires more reference information, because Redis is not widely used today. In this issue's Redis book recommendation topic, let the editor introduce to you several wonderful Redis-related books.
Redis Book Recommendation "Redis Practical Combat"
When you need to access rapidly changing data at near real-time speed When streaming data, a key-value database like Redis is an excellent choice for you. Redis extends the key-value pair mode by accepting various data types such as hashes, strings, lists, etc. It not only provides extremely fast in-memory data set operations, but also can easily persist these data to on the disk. In addition, Redis is free and open source.
This book introduces Redis itself and its key-value pair model. Readers will be exposed to actual use cases including caching, distributed advertising targeting, etc., and learn how to expand Redis starting from small tasks. To adapt to large-scale data sets, and how to integrate with other traditional relational databases or other NoSQL storage systems. Experienced developers should be interested in the more in-depth content such as clustering and server scripting.
Redis Book Recommendation: "Redis Design and Implementation"
Written by a senior Redis technology expert, it is a must-read for in-depth understanding of the inside story of Redis technology. Analyze the architecture design, implementation principles and working mechanism of Redis from the perspective of source code, and provide principle guidance for the efficient use of Redis.
"Redis Design and Implementation" comprehensively and completely explains the internal mechanism and implementation of Redis, introduces the implementation principles of most of Redis's single-machine functions and all multi-machine functions, and demonstrates the implementation of these functions. The core data structure and key algorithm ideas are rich in illustrations, clearly described, and a large amount of reference information is given. By reading this book, readers can quickly and effectively understand the internal structure and operating mechanism of Redis, and use Redis better and more efficiently.
Redis Design and Implementation" is mainly divided into four parts. The first part, "Data Structures and Objects," introduces various objects and their data structures in Redis, and explains how these data structures affect the functionality and performance of objects. The second part "Implementation of Stand-alone Database" introduces the Redis method of implementing stand-alone database, including database, RDB persistence, AOF persistence, events, etc. The third part, "Implementation of Multi-machine Database", introduces the three multi-machine functions of Sentinel, replication and clustering of Redis. The fourth part, "Implementation of Independent Functions", introduces each relatively independent functional module in Redis, involving publishing and subscription, transactions, Lua scripts, sorting, binary bit arrays, slow query logs, monitors, etc.
Redis book recommendation "Redis Getting Started Guide (2nd Edition)"
This book is designed to help readers start from scratch, understand Redis step by step, and enter Redis world. While introducing basic knowledge, this book also focuses on practice, with the goal of helping readers use Redis in actual projects as soon as possible, so that they can learn and use it immediately. Most chapters in the book adopt a task-driven explanation method. Through the fictional characters Xiaobai and Teacher Song, a practical task is set before introducing knowledge points, which not only improves readers' reading motivation, but also makes it easier for readers to read. Combine the knowledge points in the book with practice.
Main content
Introduce the history and characteristics of Redis, and answer why you should use Redis.
Explain how to deploy Redis in development and production environments.
Through practice, see the applicable scenarios of many Redis data types.
Introducing the sentinel and cluster-related features of Redis 3.0.
Comprehensive introduction to pipeline, transaction, persistence and replication technologies.
Reveal the storage structure of Redis in depth and analyze the Redis space optimization method.
How to implement practical functions such as online user recording, tag completion, and interval search based on Redis.
Use Redis to implement task queue.
Appreciate the charm of Redis scripts and understand the details and techniques of scripts.
The above is the detailed content of What are the redis books?. For more information, please follow other related articles on the PHP Chinese website!

Redis supports a variety of data structures, including: 1. String, suitable for storing single-value data; 2. List, suitable for queues and stacks; 3. Set, used for storing non-duplicate data; 4. Ordered Set, suitable for ranking lists and priority queues; 5. Hash table, suitable for storing object or structured data.

Redis counter is a mechanism that uses Redis key-value pair storage to implement counting operations, including the following steps: creating counter keys, increasing counts, decreasing counts, resetting counts, and obtaining counts. The advantages of Redis counters include fast speed, high concurrency, durability and simplicity and ease of use. It can be used in scenarios such as user access counting, real-time metric tracking, game scores and rankings, and order processing counting.

Use the Redis command line tool (redis-cli) to manage and operate Redis through the following steps: Connect to the server, specify the address and port. Send commands to the server using the command name and parameters. Use the HELP command to view help information for a specific command. Use the QUIT command to exit the command line tool.

Redis cluster mode deploys Redis instances to multiple servers through sharding, improving scalability and availability. The construction steps are as follows: Create odd Redis instances with different ports; Create 3 sentinel instances, monitor Redis instances and failover; configure sentinel configuration files, add monitoring Redis instance information and failover settings; configure Redis instance configuration files, enable cluster mode and specify the cluster information file path; create nodes.conf file, containing information of each Redis instance; start the cluster, execute the create command to create a cluster and specify the number of replicas; log in to the cluster to execute the CLUSTER INFO command to verify the cluster status; make

To read a queue from Redis, you need to get the queue name, read the elements using the LPOP command, and process the empty queue. The specific steps are as follows: Get the queue name: name it with the prefix of "queue:" such as "queue:my-queue". Use the LPOP command: Eject the element from the head of the queue and return its value, such as LPOP queue:my-queue. Processing empty queues: If the queue is empty, LPOP returns nil, and you can check whether the queue exists before reading the element.

Use of zset in Redis cluster: zset is an ordered collection that associates elements with scores. Sharding strategy: a. Hash sharding: Distribute the hash value according to the zset key. b. Range sharding: divide into ranges according to element scores, and assign each range to different nodes. Read and write operations: a. Read operations: If the zset key belongs to the shard of the current node, it will be processed locally; otherwise, it will be routed to the corresponding shard. b. Write operation: Always routed to shards holding the zset key.

How to clear Redis data: Use the FLUSHALL command to clear all key values. Use the FLUSHDB command to clear the key value of the currently selected database. Use SELECT to switch databases, and then use FLUSHDB to clear multiple databases. Use the DEL command to delete a specific key. Use the redis-cli tool to clear the data.

There are two types of Redis data expiration strategies: periodic deletion: periodic scan to delete the expired key, which can be set through expired-time-cap-remove-count and expired-time-cap-remove-delay parameters. Lazy Deletion: Check for deletion expired keys only when keys are read or written. They can be set through lazyfree-lazy-eviction, lazyfree-lazy-expire, lazyfree-lazy-user-del parameters.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools