How to Design High Performance Distributed Locks
What is a distributed lock?
In a JVM, where multiple threads are concurrent, we can use synchronous or Lock locks to ensure that only one thread can modify shared variables or execute code blocks at a time.However, our services are deployed on a distributed cluster basis, and for some shared resources, the use of Java locks in a distributed en ...
Added by gersh on Wed, 17 Jun 2020 19:51:19 +0300
Method of Using Redis to Count Web UV s
Article Directory
Preface
thinking
HyperLogLog
Use Redis command action
Working with Java code
The Principle and Feature of HyperLog Implementation
Implement HyperLog using Java
Summary
Preface
Web site UV refers to the amount of Unique Visitor visited by independent users of a Web site, that ...
Added by BlueSkyIS on Tue, 16 Jun 2020 03:56:18 +0300
Distributed Lock+Redis for Cluster Business Data Caching
Article Directory
Distributed Lock
1. Distributed Lock Implementation
2. Distributed Lock Using redis
Learning optimization
summary
Problems in the redis cluster state:
Solving distributed locks using redisson
1. Import dependent service-util
2. Configure redisson
Reentrant Lock
Test Code
Dis ...
Added by dev99 on Wed, 10 Jun 2020 19:17:31 +0300
spring session + redis to realize distributed session
introduction
In general, in order to solve a single point of failure, web applications in the production environment will be deployed on multiple platforms, so there will be a problem. When we log in, we will store the login information in the session. If we rely on the session in the native web con ...
Added by mouloud2001 on Tue, 09 Jun 2020 05:20:25 +0300
Simple use of redis distributed lock
RedisLock -- make Redis distributed lock simple
catalog
1. Project introduction
2. Fast use
2.1 introducing maven coordinates
2.2 register RedisLock
2.3 use
3. Participation and contribution
4. Contact the author
5. Open source protocol
1. Project introduction
This project mainly simplifies the operation of redis distributed transact ...
Added by work_it_work on Sat, 06 Jun 2020 05:57:21 +0300
Resource release of Redis
Write in front
see GitHub for all sample codes in this tutorial: https://github.com/selfconzrr/Redis_Learning
Why close the connection?
For example, the following code:
for(int i = 2000; i < 3000; i++) {
Jedis jedis = redisDao.getJedis();
jedis.set("user:" + i, jedis.toString());
System.o ...
Added by André D on Mon, 01 Jun 2020 20:42:26 +0300
Docker container and image of kubernetes
Container and image
container
Common container States
running
stopped
paused
created
deleted
Note: to view the commands used for docker status:
docker ps: container for viewing running status
docker ps -a: View containers in all States
docker ps -qa: view all container ID S
docker stop $(docker ps -qa): stop all containers
docker rm $(docke ...
Added by shutat on Mon, 01 Jun 2020 11:28:09 +0300
Microsoft.AspNetCore.Authentication.Cookies from entry to mastery
Original text:
Microsoft.AspNetCore.Authentication.Cookies from entry to mastery (2)
Microsoft.AspNetCore.Authentication.Cookies from entry to mastery (2)
catalog
Microsoft.AspNetCore.Authentication.Cookies from entry to mastery (2)
Cookie encryption
Cookie pseudo encryption (serialization / deserialization)
...
Added by DragonHighLord on Sat, 30 May 2020 06:26:04 +0300
ASP.NET Core file upload
Original text:
ASP.NET Core file upload
preface
First blog post Introduced how to asp.net Core uses Redis and Protobuf for Session caching. This article is a small function used in the development process, how to do single file and multi file upload. If you think it will help you, you may as well click "recommend".
cat ...
Added by bradleybebad on Mon, 25 May 2020 05:56:29 +0300
RedisTemplate implements message queuing and inserts data in batches.
In the early stage, due to the small business volume of the production environment. So logs are commit ted one by one. There was no problem with the operation.
Later, with the expansion of business concurrency, the log writing frequently deals with the database, resulting in the database connection pool often occupied, until the program crashes ...
Added by blyz on Fri, 22 May 2020 09:40:09 +0300