Improving multi-level cache based on Nginx+Lua
1 Introduction to multi-level cache architecture
In any project, we have some frequent queries, and the frequent query data are basically the same. For example, in the project, we view user personal information, shopping Carnival query activity information. These function points are used frequently, and we generally need to deal with the ...
Posted by Bill H on Mon, 17 Jan 2022 07:26:41 +0100
Common problems in redis development - cache penetration - cache avalanche - redis brain crack
Common problems in redis development - cache penetration - cache avalanche - redis brain crack - cache breakdown
preface
In our daily development, we all use the database to store data. Because there is usually no high concurrency in general system tasks, it seems that there is no problem. However, once the demand for a large amount of ...
Posted by DickDeeds on Wed, 12 Jan 2022 02:17:01 +0100
Redis master-slave replication
concept
Master Slave replication refers to copying data from one Redis server to other Redis servers. The former is called master/leader and the latter is called slave/follower; Data replication is unidirectional and can only be from master node to Slave node. Master mainly writes, Slave mainly reads.
Master-slave copy, read-write separation! ...
Posted by jamesgrayking on Tue, 11 Jan 2022 04:14:34 +0100
Second kill system - multi level cache practice of commodity detail page
1, Background cache optimization idea
The performance of a website is good or bad, and the impact of network IO and disk IO is relatively large. The purpose of introducing cache now is to improve the performance of the website. In fact, the essence is not to use the disk memory to reduce the disk IO to improve the performance. But have w ...
Posted by mortal991 on Fri, 07 Jan 2022 15:44:42 +0100
Introduction to Redis
Redis overview
Redis is a key value storage system (official website: http://redis.io ), is a distributed cache database
Redis initial operation
Start redis service
Startup in docker environment (multiple containers need to be run to start docker environment):
The # bottom layer of docker start redis01 is also started through redis serv ...
Posted by binujayaraj on Fri, 07 Jan 2022 06:40:09 +0100
redis distributed lock
Overview of distributed locks
Before understanding distributed locks, we should first know why distributed locks are used. Let's first understand the following cache exceptions
Cache exception
Cache penetration
It refers to querying a certain nonexistent data. Because the cache does not hit, we will query the database, but the database doe ...
Posted by Morrigan on Thu, 06 Jan 2022 13:17:09 +0100
Detailed analysis of Mybatis cache
Detailed analysis of Mybatis cache
1, Cache cache
The purpose of caching is to improve the efficiency of query and reduce the pressure on the database. MyBatis provides level 1 cache and level 2 cache, and reserves an interface for integrating third-party cache. All classes related to cache in MyBatis are in the cache package. There is a ...
Posted by SaxMan101 on Thu, 06 Jan 2022 10:05:20 +0100
Spring__ Interpretation of circular dependence
What is circular dependency
The creation of class a depends on class B, and the creation of class B depends on class A
There are four simple cases
DependencyDependency injection modeAre circular dependencies resolvedAB interdependence (cyclic dependency)setter method is used for injectionyesAB interdependence (cyclic dependency)All are inje ...
Posted by Pointybeard on Wed, 05 Jan 2022 01:33:17 +0100
Use Redis to make your interface automatically idempotent
1, What is interface idempotency
Idempotency is that the results of only multiple operations are consistent. Someone here may have questions.
Q: why should the results of multiple operations be consistent? For example, when I query data, what I find out is the same every time. Even if I modify it, should it be the same every time?
A: by mult ...
Posted by byrt on Tue, 04 Jan 2022 22:32:00 +0100
Redis publish / subscribe
Redis implements the publish / subscribe function, and developers can quickly carry out scenario applications through this lightweight function. SUBSCRIBE,UNSUBSCRIBE and PUBLISH Realized Publish / subscribe messaging paradigm , this decoupling between publishers and subscribers can achieve greater scalability and more dynamic network topology. ...
Posted by jeremyphphaven on Tue, 04 Jan 2022 19:15:55 +0100