Difference between revisions of "Redis MTA options"

From Messaging Server Technical Reference Wiki
Jump to: navigation, search
m (Bulk update)
m (Bulk update)
 
Line 2: Line 2:
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__
  
New in the 8.0.2.3 release, the MTA supports use of the Redis protocol for certain  database/storage uses.  <code>redis.&#x2a;</code> options control the MTA&#x27;s connections to Redis.  The <code>&#x2a;_database_url</code> MTA options, when set to [[MTA URL types#MTA_URL_types|redis: URL]] values, configure use of Redis to store MTA databases. See also the  [[enable_sieve_redis MTA option#enable_sieve_redis|<code>enable_sieve_redis</code>]] MTA option, which enables Sieve filter use of a  [[Sieve redis extension#Sieve_redis_extension|<code>redis</code>]] operator in Sieve scripts.  
+
As of the 8.0.2.3 release, the MTA supports use of the Redis protocol for certain  database/storage uses.  
  
New in the 8.1.0.1 release, support has been added for Redis Sentinel. The <code>redis.servicename</code> option must be specified in addition to configuring Redise Sentinel to enable Sentinel support; when this is done the <code>redis.hostlist</code> and port options should not be specified.  
+
As of MS 8.1.0.6, multiple Redis services are supported, each consisting of one or more Redis servers. A separate <code>redis_client</code> configuration group must be created for each Redis service. The available Redis service specification options are [[hostlist Option#scope_redis_client|<code>hostlist</code>]], [[port Option#scope_redis_client|<code>port</code>]], and [[authpassword Option#scope_redis_client|<code>authpassword</code>]]. Of these, only the <code>hostlist</code> option is required.  
  
 +
The default Redis service group is specified by the [[redis_client_default Option#redis_client_default|<code>redis_client_default</code>]] option. This option&#x27;s default value is "default".
 +
 +
For example, the absolute minimum possible Redis configuration for the default service group would be:
 +
 +
<font color="mediumblue">
 +
  msconfig&#x3e; '''set redis_client:default.hostlist'''''host-name-or-ip''</font>
 +
A more complex configuration setting up two services A and B with passwords, with B the default, would be:
 +
 +
<font color="mediumblue">
 +
  msconfig# '''set redis_client:a.hostlist'''''host-name-or-ip-a''
 +
  msconfig# '''set redis_client:a.authpassword'''''password-a''
 +
  msconfig# '''set redis_client:b.hostlist'''''host-name-or-ip-b''
 +
  msconfig# '''set redis_client:b.authpassword'''''password-b''
 +
  msconfig# '''set redis_client_default b'''</font>
 +
The <code>&#x2a;_database_url</code> MTA options, when set to [[MTA URL types#MTA_URL_types|redis: URL]] values, configure use of Redis to store MTA databases. The host name part of the URL is used to specify the Redis service group to use, e.g., <code>redis://redis-client-group/</code>. If no group is specified the default client group is used.
 +
 +
See also the  [[enable_sieve_redis MTA option#enable_sieve_redis|<code>enable_sieve_redis</code>]] MTA option, which enables Sieve filter use of a  [[Sieve redis extension#Sieve_redis_extension|<code>redis</code>]] operator in Sieve scripts.
 +
 +
Releases prior to MS 8.1.0.6 only support connecting to a single service, and use a single <code>redis.&#x2a;</code> group to specify the service&#x27;s options, which are the same as those for <code>redis_client</code>.
 +
 +
New in the 8.1.0.1 release, support has been added for Redis Sentinel. Either the [[servicename Option#scope_redis|<code>servicename</code>]] or [[sentinelname Option#sentinelname|<code>sentinelname</code>]] option must be specified as part of the <code>redis_client</code> group to enable Sentinel support. Note that the <code>servicename</code> option&#x27;s value must match the service name specified in the Redis Sentinal configuration. If the <code>servicename</code> option isn&#x27;t specified it defaults to the name of the client group; if the <code>sentinelname</code> option isn&#x27;t specified it defaults to the value of the <code>sentinel_client_default</code> option, discussed below.
 +
 +
When this is done the <code>hostlist</code> and <code>port</code> options should not be specified under <code>redis_client</code>; this information will be obtained from the Sentinels.
 +
 +
Redis Sentinel configuration parallels that of Redis client configuration: A <code>sentinel_client</code> group must be created for each  Sentinel service, with the service specification options [[hostlist Option#scope_sentinel_client|<code>hostlist</code>]], [[port Option#scope_sentinel_client|<code>port</code>]], and [[authpassword Option#scope_sentinel_client|<code>authpassword</code>]]. Of these, only the <code>hostlist</code> option is required.
 +
 +
Important note: A single Sentinel service can manage multiple Redis services, but each Redis service is managed by a single Sentinel service. This means that each Redis service must identify, implicitly or explicitly, the Sentinel service it us using, as previously discussed. However, the Sentinel service does not (and cannot) specify the Redis service(s) it manages.
 +
 +
The default Sentinel service group is specified by the [[sentinel_client_default Option#sentinel_client_default|<code>sentinel_client_default</code>]] option. This option&#x27;s default value is "default".
 +
 +
For example, the absolute minimum possible Redis Sentinel configuration using both default service groups would be:
 +
 +
<font color="mediumblue">
 +
  msconfig&#x3e; '''set sentinel_client:default.hostlist'''''sentinel-host-names-or-ips''
 +
  msconfig# '''set redis_client:default.servicename'''''redis-servicename''</font>
 +
A more complex configuration with two Redis services A and B, B the default, each managed by a corresponding Sentinel would be:
 +
 +
<font color="mediumblue">
 +
  msconfig# '''set sentinel_client:a.hostlist'''''host-names-or-ips-a''
 +
  msconfig# '''set sentinel_client:a.authpassword'''''sentinel-password-a''
 +
  msconfig# '''set redis_client:a.servicename'''''redis-servicename-a''
 +
  msconfig# '''set redis_client:a.sentinelname a'''
 +
  msconfig# '''set redis_client:a.authpassword'''''redis-password-a''
 +
  msconfig# '''set sentinel_client:b.hostlist'''''host-names-or-ips-b''
 +
  msconfig# '''set sentinel_client:b.authpassword'''''sentinel-password-b''
 +
  msconfig# '''set redis_client:b.servicename'''''redis-servicename-b''
 +
  msconfig# '''set redis_client:b.sentinelname b'''
 +
  msconfig# '''set redis_client:b.authpassword'''''redis-password-b''
 +
  msconfig# '''set redis_client_default b'''</font>
  
 
See also:
 
See also:

Latest revision as of 08:54, 29 July 2020


As of the 8.0.2.3 release, the MTA supports use of the Redis protocol for certain database/storage uses.

As of MS 8.1.0.6, multiple Redis services are supported, each consisting of one or more Redis servers. A separate redis_client configuration group must be created for each Redis service. The available Redis service specification options are hostlist, port, and authpassword. Of these, only the hostlist option is required.

The default Redis service group is specified by the redis_client_default option. This option's default value is "default".

For example, the absolute minimum possible Redis configuration for the default service group would be:


  msconfig> set redis_client:default.hostlisthost-name-or-ip

A more complex configuration setting up two services A and B with passwords, with B the default, would be:


  msconfig# set redis_client:a.hostlisthost-name-or-ip-a
  msconfig# set redis_client:a.authpasswordpassword-a
  msconfig# set redis_client:b.hostlisthost-name-or-ip-b
  msconfig# set redis_client:b.authpasswordpassword-b
  msconfig# set redis_client_default b

The *_database_url MTA options, when set to redis: URL values, configure use of Redis to store MTA databases. The host name part of the URL is used to specify the Redis service group to use, e.g., redis://redis-client-group/. If no group is specified the default client group is used.

See also the enable_sieve_redis MTA option, which enables Sieve filter use of a redis operator in Sieve scripts.

Releases prior to MS 8.1.0.6 only support connecting to a single service, and use a single redis.* group to specify the service's options, which are the same as those for redis_client.

New in the 8.1.0.1 release, support has been added for Redis Sentinel. Either the servicename or sentinelname option must be specified as part of the redis_client group to enable Sentinel support. Note that the servicename option's value must match the service name specified in the Redis Sentinal configuration. If the servicename option isn't specified it defaults to the name of the client group; if the sentinelname option isn't specified it defaults to the value of the sentinel_client_default option, discussed below.

When this is done the hostlist and port options should not be specified under redis_client; this information will be obtained from the Sentinels.

Redis Sentinel configuration parallels that of Redis client configuration: A sentinel_client group must be created for each Sentinel service, with the service specification options hostlist, port, and authpassword. Of these, only the hostlist option is required.

Important note: A single Sentinel service can manage multiple Redis services, but each Redis service is managed by a single Sentinel service. This means that each Redis service must identify, implicitly or explicitly, the Sentinel service it us using, as previously discussed. However, the Sentinel service does not (and cannot) specify the Redis service(s) it manages.

The default Sentinel service group is specified by the sentinel_client_default option. This option's default value is "default".

For example, the absolute minimum possible Redis Sentinel configuration using both default service groups would be:


  msconfig> set sentinel_client:default.hostlistsentinel-host-names-or-ips
  msconfig# set redis_client:default.servicenameredis-servicename

A more complex configuration with two Redis services A and B, B the default, each managed by a corresponding Sentinel would be:


  msconfig# set sentinel_client:a.hostlisthost-names-or-ips-a
  msconfig# set sentinel_client:a.authpasswordsentinel-password-a
  msconfig# set redis_client:a.servicenameredis-servicename-a
  msconfig# set redis_client:a.sentinelname a
  msconfig# set redis_client:a.authpasswordredis-password-a
  msconfig# set sentinel_client:b.hostlisthost-names-or-ips-b
  msconfig# set sentinel_client:b.authpasswordsentinel-password-b
  msconfig# set redis_client:b.servicenameredis-servicename-b
  msconfig# set redis_client:b.sentinelname b
  msconfig# set redis_client:b.authpasswordredis-password-b
  msconfig# set redis_client_default b

See also: