• An Example of Redis Method for Implementing Distributed Locks and Waiting Sequences


    In a cluster, resource contention and concurrency problems often occur because of simultaneous processing, but we all know that synchronized, cas, ReentrankLock locks are JVM, which is useless in a cluster. At this time, we need to be able to decide the order of execution among multiple JVMs. Now distributed locks are mainly implemented by […]

  • Reasons and principles of redis single thread fast


    Redis’s fast execution depends mainly on the following reasons: (1) Pure memory operation, avoid a large number of access to the database, reduce direct access to disk data, redis will store data in memory, read and write data will not be restricted by the speed of hard disk I/O, so fast; (2) Single-threaded operation avoids […]

  • Detailed Usage of Redis Protocol


    Preface We have used many redis clients. Have we ever had a redis client of our own? In fact, it is very simple, based on socket, listen to port 6379, parse the data. Redis protocol The process of parsing data relies mainly on redis protocol. Let’s write a simple example to look at the redis […]

  • Detail redis port number


    The default port number for redis is 6379. REmote DIctionary Server (Redis) is a key-value storage system written by Salvatore Sanfilippo. Redis is an open source log-based, key-value database written in ANSI C, complied with BSD protocol, supported network, memory-based and persistent, and provides APIs in multiple languages. It is often referred to as a […]

  • Detailed introduction to Redis List list


    Detailed introduction to Redis List list The Redis list is a simple list of strings, sorted in insertion order. You can add either the head (left) or the tail (right) of an element guide list. A list can contain up to 232 – 1 elements (4294967295, with more than 4 billion elements per list). Example […]

  • Comparison of two persistence methods for redis data


    I. Concept Introduction Redis provides two ways of persistence: RDB (Redis DataBase) and Apend Only File (Apend Only File). RDB mode RDB is a snapshot persistence method, which persists data at a certain time to disk. In the process of data persistence, redis writes data to a temporary file first, and then replaces the last […]



    First: Installation First, let’s go to the official website: You can see from the official website that this is written by python, but happy is that CentOS is equipped with Python environment by default, such as centos7 here: 1. Install pip Friends who have studied Python should know that pip is a tool for […]

  • Redis hash type power node Java college collation


    Hash in redis is also the high frequency data structure we use. Its structure is basically the same as HashTable and Dictionary in programming language. If you have any logic to store in Dictionary in the future, you can give priority to redis according to the scenario. First: Common methods As long as it is […]

  • Redis hash and set-power node Java college collation


    Redis hash values are a mapping between string fields and string values, so they are perfect data types representing objects in Redis and can store more than 40 billion key-value pairs. Example redis> HMSET yiibai name “redis tutorial” description “redis basic commands for caching” likes 20 visitors 23000 OK redis> HGETALL yiibai 1) […]

  • DIRES Installation and Configuration Power Node Java Institute


    Install Redis on Ubuntu To install Redis on Ubuntu, open the terminal and type the following command: $sudo apt-get update $sudo apt-get install redis-server This will install Redis on your computer. Start Redis $redis-server Check whether Redis is working? $redis-cli This will open a Redis prompt, as shown in the following figure: redis> The […]

  • Redis collection type power node Java college collation


    Let’s take a look at the fourth of Redis’s five major types: Collection Types. Collection Types are interesting. First, look at the redis manual, as follows: The above is all the methods used by the set type in redis, or as the old saying goes, there are four commonly used methods (CURD)… First: Common methods […]

  • Redis Publish and Subscribe Power Node Java Academy Arrangement


    In fact, there is such a pattern in many MQ products. An example we often hear is the e-mail subscription scenario. What does it mean? That is to say, 100 people subscribe to your blog. If the blogger publishes an article, 100 people will receive notification email at the same time. In addition to this […]