05Redis -- transaction, optimistic lock, Jedis

catalogue Normal execution of transactions Abandon transaction Compiled exception Runtime exception (I/O) Monitor} Watch (frequently asked in interview) redis monitoring test Normal execution succeeded!   Test multithreading to modify the value. Using watch can be used as redis optimistic lock operation Jedis Test: 1. Import cor ...

Posted by serg4444 on Sat, 05 Mar 2022 01:35:00 +0100

2021-04-16-Redis summary

Redis five data types String (String) be careful: The value of string is not limited to strings, such as ordinary strings, complex strings such as JSON,XML, numbers and even binary, but it can not exceed 512MB Next, let's demonstrate the basic operations of adding, deleting, modifying and querying SET key value GET key DEL key MSET key1 ...

Posted by cdpapoulias on Fri, 04 Mar 2022 07:11:24 +0100

How to implement distributed locks with Redis?

brief introduction   I believe that the biggest motivation for many people to learn distributed locks is not their own system needs, but the needs of interviewers... Of course, this also shows that the distribution lock is very important. It is often used as an examination question. Before learning, we need to clarify several questions. ...

Posted by Virii on Thu, 03 Mar 2022 13:15:01 +0100

How rabbimq ensures data security

I Persistence RabbitMQ supports message persistence, that is, data is written on disk. (1) exchange persistence, specifying durable = > 1 when declaring (2) queue persistence, specifying durable = > 1 when declaring (3) Message persistence, specifying delivery when delivering_ Mode = > 2 (1 is non persistent) Note: if the message is p ...

Posted by kraadde on Wed, 02 Mar 2022 06:26:09 +0100

Http proxy server - Netty version

Basic ideas First, explain the basic ideas. The following figure shows the location of the proxy server: From the position of the proxy server, its functions have three points Receive data from the requesterForward request to target serverForward the data of the target server to the requester Therefore, when we use Netty to build a proxy s ...

Posted by smonsivaes on Tue, 01 Mar 2022 16:34:52 +0100

Three ways Redis can realize current limiting

In the face of more and more high concurrency scenarios, the display of current limit is particularly important. Of course, there are many ways to implement current limiting. Redis has very powerful functions. I have practiced three ways with redis, which can be implemented in a relatively simple way. Redis can not only limit current, but also ...

Posted by weiwei on Mon, 28 Feb 2022 11:18:28 +0100

Middleware learning notes - Introduction to Redis

1. Redis (CACHE) 1.1 Nosql 1.1.1 general Single machine mysql era: In the 1990s, the number of visits to a basic website will not be too large, and a single database is enough! More use of static web pages html Website bottleneck: The amount of data is too large for one machineThe index of data can't fit into the memory of a machineToo m ...

Posted by rakennedy75 on Sun, 27 Feb 2022 09:33:32 +0100

Redis basic data type

Five basic data types of Redis For redis, all key s are strings. The basic data structure of Redis we usually talk about is the data type of stored value. The five common data types in Redis are: String, List, Set, Zset and Hash. structure type Value stored by structureStructure reading and writing abilityString stringCan be string, float ...

Posted by TheoGB on Sun, 27 Feb 2022 06:00:04 +0100

Redis or Zookeeper for distributed locks?

Distributed locks are usually implemented in the following ways: database Cache (e.g. Redis) Zookeeper etcd In actual development, Redis and Zookeeper are mostly used, so this article only talks about these two. Before discussing this issue, let's take a look at a business scenario: System A is an e-commerce system. At present, it is ...

Posted by itisme on Sun, 27 Feb 2022 00:51:50 +0100

Summary of common RedisTemplate methods (refer to official document 2.6.2)

1. Introduction RedisTemplate is the most advanced Abstract client provided by Spring Data Redis to users. Users can directly perform a variety of operations through RedisTemplate. 1.1 class inheritance public class RedisTemplate<K, V> extends RedisAccessor implements RedisOperations<K, V>, BeanClassLoaderAware { } RedisAccesso ...

Posted by jdwmk on Sat, 26 Feb 2022 20:54:42 +0100