Chapter 1, Getting Started with Redis, covers the step-by-step installation of a Redis Server and basic operations, including starting and shutting down the Redis Server, connecting to Redis with redis-cli, and getting server information. The Redis Event Model and Redis protocol are also covered at the end of this chapter.
Chapter 2, Data Types, talks about Redis data types and their common operational API commands. All data types that are supported in Redis 4.x (string, list, hash, Set, Sorted Set, HyperLogLog, and Geo) will be covered in this chapter. Basic Redis key management is also discussed.
Chapter 3, Data Features, covers a few useful Redis features that make data manipulation easier. It first shows how to use bitmaps, sort, and setting key expiration. You will then be introduced to three important features of Redis: pipeline, transaction, and PubSub. At the end of this chapter, we will demonstrate how to write and debug Lua scripts in Redis.
Chapter 4, Developing with Redis, demonstrates how to develop applications with Redis. First, it discusses the usage scenario of Redis and the choice of data types and APIs. Then, it shows examples of developing Java and Python applications with the Redis Client libraries, Jedis and redis-py. Lastly, we will cover examples of using Redis in the Spring Framework and writing a MapReduce/Spark job will also be covered.
Chapter 5, Replication, covers the Redis replication mechanism. It shows how to set up a Redis slave and explains how Redis replication works. Then, topics of optimizing and troubleshooting Redis replication will be discussed.
Chapter 6, Persistence, introduces the two persistence options in Redis: RDB and AOF. It shows how to enable RDB and AOF persistence in Redis and explains how things work behind the scenes. It also talks about the difference between RDB and AOF and how to utilize the combination of these two options.
Chapter 7, Setting Up High Availability and Cluster, covers the high availability of Redis. It demonstrates how to set up Redis Sentinels and Redis Clusters. A few experiments will be shown to explain how Redis Sentinel and Cluster work.
Chapter 8, Deploying to a Production Environment, discusses the things to notice when deploying Redis in a production environment. It first talks about the operation system, network, and security concerns. Then, it touches upon the topics of tweaking configuration and logging Redis. Setting up the LRU policy is also included. Lastly, we will look at Redis benchmarking.
Chapter 9, Administrating Redis, covers various Redis administration tasks, including updating server settings, using redis-cli, backing up and restoring data, managing memory usage, managing client, and data migration.
Chapter 10, Troubleshooting Redis, provides some practical examples on troubleshooting Redis issues. It covers the usage of slow log to identify slow queries and demonstrate common cases of troubleshooting latency, memory, and crash issues.
Chapter 11, Extending Redis with Redis Module, discusses how to extend the Redis functionality with the Redis Module. It talks about how the Redis module works and then demonstrates how to build Redis Modules with Redis Modules SDK.
Chapter 12, The Redis Ecosystem, talks about third-party components for Redis. A few popular tools, clients, and proxies are also briefly introduced.
Appendix, Windows Environment Setup, explains how to configure Windows environment for Redis.