The INCR key of redis implements simple traffic statistics

The INCR key of redis implements simple traffic statistics redis INCR document File thinking For example, use the incr of redis to write a method on the details page to make auto statistics on the visit. Get all the key s of incr and display them in order It should be noted here that keys cannot be used when taking all keys. Because red ...

Posted by jeffshead on Wed, 22 Apr 2020 07:24:22 -0700

A simple seckill system based on redis implemented by laravel

Note: there are many articles about redis seckill system on the Internet. They are all confused. Then they can realize one by themselves, which is also convenient for later study The implementation method is to use the list queue of redis, and the framework is laravel The core part is the pop operation of list. As atomicity, even if many user ...

Posted by cuboidgraphix on Mon, 20 Apr 2020 10:27:27 -0700

Redis Sentinel Deployment Process

Edition CentOS 8.1.1911(VMWare) redis 5.0.8 Essential information Server IP: 192.168.31.68 Redis port: 7000 (primary) 7001,7002 (slave) Sentinel port: 27000 27001 27002 The key code or command represents this Configure Redis master7000.conf bind 0.0.0.0 port 7000 daemonize yes dir /home/misty/redis-data/sentinel01 pidfile /var/run/redis_ ...

Posted by DJP1986 on Sun, 19 Apr 2020 03:20:08 -0700

Self growth of serial number by distributed lock

1. introduction In a distributed system, a service can start multiple replicas. When multiple replicas do one thing at the same time, there will be a problem of parallel. If there is a problem of data serial number duplication when new data is added, there are many ways to solve this problem, such as distributed locks, message queues, etc., in ...

Posted by techjosh on Wed, 15 Apr 2020 08:27:53 -0700

Redis sentinel mode to realize master-slave failover

Redis Sentinel is a distributed system. You can run multiple Sentinel processes in one architecture. These processes use the gossip protocols to receive information about whether the primary server is offline, and use the agreement protocols to decide whether to perform automatic failover, And which slave server to choose as the new master serv ...

Posted by adnan1983 on Tue, 14 Apr 2020 00:10:15 -0700

Integrating Spring Data ElasticSearch

1. Overview Spring Data ElasticSearch simplifies native ElasticSearch Characteristic: Based on the @ Configuration configuration, as long as it is configured in the yml file, it can be used in the project. Tool class ElasticsearchTemplate ES template, similar to general mapper, operates ES through object Provides a Repository for th ...

Posted by Svoboda on Mon, 13 Apr 2020 21:14:09 -0700

Take a look at Java's locks - CountDownLatch and CyclicBarrier

Take a look at the locks CountDownLatch and CyclicBarrier in Java Preface Basic introduction Use and difference Core source code analysis summary Preface Several articles have been written in Java JUC package. First of all, I spent 5 articles on AQS from the perspective of source code analysis. Why do I spend 5 articles on AQS? It's because ...

Posted by jokerofsouls on Sat, 11 Apr 2020 04:48:54 -0700

Python solves the slider verification, and the Scarpy framework collects data to the redis database!

Catalog Architecture introduction Installation creation and startup Profile directory introduction Crawling data and parsing Data persistence Save to file Save to redis Action chain, verification code to control sliding   Architecture introduction Scrapy is an open-source and collaborative framework, which was originally designed for page ...

Posted by cigardude on Sat, 11 Apr 2020 00:36:08 -0700

How to implement redis distributed lock

Distributed lock is a way to control the synchronous access of shared resources between distributed systems. In the distributed system, they often need to coordinate their actions. If different systems or different hosts of the same system share one or a group of resources, when accessing these resources, they often need to be mutually exclusiv ...

Posted by Jeroen_nld on Fri, 10 Apr 2020 23:02:20 -0700

How to use Redis service in Golang

During development, if there is a need for caching, you may need to add a Redis block to the background. The core package is open-source github.com/garyburd/redigo This package provides the connection of redis service and encapsulates various command functions of redis 1. First, install redis service for the comput ...

Posted by agga.gaag on Fri, 10 Apr 2020 08:36:39 -0700