Use Redis for inventory deduction in e-commerce systems

In daily development, there are many similar operations to reduce inventory, such as goods inventory in e-commerce system, prize inventory in lottery system, etc. 1 Solution Using the mysql database, use a field to store the inventory, each time the inventory is deducted to update the field.Use the database, but store multiple copies of t ...

Added by corkg on Fri, 17 Dec 2021 19:41:29 +0200

REDIS10_Redission's entry case, multi master case building, locking and unlocking distributed locks, and underlying source code analysis

①. How to develop based on the official website ①. Enter the Chinese official website of redis and click document ②. Select distributed lock to open the page ③. Click Wiki ④. In the follow-up, you can refer to the documents about distributed locks ⑤. The concept of flying in the sky (RedLock) must be realized by landing (Redisson) ⑥. ...

Added by kellydigital on Fri, 17 Dec 2021 15:43:24 +0200

[Special Topic on Redis core principles] [technology improvement series] analyze and explore how to realize the hot key discovery mechanism of LFU and the principle of internal Scan technology

Preface introduction It is inevitable that there are access hotspots in the business, and redis will also encounter this problem. However, how to find the hot key has been perplexing many users. Redis4 0 has brought us many new features, including LFU based hot key discovery mechanism. Least Frequently Used Least Frequently Used - referred t ...

Added by Patrick on Fri, 17 Dec 2021 11:33:19 +0200

Detailed explanation of Redis basic functions

Distributed cache - detailed explanation of Redis basic functions 1. Preface After several years of development, the concept of cache should be familiar. Common cache components include redis, mongodb and memcached. This article briefly introduces the common usage scenarios of redis and the use of basic APIs. redis is a database based on key ...

Added by bugsuperstar37 on Fri, 17 Dec 2021 06:28:49 +0200

Linux single server deployment redis cluster, sentry cluster

Environmental Science: 1. There is only one Linux server 2. Use docker compose for deployment (the use of docker compose will not be introduced here) 1,docker images Use redis in your own image 2,docker network ls   View the existing network segment (Note: it must be the same network segment, otherwise it will be inaccessible) You can al ...

Added by ziesje on Fri, 17 Dec 2021 01:13:10 +0200

Java project: design and implementation of epidemic prevention platform with front-end and back-end separation (java+springmvc+VUE+node.js+mybatis+mysql+springboot+redis+jsp)

Main technologies: Java, springmvc, VUE, node JS, mybatis, mysql, tomcat, jquery, layui, bootstrap, JavaScript, html, css, jsp, log4j and other common basic technologies. The main module functions include: Administrator user login: user login. User information: the list view, modification and deletion of user information data, and the corres ...

Added by cheekydump on Thu, 16 Dec 2021 19:32:52 +0200

Redis data type - integer set learning notes

preface Learning notes on Redis underlying integer set (intset). This data type is relatively simple. The main knowledge points are the upgrading of set elements, the search and insertion of elements. In the implementation of element search, the binary search algorithm is used. If you want to learn the implementation of Redis binary sear ...

Added by scristaldi on Thu, 16 Dec 2021 04:50:07 +0200

Java distributed locking schemes and differences

Implementation of distributed lock There are three common implementations of distributed locks: Redis implementationZookeeper implementationDatabase implementation 1. Redis based implementation There are three important commands in Redis. Distributed locking can be realized through these three commands setnx key val: if and only if the key ...

Added by flemingmike on Thu, 16 Dec 2021 03:56:55 +0200

Master slave replication, clustering and application [Redis Chapter 4]

1. Master slave replication 1.1 INTRODUCTION What is master-slave replication? After the host data is updated, it is automatically synchronized to the Master / Slave mechanism of the standby machine according to the configuration and policy. The Master is mainly write and the Slave is mainly read. purpose Read write separation, perf ...

Added by viriio on Thu, 16 Dec 2021 02:58:48 +0200

Establishment and use of sentinel mode of redis high availability cluster

1, Briefly talk about the redis sentinel sentinel mode 1. Make the redis cluster more robust and highly available. Compared with redis cluster, it can automatically failover and automatically transform the master 2. Its workflow is that Sentinel will constantly check whether your master server and slave server are operating normally. If there ...

Added by jamesmage on Wed, 15 Dec 2021 16:57:54 +0200