配置项说明
| 参数名称 | 是否必选 | 参数类型 | 取值范围 | 描述 |
|---|---|---|---|---|
| props | 否 | PropertiesConfiguration | MAS监控配置,配合etcd使用。 | |
| etcd | 否 | EtcdConfiguration | etcd配置,如配置,则会从远端拉取。 | |
| redis | 是 | RedisConfiguration | RedisServer配置。 | |
| routeAlgorithm | 是 | string |
| 路由算法。 |
| active | 是 | string | 只能是“dc1”或“dc2”。 | 激活的Redis。 |
| chaos | 否 | InjectionProperties | 故障注入相关配置。 |
| 参数名称 | 是否必选 | 参数类型 | 取值范围 | 描述 |
|---|---|---|---|---|
| nearest | 否 | string | 只能是“dc1”或“dc2”。 | 指明哪个是近端Redis。 |
| asyncRemoteWrite.retryTimes | 否 | int | 默认为3。 | 异步写远端操作重试次数。 |
| connectionPool.enable | 否 | bool | true/false默认true。 | 是否启用连接池。 |
| asyncRemotePool | 否 | AsyncRemotePoolConfiguration | 异步写线程池配置。 | |
| servers | 是 | map[string]ServerConfiguration | key为dc1/dc2 单个维度请参考ServerConfiguration数据结构说明。 | dc1,dc2的RedisServer连接配置。 |
| 参数名称 | 是否必选 | 参数类型 | 取值范围 | 描述 |
|---|---|---|---|---|
| threadCoreSize | 否 | int | - | 线程池的基本大小。 |
| persist | 否 | bool | true/false 默认false。 | 命令是否持久化,否:速度快;是:速度比非持久化低。 |
| taskQueueSize | 否 | int | 默认5。 | 缓冲队列数。 |
| persistDir | 否 | string | 默认根目录"/"。 | Redis日志文件目录。 |
| 参数名称 | 是否必选 | 参数类型 | 取值范围 | 描述 |
|---|---|---|---|---|
| hosts | 是 | string | - | RedisServer地址。 |
| password | 是 | string | - | RedisServer密码。 |
| type | 是 | string | cluster, master-slave, normal。 | RedisServer类型。 |
| cloud | 是 | string | - | RedisServer所属云。 |
| region | 是 | string | - | RedisServer所属Region。 |
| azs | 是 | string | - | RedisServer所属AZ。 |
| pool | 否 | ServerConnectionPoolConfiguration | 连接池配置。 |
| 参数名称 | 是否必选 | 参数类型 | 取值范围 | 描述 |
|---|---|---|---|---|
| maxTotal | 否 | int | - | 最大活动对象数。 |
| maxIdle | 否 | int | - | 最大能够保持idle状态的对象数。 |
| minIdle | 否 | int | - | 最小能够保持idle状态的对象数。 |
| maxWaitMillis | 否 | int | - | 当池内没有返回对象时,最大等待时间。 |
| timeBetweenEvictionRunsMillis | 否 | int | - | 空闲连接检测线程,检测的周期,毫秒数。如果为负值,表示不运行检测线程。默认为-1。 |