Python redis usage (notes)

Introduction to the use of Python redis (see how to use it through the source code) redis is a key value database. Value supports string, list, set, Zset, hash and other types. 1. Install and start redis 1.1 install with brew 1. Check whether Redis is installed in the system brew info redis This command will display the redis informa ...

Posted by bharrison89 on Wed, 13 Apr 2022 07:01:56 +0300

Detailed explanation and deployment of Redis master-slave replication and sentinel mode under Centos

Detailed explanation and deployment of Redis master-slave replication and sentinel mode under Centos This article will introduce the Redis master-slave replication and sentinel mode, and then set up the master-slave replication and sentinel modes with the help of different ports of a single host The actual production environment requires ...

Posted by Awestruck on Tue, 12 Apr 2022 08:47:16 +0300

Redis has three other special types

reids launched geo location in version 3.2 The function of calculating the geographical distance between people in the two places can be used to calculate the geographical distance between people in the two places! Related commands: Adding data rules: two levels cannot be added directly, and can be imported at one time through java program ...

Posted by Crazy Horse on Tue, 12 Apr 2022 05:06:51 +0300

Notes on building big data components

1, Hadoop fully distributed deployment (1) Configure network, firewall and NTP Select VMnet8 for network adapter, VMnet8 for virtual network editor, and ip192 for subnet 168.196.0Configure IP address vi /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.196.101 (virtual machine IP (address) NETMASK=255.255. ...

Posted by alpachino on Mon, 11 Apr 2022 07:56:59 +0300

It may be the first project using RediSearch in the whole network

Actual project address newbeemall , RediSearch is integrated. The open source code has been uploaded. If it is supported, you can click star 😁RediSearch It is an application developed based on Redis that supports secondary index, query engine and full-text search. In version 2.0, take a brief look at the official website test report:Index cons ...

Posted by johnsiilver on Wed, 06 Apr 2022 19:35:54 +0300

Redisson distributed lock quick start tutorial

Qingming has nothing to do at home, and can only stay at home because of the Shanghai epidemic. It suddenly occurred to me that I planned to write a Redisson distributed lock quick start tutorial. I can only use it easily at work, so the article may be relatively simple. I hope the boss will not spray it. This article is also used as a personal ...

Posted by adam1984 on Tue, 05 Apr 2022 16:15:44 +0300

redis of distributed lock implementation

Reprint address: https://xiaomi-info.github.io/2019/12/17/redis-distributed-lock/ 1, Introduction When we modify existing data in the system, we need to read it first, then modify and save it. At this time, it is easy to encounter concurrency problems. Since modification and saving are not atomic operations, some data operations may be lost i ...

Posted by abazoskib on Tue, 05 Apr 2022 12:29:29 +0300

Website statistics - design ideas (number of visitors, number of views, average visit time, average number of people online at the same time, maximum number of people online at the same time)

preface The website has been done well, and the leaders asked for several indicators. They have been looking for them online for a long time. Two ideas: 1. Baidu, Tencent, etc. provide statistical product interface, which can be used directly and is very convenient. But the way to use it is to put the data on their server and let them analyz ...

Posted by tomdelonge on Mon, 04 Apr 2022 02:24:44 +0300

Redis distributed lock and redis cluster construction

1, Thread lock and distributed lock Thread lock item Monomer project step The code is as follows //Define static global locks private readonly static object _lock = new object(); // Add code to controller lock (_lock) { Stock sto = new Stock(); sto = demoDbContext.stock.Where(p => p.ID == 1).FirstOrDefault ...

Posted by kkeim on Sat, 02 Apr 2022 17:44:06 +0300

Redis implements distributed locks (stand-alone version)

I Distributed lock What is distributed lock?   to introduce distributed lock, we should first mention that thread lock and process lock correspond to distributed lock. Thread Lock: mainly used to Lock methods and code blocks. When a method or code uses a Lock, only one thread executes the method or code segment at the same time. Thread L ...

Posted by satheshf12000 on Fri, 01 Apr 2022 09:18:59 +0300