当前位置:网站首页>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 .
边栏推荐
- 更改VS主题及设置背景图片
- There is always one of the eight computer operations that you can't learn programming
- 仿牛客技术博客项目常见问题及解答(三)
- 7.数组、指针和数组的关系
- 3.猜数字游戏
- Service ability of Hongmeng harmonyos learning notes to realize cross end communication
- The overseas sales of Xiaomi mobile phones are nearly 140million, which may explain why Xiaomi ov doesn't need Hongmeng
- Implement queue with stack
- 仿牛客技术博客项目常见问题及解答(二)
- Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis
猜你喜欢

西安电子科技大学22学年上学期《信号与系统》试题及答案

3. Number guessing game

Change vs theme and set background picture

西安电子科技大学22学年上学期《基础实验》试题及答案

Quickly generate illustrations

FAQs and answers to the imitation Niuke technology blog project (I)

2.初识C语言(2)

5. Function recursion exercise

使用Spacedesk实现局域网内任意设备作为电脑拓展屏

7. Relationship between array, pointer and array
随机推荐
[the Nine Yang Manual] 2021 Fudan University Applied Statistics real problem + analysis
C language Getting Started Guide
FAQs and answers to the imitation Niuke technology blog project (I)
【九阳神功】2022复旦大学应用统计真题+解析
5月14日杂谈
[the Nine Yang Manual] 2017 Fudan University Applied Statistics real problem + analysis
杂谈0516
View UI Plus 发布 1.3.0 版本,新增 Space、$ImagePreview 组件
The overseas sales of Xiaomi mobile phones are nearly 140million, which may explain why Xiaomi ov doesn't need Hongmeng
View UI Plus 發布 1.3.1 版本,增强 TypeScript 使用體驗
7. Relationship between array, pointer and array
2. Preliminary exercises of C language (2)
The latest tank battle 2022 full development notes-1
13 power map
用栈实现队列
[the Nine Yang Manual] 2016 Fudan University Applied Statistics real problem + analysis
受检异常和非受检异常的区别和理解
3. C language uses algebraic cofactor to calculate determinant
[graduation season · advanced technology Er] goodbye, my student days
[the Nine Yang Manual] 2019 Fudan University Applied Statistics real problem + analysis