Tag:Redis cluster

  • Redis cluster solution


    Some time ago, we set up a redis cluster and wanted to use it as online storage for the recommendation system. It’s interesting to say that the infrastructure here is not perfect. Therefore, we need to build this storage environment by ourselves as the recommender system, and we have a lot of trouble. The awesome […]

  • Redis cluster details


    Redis cluster details Redis has three cluster modes, namely: *Master slave mode *Sentinel mode *Cluster mode Each of the three cluster modes has its own characteristics. For the introduction of redis, you can refer to NoSQL (2) – redis Redis official website: https://redis.io/ , latest version 6.0.5 Master slave mode Introduction of master slave modeMaster […]

  • (high concurrency detection) I. redis cluster deployment


    1. Node planning: There are two ways: 1 master + many slaves, many to master. The second way shares the master node and is easy to expand and reduce. Container name container IP address mapping port number service operation mode Redis-master1 6391->6379,16391->6379 master Redis-master2 6392->6379,16392->6379 master Redis-master3 6393->6379,16393->6379 master redis-slave1 6394->6379,16394->6379 […]

  • Implementation code of expired key monitoring in redis cluster


    1. Preface When using redis cluster, it is found that the expired key cannot be monitored all the time. There is no ready-made solution online. So I thought that since I can’t listen to the cluster, I can establish multiple redis connections to listen to each redis key expired. The above practices may not be […]

  • Redis automatic installation and cluster implementation process


    Redis instance installation Installation instructions: automatically decompress the installation package, compile and install it according to the specified path, copy the profile template to the data path of redis instance path, and modify it according to the port number Profile template Configuration file, current shell script, installation package Parameter 1: basedir, redis installation package path […]

  • Some optimizations and precautions of using Lua in redis


    Eval, evalsha command RedisAvailable from version 2.6.0evalCommand, via the built-inLuaInterpreter, which allows the user to execute a paragraphLuaScript and return data. becauseRedisThe characteristics of single thread model can guarantee theAtomicity(Lua is only used in recent projects). Please move to official documents for detailed usage. Script performance RedisIt ensures the atomicity of script execution, so before […]

  • Add cache to webplus


    In the previous article, we added a page for user management, which looks low, but we should learn. Today, add redis as the cache. 1 why cache When the amount of user access increases, the concurrent amount will increase, and the pressure of database query will increase at the same time. Although the query speed […]

  • Redis-4.0.14 cluster installation and deployment


    Redis-4.0.14 cluster installation and deployment The installation environment of this tutorial is KVM virtual machine and Intranet environment in NAT mode. In order to save server resources, this paper uses a single instance Linux host for demonstration. Do not deploy multiple redis instances to a Linux server in the case of large traffic in the […]

  • Redis cluster master-slave replication and sentinel mode implementation


    Redis master-slave replication First, prepare the machine. I use three Linux virtual machines, version 4.0.10 After entering the three machines, turn off the firewall first. My name is CentOS 7systemctl stop firewalld.service As shown in Figure 128, it is the machine that configures the redis master database, and the others are the slave databases. The […]

  • Redis Sentinel


    Brief Introduction to Redis-Sentinel Redis Sentinel is a distributed architecture that contains severalSentinelNode sumRedisData nodes, eachSentinelNodes will pair with data nodes and the restSentinelNode monitoring, when it finds that the node is not reachable, the node will be offline identified. If the primary node is identified, it will also be identified with other nodes.SentinelNodes “negotiate” […]

  • Redis Cluster Containerized Installation


    Overview of Redis Cluster Redis, as a popular memory data structure storage, can be used for data storage, caching and message proxy. This article will explain how to build Redis cluster based on docker. Redis cluster design includes two parts: master-slave replication and hash Slot.1.1. Master-slave replicationMaster-slave replication is common in databases and is commonly […]

  • Redis series – what is redis


    What is Redis Redis (Remote Dictionary Service) is a remote dictionary service. It is a memory-based storage service written in C language. Basic Data Structure of Redis Reids currently supports five basic data structures: string, list, hash, set, ZsetString (string) For the Structural Definition (SDS) in C, see “sds.h/sdshdr”Note:The code structure is different from the […]