欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

基于Redis6.2.6版本部署Redis?Cluster集群的問題

 更新時間:2022年04月01日 10:09:49   作者:Jiangxl~  
這篇文章主要介紹了基于Redis6.2.6版本部署Redis?Cluster集群,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

1.Redis6.2.6簡介以及環(huán)境規(guī)劃

在Redis6.x版本中主要增加了多線程的新特性,多線性對于高并發(fā)場景是非常有必要的。

Redis6.x新特性如下:

  • 多線程IO
  • 重新設(shè)計了客戶端緩存功能
  • RESP3協(xié)議
  • 支持SSL
  • ACL權(quán)限控制
  • 提升了RDB日志加載速度
  • 發(fā)布官方的Redis集群代理模塊 Redis Cluster proxy

Redis Cluster集群原理可以查看之前發(fā)布的文章。

環(huán)境規(guī)劃:

IP主機(jī)名端口號節(jié)點
192.168.20.10redis-cluster6701master
192.168.20.10redis-cluster6702slave—>6705的master
192.168.20.10redis-cluster6703master
192.168.20.10redis-cluster6704slave—>6701的master
192.168.20.10redis-cluster6705master
192.168.20.10redis-cluster6706slave—>6703的master

架構(gòu)圖:

Reids集群采用三主三從交叉復(fù)制架構(gòu),由于服務(wù)器數(shù)量有限,在一臺機(jī)器中模擬出集群的效果,在實際生產(chǎn)環(huán)境中,需要準(zhǔn)備三臺機(jī)器,每臺機(jī)器中分別部署兩臺Redis節(jié)點,一主一從,交叉?zhèn)浞荨?/p>

2.二進(jìn)制安裝Redis程序

2.1.二進(jìn)制安裝redis6.2.6

1.下載reids
[root@k8s-master1 /data/]# wget https://download.redis.io/releases/redis-6.2.6.tar.gz

2.解壓并安裝redis
[root@k8s-master1 /data/]# tar xf redis-6.2.6.tar.gz
[root@k8s-master1 /data/]# cd redis-6.2.6
[root@k8s-master1 /data/redis-6.2.6]# make

2.2.創(chuàng)建Reids Cluster集群目錄

1.創(chuàng)建Redis Cluster各集群節(jié)點的配置文件存放路徑
[root@k8s-master ~]# mkdir /data/redis-6.2.6-cluster/{bin,conf,data,var,logs} -p
[root@k8s-master ~]# ll /data/redis-6.2.6-cluster/
總用量 0
drwxr-xr-x 2 root root 6 3月  31 15:36 bin				#可執(zhí)行文件
drwxr-xr-x 2 root root 6 3月  31 15:36 conf				#配置文件
drwxr-xr-x 2 root root 6 3月  31 15:36 data				#數(shù)據(jù)文件
drwxr-xr-x 2 root root 6 3月  31 15:36 log				#日志文件
drwxr-xr-x 2 root root 6 3月  31 15:36 var				#pid文件

2.準(zhǔn)備redis可執(zhí)行命令
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-benchmark /data/redis-6.2.6-cluster/bin
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-check-aof /data/redis-6.2.6-cluster/bin
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-check-rdb /data/redis-6.2.6-cluster/bin
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-cli /data/redis-6.2.6-cluster/bin
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-sentinel /data/redis-6.2.6-cluster/bin
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-server /data/redis-6.2.6-cluster/bin
[root@k8s-master1 /data/redis-6.2.6]# cp src/redis-trib.rb /data/redis-6.2.6-cluster/bin

3.配置Redis Cluster三主三從交叉復(fù)制集群

3.1.準(zhǔn)備六個節(jié)點的redis配置文件

redis6.2.6版本配置文件所有內(nèi)容如下,主要配置帶注釋的行。

bind 0.0.0.0
protected-mode no				#關(guān)閉保護(hù)模式
port 6701						#端口號
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6701.pid				#pid存放
loglevel notice
logfile /data/redis-6.2.6-cluster/logs/redis_6701.log				#日志存放路徑
databases 16
always-show-logo yes												#是否顯示總?cè)罩?
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename redis_6701.rdb												#持久化數(shù)據(jù)文件名稱
rdb-del-sync-files no
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
oom-score-adj no
oom-score-adj-values 0 200 800
disable-thp yes
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
lua-time-limit 5000
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6701.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000								#集群超時時間
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes

1.復(fù)制二進(jìn)制中的配置文件

[root@k8s-master redis-6.2.6]# cp redis.conf /data/redis-6.2.6-cluster/conf/

2.Reids 6701節(jié)點配置文件內(nèi)容

[root@k8s-master conf]# vim redis_6701.conf
bind 0.0.0.0					#監(jiān)聽地址
protected-mode no				#關(guān)閉保護(hù)模式
port 6701						#端口號
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6701.pid				#pid存放路徑
logfile /data/redis-6.2.6-cluster/logs/redis_6701.log				#日志存放路徑
always-show-logo yes											 #是否顯示總?cè)罩?
dbfilename redis_6701.rdb												#持久化數(shù)據(jù)文件名稱
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6701.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000								#集群超時時間

3.Reids 6702節(jié)點配置文件內(nèi)容

[root@k8s-master conf]# vim redis_6702.conf
bind 0.0.0.0					#監(jiān)聽地址
protected-mode no				#關(guān)閉保護(hù)模式
port 6702						#端口號
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6702.pid				#pid存放路徑
logfile /data/redis-6.2.6-cluster/logs/redis_6702.log				#日志存放路徑
always-show-logo yes											 #是否顯示總?cè)罩?
dbfilename redis_6702.rdb												#持久化數(shù)據(jù)文件名稱
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6702.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000								#集群超時時間

4.Reids 6703節(jié)點配置文件內(nèi)容

[root@k8s-master conf]# vim redis_6702.conf
bind 0.0.0.0					#監(jiān)聽地址
protected-mode no				#關(guān)閉保護(hù)模式
port 6703						#端口號
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6703.pid				#pid存放路徑
logfile /data/redis-6.2.6-cluster/logs/redis_6703.log				#日志存放路徑
always-show-logo yes											 #是否顯示總?cè)罩?
dbfilename redis_6703.rdb												#持久化數(shù)據(jù)文件名稱
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6703.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000		

5.Reids 6704節(jié)點配置文件內(nèi)容

[root@k8s-master conf]# vim redis_6702.conf
bind 0.0.0.0					#監(jiān)聽地址
protected-mode no				#關(guān)閉保護(hù)模式
port 6704						#端口號
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6704.pid				#pid存放路徑
logfile /data/redis-6.2.6-cluster/logs/redis_6704.log				#日志存放路徑
always-show-logo yes											 #是否顯示總?cè)罩?
dbfilename redis_6704.rdb												#持久化數(shù)據(jù)文件名稱
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6704.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000		

6.Reids 6705節(jié)點配置文件內(nèi)容

[root@k8s-master conf]# vim redis_6702.conf
bind 0.0.0.0					#監(jiān)聽地址
protected-mode no				#關(guān)閉保護(hù)模式
port 6705						#端口號
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6705.pid				#pid存放路徑
logfile /data/redis-6.2.6-cluster/logs/redis_6705.log				#日志存放路徑
always-show-logo yes											 #是否顯示總?cè)罩?
dbfilename redis_6705.rdb												#持久化數(shù)據(jù)文件名稱
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6705.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000		

7.Reids 6706節(jié)點配置文件內(nèi)容

[root@k8s-master conf]# vim redis_6702.conf
bind 0.0.0.0					#監(jiān)聽地址
protected-mode no				#關(guān)閉保護(hù)模式
port 6706						#端口號
daemonize yes						#后臺運(yùn)行
pidfile /data/redis-6.2.6-cluster/var/redis_6706.pid				#pid存放路徑
logfile /data/redis-6.2.6-cluster/logs/redis_6706.log				#日志存放路徑
always-show-logo yes											 #是否顯示總?cè)罩?
dbfilename redis_6706.rdb												#持久化數(shù)據(jù)文件名稱
dir /data/redis-6.2.6-cluster/data										#持久化數(shù)據(jù)文件存放路徑
cluster-enabled yes										#開啟集群模式
cluster-config-file nodes_6706.conf						 #集群模式配置文件名稱
cluster-node-timeout 15000		

3.2.將六個節(jié)點全部啟動

1)啟動redis各個節(jié)點

[root@k8s-master ~]# /data/redis-6.2.6-cluster/bin/redis-server /data/redis-6.2.6-cluster/conf/redis_6701.conf 
[root@k8s-master ~]# /data/redis-6.2.6-cluster/bin/redis-server /data/redis-6.2.6-cluster/conf/redis_6702.conf 
[root@k8s-master ~]# /data/redis-6.2.6-cluster/bin/redis-server /data/redis-6.2.6-cluster/conf/redis_6703.conf 
[root@k8s-master ~]# /data/redis-6.2.6-cluster/bin/redis-server /data/redis-6.2.6-cluster/conf/redis_6704.conf 
[root@k8s-master ~]# /data/redis-6.2.6-cluster/bin/redis-server /data/redis-6.2.6-cluster/conf/redis_6705.conf 
[root@k8s-master ~]# /data/redis-6.2.6-cluster/bin/redis-server /data/redis-6.2.6-cluster/conf/redis_6706.conf

2)查看啟動的進(jìn)程

[root@k8s-master ~]# ps aux | grep redis
root     22166  0.2  0.0 164964  3208 ?        Ssl  16:17   0:00 /data/redis-6.2.6-cluster/bin/redis-server 0.0.0.0:6701 [cluster]
root     22179  0.2  0.0 164964  3212 ?        Ssl  16:17   0:00 /data/redis-6.2.6-cluster/bin/redis-server 0.0.0.0:6702 [cluster]
root     22235  0.2  0.0 164964  3216 ?        Ssl  16:17   0:00 /data/redis-6.2.6-cluster/bin/redis-server 0.0.0.0:6703 [cluster]
root     23748  0.1  0.0 164964  3220 ?        Ssl  16:18   0:00 /data/redis-6.2.6-cluster/bin/redis-server 0.0.0.0:6704 [cluster]
root     24093  0.1  0.0 164964  3224 ?        Ssl  16:19   0:00 /data/redis-6.2.6-cluster/bin/redis-server 0.0.0.0:6705 [cluster]
root     24513  0.0  0.0 164964  3212 ?        Ssl  16:19   0:00 /data/redis-6.2.6-cluster/bin/redis-server 0.0.0.0:6706 [cluster]

3)查看各個節(jié)點生成的文件

3.3.配置集群節(jié)點之間相互發(fā)現(xiàn)

在任意一個節(jié)點中操作即可。

[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6701
127.0.0.1:6701> CLUSTER MEET 192.168.20.10 6702
OK
127.0.0.1:6701> CLUSTER MEET 192.168.20.10 6703
OK
127.0.0.1:6701> CLUSTER MEET 192.168.20.10 6704
OK
127.0.0.1:6701> CLUSTER MEET 192.168.20.10 6705
OK
127.0.0.1:6701> CLUSTER MEET 192.168.20.10 6706
OK
127.0.0.1:6701> CLUSTER NODES
1de9d406a489e3aedc2f7743114f21700de5d151 192.168.20.10:6702@16702 master - 0 1648715495901 1 connected
f1d6f55a4a66fb97b3be2dff70cf0b8984a9de42 192.168.20.10:6704@16704 master - 0 1648715494000 0 connected
14bd716bdc2726bfbf39eb14c88f072970059676 192.168.20.10:6706@16706 master - 0 1648715494894 5 connected
7eb4466a8558ab389a9d92d115d5b420fa2a8ffc 192.168.20.10:6701@16701 myself,master - 0 1648715494000 2 connected
b7e93e3f3925c6db664afc59cb08c2abced2933d 192.168.20.10:6703@16703 master - 0 1648715494000 3 connected
c502c900224a0ae6173631746de92d012bd43da3 192.168.20.10:6705@16705 master - 0 1648715494000 4 connected

操作完成后會同步各節(jié)點的集群配置文件中。

3.4.為集群中的充當(dāng)Master的節(jié)點分配槽位

1)分配槽位

[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6701 cluster addslots {0..5461}
OK
[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6703 cluster addslots {5462..10922}
OK
[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6705 cluster addslots {10923..16383}
OK

2)查看集群狀態(tài)

分配完槽位之后集群的狀態(tài)就會處于ok。

[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6701
127.0.0.1:6701> CLUSTER INFO
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:5
cluster_my_epoch:2
cluster_stats_messages_ping_sent:248
cluster_stats_messages_pong_sent:246
cluster_stats_messages_meet_sent:5
cluster_stats_messages_sent:499
cluster_stats_messages_ping_received:246
cluster_stats_messages_pong_received:253
cluster_stats_messages_received:499

3)查看集群中的節(jié)點信息

雖然現(xiàn)在槽位已經(jīng)分配完畢,但是當(dāng)下集群中所有的節(jié)點都處于Master角色,還是無法使用。

127.0.0.1:6701> CLUSTER NODES
1de9d406a489e3aedc2f7743114f21700de5d151 192.168.20.10:6702@16702 master - 0 1648715802089 1 connected
f1d6f55a4a66fb97b3be2dff70cf0b8984a9de42 192.168.20.10:6704@16704 master - 0 1648715802000 0 connected
14bd716bdc2726bfbf39eb14c88f072970059676 192.168.20.10:6706@16706 master - 0 1648715802000 5 connected
7eb4466a8558ab389a9d92d115d5b420fa2a8ffc 192.168.20.10:6701@16701 myself,master - 0 1648715803000 2 connected 0-5461
b7e93e3f3925c6db664afc59cb08c2abced2933d 192.168.20.10:6703@16703 master - 0 1648715803095 3 connected 5462-10922
c502c900224a0ae6173631746de92d012bd43da3 192.168.20.10:6705@16705 master - 0 1648715804100 4 connected 10923-16383

接下來去配置三主三從交叉復(fù)制模式,讓沒有槽位的節(jié)點復(fù)制有槽位的節(jié)點,也就是主從關(guān)系。

3.5.配置三主三從交叉復(fù)制模式

1)獲取集群主節(jié)點的信息

[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6701  cluster nodes | egrep '6701|6703|6705'  | awk '{print $1,$2}'
7eb4466a8558ab389a9d92d115d5b420fa2a8ffc 192.168.20.10:6701@16701
b7e93e3f3925c6db664afc59cb08c2abced2933d 192.168.20.10:6703@16703
c502c900224a0ae6173631746de92d012bd43da3 192.168.20.10:6705@16705

2)配置交叉復(fù)制

1.配置6702節(jié)點復(fù)制6705節(jié)點,充當(dāng)6705 master節(jié)點的slave
[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6702
127.0.0.1:6702> CLUSTER REPLICATE c502c900224a0ae6173631746de92d012bd43da3
OK
2.配置6704節(jié)點復(fù)制6701節(jié)點,充當(dāng)6701 master節(jié)點的slave
[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6704
127.0.0.1:6704> CLUSTER REPLICATE 7eb4466a8558ab389a9d92d115d5b420fa2a8ffc
OK
3.配置6706節(jié)點復(fù)制6703節(jié)點,充當(dāng)6703 master節(jié)點的slave
[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6706
127.0.0.1:6706> CLUSTER REPLICATE b7e93e3f3925c6db664afc59cb08c2abced2933d
OK

3)查看集群節(jié)點信息

已經(jīng)是三主三從交叉復(fù)制集群模式了。

[root@redis-cluster ~]# /data/redis-6.2.6-cluster/bin/redis-cli -p 6701
127.0.0.1:6701> CLUSTER NODES
1de9d406a489e3aedc2f7743114f21700de5d151 192.168.20.10:6702@16702 slave c502c900224a0ae6173631746de92d012bd43da3 0 1648716239215 4 connected
f1d6f55a4a66fb97b3be2dff70cf0b8984a9de42 192.168.20.10:6704@16704 slave 7eb4466a8558ab389a9d92d115d5b420fa2a8ffc 0 1648716236175 2 connected
14bd716bdc2726bfbf39eb14c88f072970059676 192.168.20.10:6706@16706 slave b7e93e3f3925c6db664afc59cb08c2abced2933d 0 1648716238000 3 connected
7eb4466a8558ab389a9d92d115d5b420fa2a8ffc 192.168.20.10:6701@16701 myself,master - 0 1648716237000 2 connected 0-5461
b7e93e3f3925c6db664afc59cb08c2abced2933d 192.168.20.10:6703@16703 master - 0 1648716238192 3 connected 5462-10922
c502c900224a0ae6173631746de92d012bd43da3 192.168.20.10:6705@16705 master - 0 1648716237184 4 connected 10923-16383

4.快速搭建Redis Cluster集群

前提條件需要先將6個節(jié)點搭建起來,再使用下面的命令快速將三主三從集群部署起來。

[root@redis-cluster redis-6.2.6-cluster]# /data/redis-6.2.6-cluster/bin/redis-cli --cluster create 192.168.20.10:6701 192.168.20.10:6702 192.168.20.10:6703 192.168.20.10:6704 192.168.20.10:6705 192.168.20.10:6706 --cluster-replicas 1 
Can I set the above configuration? (type 'yes' to accept): yes
#--cluster起到的作用就是省掉了節(jié)點發(fā)現(xiàn)、分配槽位、交叉復(fù)制的過程,自動替我們分配。

從輸出信息中我們清晰的看到主從的復(fù)制關(guān)系以及分配的槽位。

>>> Performing hash slots allocation on 6 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
Adding replica 192.168.20.10:6705 to 192.168.20.10:6701
Adding replica 192.168.20.10:6706 to 192.168.20.10:6702
Adding replica 192.168.20.10:6704 to 192.168.20.10:6703

6701、6702、6703節(jié)點為主節(jié)點,6704、6705、6706節(jié)點為從節(jié)點。

6704復(fù)制6703的主節(jié)點、6705復(fù)制6701的主節(jié)點、6706復(fù)制6702的主節(jié)點。

架構(gòu)圖如下:

到此這篇關(guān)于基于Redis6.2.6版本部署Redis Cluster集群的文章就介紹到這了,更多相關(guān)Redis Cluster集群部署內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Redis的9種數(shù)據(jù)類型用法解讀

    Redis的9種數(shù)據(jù)類型用法解讀

    這篇文章主要介紹了Redis的9種數(shù)據(jù)類型用法及說明,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2023-02-02
  • Redis分布式鎖防止緩存擊穿的實現(xiàn)

    Redis分布式鎖防止緩存擊穿的實現(xiàn)

    本文主要介紹了Redis分布式鎖防止緩存擊穿的實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-01-01
  • jedis配置含義詳解

    jedis配置含義詳解

    這篇文章主要介紹了jedis配置含義詳解的相關(guān)資料,需要的朋友可以參考下
    2020-04-04
  • Redis key鍵的具體使用

    Redis key鍵的具體使用

    Redis 是一種鍵值(key-value)型的緩存型數(shù)據(jù)庫,它將數(shù)據(jù)全部以鍵值對的形式存儲在內(nèi)存中,本文就來介紹一下key鍵的具體使用,感興趣的可以了解一下
    2024-02-02
  • redis分布式Jedis類型轉(zhuǎn)換的異常深入研究

    redis分布式Jedis類型轉(zhuǎn)換的異常深入研究

    這篇文章主要介紹了redis分布式Jedis類型轉(zhuǎn)換的異常深入研究,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-03-03
  • Redis主從復(fù)制詳解

    Redis主從復(fù)制詳解

    今天小編就為大家分享一篇關(guān)于Redis主從復(fù)制詳解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
    2019-01-01
  • Redis通過scan查找不過期的 key(方法詳解)

    Redis通過scan查找不過期的 key(方法詳解)

    SCAN 命令是一個基于游標(biāo)的迭代器,每次被調(diào)用之后, 都會向用戶返回一個新的游標(biāo), 用戶在下次迭代時需要使用這個新游標(biāo)作為 SCAN 命令的游標(biāo)參數(shù), 以此來延續(xù)之前的迭代過程,對Redis scan 查找 key相關(guān)知識感興趣的朋友一起看看吧
    2021-08-08
  • Redis實現(xiàn)每周熱評的項目實踐

    Redis實現(xiàn)每周熱評的項目實踐

    實時統(tǒng)計和展示熱門內(nèi)容是一種常見的需求,本文主要介紹了Redis實現(xiàn)每周熱評的項目實踐,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2024-03-03
  • Redis在項目中的使用(JedisPool方式)

    Redis在項目中的使用(JedisPool方式)

    項目操作redis是使用的RedisTemplate方式,另外還可以完全使用JedisPool和Jedis來操作redis,本文給大家介紹Redis在項目中的使用,JedisPool方式,感興趣的朋友跟隨小編一起看看吧
    2021-12-12
  • 淺談Redis緩存擊穿、緩存穿透、緩存雪崩的解決方案

    淺談Redis緩存擊穿、緩存穿透、緩存雪崩的解決方案

    這篇文章主要介紹了淺談Redis緩存擊穿、緩存穿透、緩存雪崩的解決方案,緩存是分布式系統(tǒng)中的重要組件,主要解決在高并發(fā)、大數(shù)據(jù)場景下,熱點數(shù)據(jù)訪問的性能問題,需要的朋友可以參考下
    2023-03-03

最新評論