Module: REDIS


    Redis Identity

    Redis are required parameters when defining a Redis cluster.

    • redis_cluster: Redis cluster name, top-level namespace for cluster sources.
    • : Redis node identity, integer the number of the node in the cluster.
    • redis_instances: A Dict with the Key as redis port and the value as a instance level parameters.

    Redis Mode

    There are three available in Pigsty:

    • standalone: setup redis as standalone (master-slave) mode
    • sentinel: setup redis as sentinel for standalone redis HA

    Redis Definition

    Here are three examples:

    Limitation

    • A redis node can only belong to one redis cluster
    • You can not set different password for redis instances on same redis node (since redis_exporter only allows one password)

    • : create redis cluster / node / instance
    • redis-rm.yml: remove redis cluster /node /instance

    You can also create & destroy redis cluster/node/instance with util scripts:

    1. bin/redis-add 10.10.10.10 # create redis node '10.10.10.10'
    2. bin/redis-add 10.10.10.10 6501 # create redis instance '10.10.10.10:6501'
    3. bin/redis-rm 10.10.10.10 # remove redis node '10.10.10.10'
    4. bin/redis-rm 10.10.10.10 6501 # remove redis instance '10.10.10.10:6501'

    Init Cluster/Node/Instance

    You can also use wrapper script:

    1. bin/redis-add 10.10.10.10 # create redis node '10.10.10.10'
    2. bin/redis-add 10.10.10.10 6501 # create redis instance '10.10.10.10:6501'

    Remove Cluster/Node/Instance

    You can also use wrapper script:

    1. bin/redis-rm redis-ms # remove redis cluster 'redis-ms'
    2. bin/redis-rm 10.10.10.10 # remove redis node '10.10.10.10'
    3. bin/redis-rm 10.10.10.10 6501 # remove redis instance '10.10.10.10:6501'

    There are three dashboards for module.

    Redis Overview

    Overview of a redis cluster

    Module: REDIS - 图2

    Redis Instance

    Detail information about a single redis instance


    • REDIS_ID : REDIS Identity Parameters
    • : Config & Launch Redis Instances
    ParameterTypeLevelComment
    redis_clusterstringCredis cluster name, required identity parameter
    dictIredis instances definition on this redis node
    redis_nodeintIredis node sequence number, node int id required
    pathCredis main data mountpoint, /data by default
    redis_exporter_enabledboolCinstall redis exporter on redis nodes?
    portCredis exporter listen port, 9121 by default
    redis_exporter_optionsstringC/Icli args and extra options for redis exporter
    boolCprevent purging running redis instance?
    redis_cleanboolCpurging existing redis during init?
    boolAremove redis data when purging redis server?
    redis_modeenumCredis mode: standalone,cluster,sentinel
    stringCredis config template path, except sentinel
    redis_bind_addressipCredis bind address, empty string will use host ip
    sizeC/Imax memory used by each redis instance
    redis_mem_policyenumCredis memory eviction policy
    passwordCredis password, empty string will disable password
    redis_rdb_savestring[]Credis rdb save directives, disable with empty list
    boolCenable redis append only file?
    redis_rename_commandsdictCrename redis dangerous commands
    intCreplica number for one master in redis cluster