当前位置:网站首页>Why use redis
Why use redis
2022-07-06 13:39:00 【Wake up duck, did you program today?】
There are mainly the following two aspects
1、 In terms of high concurrency :
The requests that the direct operation cache can withstand are , Far greater than direct access to the database , So we can consider transferring part of the data in the database to the cache , In this way, some of the user's requests will go directly to the cache without going through the database
2、 In terms of high performance :
The user accesses some data in the database for the first time , Because it is read from hard profit, this process will be relatively slow , Store the data accessed by the user in the cache , The next time you access this data, you can get it directly from the cache , Operation cache is direct operation memory , So it's pretty fast
Why use Redis Not the others , for example Java Self contained map perhaps guava?
Cache is divided into local cache and distributed cache , image map and guava Local cache , The main characteristics of local cache are lightweight and fast , The life cycle follows jivm The destruction of , In the case of multiple instances , Each instance needs to save a cache , Cache is not consistent
Use redis or memcached It's called distributed caching , In the case of multiple instances , All instances share the same cache as the master The cache is consistent .
边栏推荐
- 优先队列PriorityQueue (大根堆/小根堆/TopK问题)
- 3.猜数字游戏
- Implement queue with stack
- MySQL锁总结(全面简洁 + 图文详解)
- [during the interview] - how can I explain the mechanism of TCP to achieve reliable transmission
- Service ability of Hongmeng harmonyos learning notes to realize cross end communication
- C language to achieve mine sweeping game (full version)
- 西安电子科技大学22学年上学期《射频电路基础》试题及答案
- Cloud native trend in 2022
- Share a website to improve your Aesthetics
猜你喜欢

Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis

C语言入门指南
![[面试时]——我如何讲清楚TCP实现可靠传输的机制](/img/d6/109042b77de2f3cfbf866b24e89a45.png)
[面试时]——我如何讲清楚TCP实现可靠传输的机制

Leetcode. 3. Longest substring without repeated characters - more than 100% solution

Pit avoidance Guide: Thirteen characteristics of garbage NFT project

甲、乙机之间采用方式 1 双向串行通信,具体要求如下: (1)甲机的 k1 按键可通过串行口控制乙机的 LEDI 点亮、LED2 灭,甲机的 k2 按键控制 乙机的 LED1

关于双亲委派机制和类加载的过程

Service ability of Hongmeng harmonyos learning notes to realize cross end communication

凡人修仙学指针-2
![[au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP](/img/d6/109042b77de2f3cfbf866b24e89a45.png)
[au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP
随机推荐
Redis的两种持久化机制RDB和AOF的原理和优缺点
稻 城 亚 丁
[the Nine Yang Manual] 2019 Fudan University Applied Statistics real problem + analysis
CorelDRAW plug-in -- GMS plug-in development -- Introduction to VBA -- GMS plug-in installation -- Security -- macro Manager -- CDR plug-in (I)
(ultra detailed onenet TCP protocol access) arduino+esp8266-01s access to the Internet of things platform, upload real-time data collection /tcp transparent transmission (and how to obtain and write L
Arduino+ water level sensor +led display + buzzer alarm
MySQL limit x, -1 doesn't work, -1 does not work, and an error is reported
2.初识C语言(2)
vector
9. Pointer (upper)
hashCode()与equals()之间的关系
(超详细二)onenet数据可视化详解,如何用截取数据流绘图
FAQs and answers to the imitation Niuke technology blog project (II)
Share a website to improve your Aesthetics
5. Function recursion exercise
The overseas sales of Xiaomi mobile phones are nearly 140million, which may explain why Xiaomi ov doesn't need Hongmeng
最新坦克大战2022-全程开发笔记-2
Questions and answers of "Fundamentals of RF circuits" in the first semester of the 22nd academic year of Xi'an University of Electronic Science and technology
杂谈0516
[au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP