Skip to content

高可用性High Availability

MaxKey edited this page Nov 20, 2020 · 2 revisions

高可用性High Availability

架构Architecture

高可用性配置

1、准备两台服务器,并安装MaxKey

2、准备Redis作为缓存

3、修改配置文件

MaxKey-vGA/maxkey/application.properties和在maxkey-web-maxkey.jar中的application.properties。

Redis配置


#redis
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=password
spring.redis.timeout=10000
spring.redis.jedis.pool.max-wait=1000
spring.redis.jedis.pool.max-idle=200
spring.redis.lettuce.pool.max-active=-1
spring.redis.lettuce.pool.min-idle=0

启动Sessions存储在Redis配置


# Session store type.
spring.session.store-type=redis
# Session timeout. If a duration suffix is not specified, seconds is used.
server.servlet.session.timeout=1800
# Sessions flush mode.
spring.session.redis.flush-mode=on_save 
# Namespace for keys used to store sessions.
spring.session.redis.namespace=spring:session 

4、Nginx转发配置

请参照Nginx官方网站完成配置

MaxKey

Clone this wiki locally