当前位置:网站首页>Introduction to redis
Introduction to redis
2022-07-19 04:46:00 【xmh-sxh-1314】
1.1 Redis brief introduction
Redis It's open source (BSD The license ), Memory storage data structure server , It can be used as a database , Caching and message queuing agents . It supports strings 、 Hashtable 、 list 、 aggregate 、 Ordered set , Bitmap ,hyperloglogs And so on . Built in replication 、Lua Script 、LRU Take back 、 Transactions and different levels of disk persistence , At the same time through Redis Sentinel Provide high availability , adopt Redis Cluster Provide automatic zoning .
It can be used for general projects .
1.2 Redis Information
Redis There are still a lot of information , First of all, recommend Redis Information of Chinese website , Other
1.2.1 Preliminary tutorial
Redis course :http://www.runoob.com/redis/redis-tutorial.html, Novice tutorial , It's very detailed , After reading, it's basically right Redis Have a comprehensive understanding . Links to each part :
Redis course Redis brief introduction Redis install Redis To configure Redis data type
Redis command Redis key (key) Redis character string (String) Redis Hash (Hash) Redis list (List) Redis aggregate (Set) Redis Ordered set (sorted set) Redis HyperLogLog Redis Publish subscribe Redis Business Redis Script Redis Connect Redis The server
Redis Data backup and recovery Redis Security Redis Performance testing Redis Client connection Redis Pipeline technology Redis Partition Java Use Redis PHP Use Redis
1.2.2 Other tutorials
All command parsing :http://www.redis.net.cn/order/, You can inquire if you don't understand .
Two 、Redis Comparison with similar products
according to Redis An introduction to the ,Redis It can be used as a database , Caching and message queuing agents , So when you plan to use these functions , Consider the comparison with other products , Choose a better one .
1.1 As a database, compare it
Redis It can be used as a database , It can be seen as a key/value Type database , because Redis The data in memory will be written to the hard disk according to the configuration timing , In this way, you can still recover even after restarting , But there are several shortcomings to consider :
Redis Can only store key/value type , although value There can be many types of , But for related record query , No, Oracle/Mysql convenient .
Redis There is a certain time interval for memory data to be written to the hard disk , Data may be lost during this interval , Although various modes will be introduced later to ensure the possibility of data loss , But it is still possible , Therefore, it is not recommended to use if there are strict requirements on data Redis As a database .
1.2 As a comparison with cache
I think Redis My job is caching , Also available as a cache are Ehcache、Memcached . There is a blog that introduces it in detail :http://blog.csdn.net/jationxiaozi/article/details/8509732. Let me just summarize , Just talk about their biggest features , Reading speed is no longer considered , After all, it can be used as a caching tool for mutual comparison , The speed will not be too bad , List only the outstanding advantages and disadvantages , Listed means no other :
Ehcache
It's a Java Open source project , The way to use it is to introduce a jar package , Very convenient
Memcached
If multithreading mode is enabled , The reading speed will be greatly improved
Data will only be stored in memory , Data cannot be recovered after hanging up
Redis
The data structure is very rich , character string 、hash list 、list、Set wait
Support the master and slave ,Sentinal, Slicing and other advanced features , For load balancing and disaster recovery , High availability
Clients that support almost all languages
Choose the most suitable according to your needs .
1.3 As a message queue, compare it
Redis It can also be used as a message queue , The same function is better Kafka, The simple comparison is as follows :
Redis
It can only be said that it has the function of publishing and subscribing , One or more consumers subscribe to a channel
Kafka
Advanced features are available , colony 、 Load balancing 、 Dynamic capacity 、 Data backup, etc
So to speak , If it works Kafka Just use Kafka, General scenarios that are not sensitive to data can also be applied Redis Of .
边栏推荐
- MySQL InnoDB transaction related records
- Minio installation, deployment and use
- Leetcode remove element
- Redis cluster interview questions
- MySQL one line to many lines (split according to specific symbols)
- 探索:制药厂系统网络时钟同步(NTP时间同步服务器)
- Fudan micro fmql (domestic zynq) [PS of IAR bare metal development] - non byte aligned access
- Gin framework principle
- 高等数学笔记:伍月习题选集
- 删除文件 unable to find or create trash dirctory
猜你喜欢

UE-插件 ElectronicNodes 5.0.0/4.23-4.27

微信小程序之项目结构
![[vuforia] simple logic of image recognition](/img/c4/c3640fd37ec75d89da367d310b10a6.png)
[vuforia] simple logic of image recognition

Delete the file unable to find or create trash directory
![[Unity] Input. Index of gettouch[index]](/img/9d/ec0e4c9e6b1bb25976357469fe037f.png)
[Unity] Input. Index of gettouch[index]

力扣刷题02(三数之和+最大子序和+二叉树最近公共祖先)

minio安装部署及使用

高仿网易云音乐UI的微信小程序源码

Only when the data analysis report is written in this way can we really understand the data
![Fudan micro fmql (domestic zynq) [PS of IAR bare metal development] - non byte aligned access](/img/e7/8349da2c240ac8f51524e5e51bd4d6.png)
Fudan micro fmql (domestic zynq) [PS of IAR bare metal development] - non byte aligned access
随机推荐
手机平台上的用户空间锁概述
[Unity] Input.gettouch[index]的index
[daily question] sword finger offer II 041 Average value of sliding window
Warriors of the Visual Studio, Assemble! (Visual Studio的勇士们,汇编吧!) 原创 2009年07月12日 19:40:00 标签:汇编 /mic
Rk1126 realizes picture in picture function picture in picture for rk 1126
[Unity] 交互之双击
【燃料电池】基于simulink的燃料电池系统控制策略仿真
【FPGA教程案例26】在FPGA中通过verilog来实现小数的基础运算
Money making master applet [latest version 5.9.9] mall / instant withdrawal of commission / distribution promotion / phone recharge / is meituan hungry for takeout
异或和加密方式的解密的复现
Static attributes and static methods of class in JS
物业小区高校水电抄表充值管理系统
Gin framework principle
Overview of CKA core knowledge points
TiDB 性能优化概述
npm安装教程
Unit UMP Packaging Black Screen issue Summary
AutoJs学习-找图数据生成
Eureka, take advantage of the tens of millions of daily visits!
Demo analysis of sliding conflict external interception method