当前位置:网站首页>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 .
边栏推荐
- Smart classroom solution and mobile teaching concept description
- IPv6 experiment
- 西安电子科技大学22学年上学期《基础实验》试题及答案
- [during the interview] - how can I explain the mechanism of TCP to achieve reliable transmission
- 自定义RPC项目——常见问题及详解(注册中心)
- Redis的两种持久化机制RDB和AOF的原理和优缺点
- [modern Chinese history] Chapter 9 test
- Data manipulation language (DML)
- Summary of multiple choice questions in the 2022 database of tyut Taiyuan University of Technology
- 【九阳神功】2016复旦大学应用统计真题+解析
猜你喜欢
Smart classroom solution and mobile teaching concept description
3.猜数字游戏
C语言实现扫雷游戏(完整版)
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
6. Function recursion
20220211-CTF-MISC-006-pure_ Color (use of stegsolve tool) -007 Aesop_ Secret (AES decryption)
FAQs and answers to the imitation Niuke technology blog project (II)
C语言入门指南
5. Function recursion exercise
(原创)制作一个采用 LCD1602 显示的电子钟,在 LCD 上显示当前的时间。显示格式为“时时:分分:秒秒”。设有 4 个功能键k1~k4,功能如下:(1)k1——进入时间修改。
随机推荐
最新坦克大战2022-全程开发笔记-2
[modern Chinese history] Chapter 6 test
[面試時]——我如何講清楚TCP實現可靠傳輸的機制
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
1. C language matrix addition and subtraction method
View UI plus released version 1.3.1 to enhance the experience of typescript
Mortal immortal cultivation pointer-1
FAQs and answers to the imitation Niuke technology blog project (II)
hashCode()与equals()之间的关系
MySQL事务及实现原理全面总结,再也不用担心面试
FAQs and answers to the imitation Niuke technology blog project (III)
Redis的两种持久化机制RDB和AOF的原理和优缺点
Change vs theme and set background picture
【九阳神功】2016复旦大学应用统计真题+解析
8. C language - bit operator and displacement operator
杂谈0516
为什么要使用Redis
西安电子科技大学22学年上学期《信号与系统》试题及答案
20220211-CTF-MISC-006-pure_ Color (use of stegsolve tool) -007 Aesop_ Secret (AES decryption)
2. C language matrix multiplication