当前位置:网站首页>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 .
边栏推荐
- 【九阳神功】2020复旦大学应用统计真题+解析
- View UI plus released version 1.2.0 and added image, skeleton and typography components
- 用栈实现队列
- vector
- Application architecture of large live broadcast platform
- FAQs and answers to the imitation Niuke technology blog project (II)
- 5. Function recursion exercise
- 西安电子科技大学22学年上学期《基础实验》试题及答案
- 【九阳神功】2021复旦大学应用统计真题+解析
- 8. C language - bit operator and displacement operator
猜你喜欢
凡人修仙学指针-2
arduino+DS18B20温度传感器(蜂鸣器报警)+LCD1602显示(IIC驱动)
2.初识C语言(2)
Tyut Taiyuan University of technology 2022 introduction to software engineering summary
The overseas sales of Xiaomi mobile phones are nearly 140million, which may explain why Xiaomi ov doesn't need Hongmeng
9.指针(上)
仿牛客技术博客项目常见问题及解答(一)
Change vs theme and set background picture
3.猜数字游戏
凡人修仙学指针-1
随机推荐
arduino+DS18B20温度传感器(蜂鸣器报警)+LCD1602显示(IIC驱动)
View UI plus releases version 1.1.0, supports SSR, supports nuxt, and adds TS declaration files
5. Download and use of MSDN
Smart classroom solution and mobile teaching concept description
为什么要使用Redis
View UI Plus 发布 1.1.0 版本,支持 SSR、支持 Nuxt、增加 TS 声明文件
Voir ui plus version 1.3.1 pour améliorer l'expérience Typescript
List set map queue deque stack
ABA问题遇到过吗,详细说以下,如何避免ABA问题
MySQL锁总结(全面简洁 + 图文详解)
Redis cache obsolescence strategy
稻 城 亚 丁
Redis实现分布式锁原理详解
Questions and answers of "signal and system" in the first semester of the 22nd academic year of Xi'an University of Electronic Science and technology
9. Pointer (upper)
ArrayList的自动扩容机制实现原理
魏牌:产品叫好声一片,但为何销量还是受挫
Detailed explanation of redis' distributed lock principle
ROS machine voice
7. Relationship between array, pointer and array