[]
        
(Showing Draft Content)

Configure Redis Cluster using Username and Password

  • In Wyn Enterprise, the Redis cluster can be configured either using the ACL configuration or by configuring the username and password. In case, you have configured the Redis cluster using a password and are not able to connect to Redis, follow the below instructions,

  • For the Redis version less than 6.0, add the Password property in the connection string as shown below. The value of the Password property is set to the desired password. And,

    Server=localhost:6379,Password=xxxx,Expire=0,Db=0,ThrowOnFailure=true,Timeout=3000
  • For the Redis version higher than 6.0, add the Username property in the configuration string as shown below. The value of the Username property contains the username and password.

    Server=localhost:6379,Username=${username}:${password},Expire=0,Db=0,ThrowOnFailure=true,Timeout=3000

Note that post the Wyn Enterprise release version 7.0, configurations of the NewLife.Redis package other than Server, UserName, Password, and Db are not be supported. However, all the configurations from the StackExchange.Redis package are supported in the Redis connection string ensuring a multi-cluster environment to work without making any changes in the connection string for users upgrading from Wyn Enterprise version v6.1.

Caution: It is recommended to use the new Redis style connection string and discard the old NewLife.Redis connection string. Redis package and strings are described below.

Redis string:

${redis0}:${port0},${redis1}:${port1},user=${username},password=${password}

NewLife string:

server=${redis0}:${port0},${redis1}:${port1};Username=${username},Password=${password}