官术网_书友最值得收藏!

What this book covers

Chapter 1, Getting Started (The Baby Steps), shows you how to install Redis and how to use redis-cli, the default Redis command-line interface. It also shows you how to install Node.js and goes through a quick JavaScript syntax reference. The String, List, and Hash data types are covered in detail, along with examples of redis-cli and Node.js.

Chapter 2, Advanced Data Types (Earning a Black Belt), is a continuation of the previous chapter. It presents the Set, Sorted Set, Bitmap, and HyperLogLog data types. All the examples here are implemented with redis-cli and Node.js.

Chapter 3, Time Series (A Collection of Observations), uses all of the knowledge of data types from the previous chapters to build a time series library in Node.js. The examples are incremental; the library is initially implemented using the String data type, and then the solution is improved and optimized by using the Hash data type. Uniqueness support is added to the String and Hash implementations by using the Sorted Set and HyperLogLog data types, respectively.

Chapter 4, Commands (Where the Wild Things Are), introduces Pub/Sub, transactions, and pipelines. It also introduces the scripting mechanism, which uses the Lua programming language to extend Redis. A quick Lua syntax reference is also presented. A great variety of Redis commands are presented in this chapter, including the administration commands and data type commands that were not covered in the previous chapters. This chapter also shows you how to change Redis's configuration to optimize different data types for memory or performance.

Chapter 5, Clients for Your Favorite Language (Become a Redis Polyglot), shows how to use Redis with PHP, Python, and Ruby. This chapter highlights the features that vary more frequently with clients in different languages: blocking commands, transactions, pipelines, and scripting.

Chapter 6, Common Pitfalls (Avoiding Traps), illustrates some common mistakes when using Redis in a production environment and related stories from real-world companies. The pitfalls in this chapter include using the wrong data type for a given problem, using too much swap space, and using inefficient backup strategies.

Chapter 7, Security Techniques (Guard Your Data), shows how to set up basic security with Redis, disable and obfuscate commands, protect Redis with firewall rules, and use client-to-server SSL encryption with stunnel.

Chapter 8, Scaling Redis (Beyond a Single Instance), introduces RDB and AOF persistence, replication via Redis slaves, and different methods of partitioning data across different hosts. This chapter also shows how to use twemproxy to distribute Redis data across different instances transparently.

Chapter 9, Redis Cluster and Redis Sentinel (Collective Intelligence), demonstrates the differences between Redis Cluster and Redis Sentinel, their goals, and how they fit into the CAP theorem. It also shows how to set up both Sentinel and Cluster, their configurations, and what happens in different failure scenarios. Redis Cluster is covered in more detail, since it is more complex and has different tools for managing a cluster of instances. Cluster administration is explained via native Redis commands and the redis-trib tool.

主站蜘蛛池模板: 镇巴县| 华宁县| 屏东市| 黎平县| 吴堡县| 嘉黎县| 汉中市| 烟台市| 安乡县| 张掖市| 双牌县| 芦山县| 东乡县| 灵寿县| 永济市| 青海省| 木兰县| 沁源县| 子长县| 宁阳县| 东城区| 湛江市| 庆城县| 石楼县| 宁陕县| 柘城县| 澄城县| 安徽省| 东阿县| 军事| 高州市| 瓮安县| 读书| 阜新市| 岑溪市| 襄垣县| 垦利县| 佛山市| 张家川| 福泉市| 定西市|