当前位置:网站首页>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 .
边栏推荐
- 仿牛客技术博客项目常见问题及解答(三)
- (super detailed II) detailed visualization of onenet data, how to plot with intercepted data flow
- Detailed explanation of redis' distributed lock principle
- 5月27日杂谈
- FAQs and answers to the imitation Niuke technology blog project (III)
- [the Nine Yang Manual] 2021 Fudan University Applied Statistics real problem + analysis
- 7. Relationship between array, pointer and array
- 2.初识C语言(2)
- The latest tank battle 2022 - Notes on the whole development -2
- MySQL limit x, -1 doesn't work, -1 does not work, and an error is reported
猜你喜欢
自定义RPC项目——常见问题及详解(注册中心)
7. Relationship between array, pointer and array
PriorityQueue (large root heap / small root heap /topk problem)
fianl、finally、finalize三者的区别
3.C语言用代数余子式计算行列式
FAQs and answers to the imitation Niuke technology blog project (I)
4. Binary search
2.初识C语言(2)
2.C语言矩阵乘法
The latest tank battle 2022 - Notes on the whole development -2
随机推荐
[modern Chinese history] Chapter 6 test
View UI Plus 发布 1.2.0 版本,新增 Image、Skeleton、Typography组件
View UI plus released version 1.3.1 to enhance the experience of typescript
Cookie和Session的区别
[the Nine Yang Manual] 2016 Fudan University Applied Statistics real problem + analysis
为什么要使用Redis
Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis
View UI plus released version 1.3.0, adding space and $imagepreview components
【九阳神功】2019复旦大学应用统计真题+解析
(原创)制作一个采用 LCD1602 显示的电子钟,在 LCD 上显示当前的时间。显示格式为“时时:分分:秒秒”。设有 4 个功能键k1~k4,功能如下:(1)k1——进入时间修改。
[面試時]——我如何講清楚TCP實現可靠傳輸的機制
ArrayList的自动扩容机制实现原理
仿牛客技术博客项目常见问题及解答(三)
The overseas sales of Xiaomi mobile phones are nearly 140million, which may explain why Xiaomi ov doesn't need Hongmeng
Leetcode.3 无重复字符的最长子串——超过100%的解法
3. Number guessing game
The latest tank battle 2022 - full development notes-3
ROS machine voice
仿牛客技术博客项目常见问题及解答(一)
9.指针(上)