一文了解redis配置说明

Redis配置说明

概览

  redis:

  type:standalone#:可选值:cluster,sentinel,standalone

  config:

  type:manual#配置类型,可选的有:manual(手动),rest(restapi配置)

  host:192.168.2.5

  port:6379

  password:

  maxIdle:500

  maxTotal:500

  maxWaitMillis:-1

手工搭建redis

standalone式配置

  如果采用手动配置标准式redis,则核心配置为:

  redis:

  type:standalone

  config:

  type:manual

  host:192.168.2.5

  port:6379

  password:yourpwd

  maxIdle:500

  maxTotal:500

  maxWaitMillis:-1

集群配置

  redis:

  type:cluster

  config:

  type:manual

  cluster:

  nodes:ip1:6379,ip2:6379#集群节点

  password:yourpwd

  maxIdle:500

  maxTotal:500

  maxWaitMillis:-1

  注:基于swarm式的可伸缩式集群,上述ip只需要配置为所有swarmnode的ip即可

哨兵配置

  redis:

  type:sentinel

  config:

  type:manual

  host:192.168.2.5

  sentinel:

  master:mymaster#哨兵master名称

  nodes:ip2:6379,ip2:6379#哨兵节点

  port:6379

  password:yourpwd

  maxIdle:500

  maxTotal:500

  maxWaitMillis:-1

sohutv的cachecloud方式搭建redis

  如果采用sohutv的cachecloud来管理redis,核心配置:

  redis:

  type:standalone

  config:

  type:rest

  restUrl:http://ip:8585#cachecloud的restapi地址

  restAppid:1000#cachecloud中的appid

  restClientVersion:1.0-SNAPSHOT#不用变

连接池配置

  上述就是关于redis配置方面的内容了,想了解更多详情,可以持续关注易族智汇javashop,有任何问题,欢迎一起探讨。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kingapex1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值