# -*- text -*-
#
#  $Id: 8d9a041b809580548b758d94232a3b88ab7afe83 $

#
#  Configuration file for the "redis" module.  This module does nothing
#  Other than provide connections to a redis database, and a %{redis: ...}
#  expansion.
#
redis {
	#  Host where the redis server is located.
	#  We recommend using ONLY 127.0.0.1 !
	server = 127.0.0.1

	#  The default port.
	port = 6379

	#  The password used to authenticate to the server.
	#  We recommend using a strong password.
#	password = thisisreallysecretandhardtoguess

	#
	#  Information for the connection pool.  The configuration items
	#  below are the same for all modules which use the new
	#  connection pool.
	#
	pool {
		# Number of connections to start
		start = ${thread[pool].start_servers}

		# Minimum number of connections to keep open
		min = ${thread[pool].min_spare_servers}

		# Maximum number of connections
		#
		# If these connections are all in use and a new one
		# is requested, the request will NOT get a connection.
		#
		# NOTE: This should be greater than or equal to "min" above.
		max = ${thread[pool].max_servers}

		# Spare connections to be left idle
		#
		# NOTE: Idle connections WILL be closed if "idle_timeout"
		# is set.  This should be less than or equal to "max" above.
		spare = ${thread[pool].max_spare_servers}

		# Number of uses before the connection is closed
		#
		# NOTE: A setting of 0 means infinite (no limit).
		uses = 0

		# The lifetime (in seconds) of the connection
		#
		# NOTE: A setting of 0 means infinite (no limit).
		lifetime = 86400

		# The pool is checked for free connections every
		# "cleanup_interval".  If there are free connections,
		# then one of them is closed.
		cleanup_interval = 300

		# The idle timeout (in seconds).  A connection which is
		# unused for this length of time will be closed.
		#
		# NOTE: A setting of 0 means infinite (no timeout).
		idle_timeout = 600

		# NOTE: All configuration settings are enforced.  If a
		# connection is closed because of "idle_timeout",
		# "uses", or "lifetime", then the total number of
		# connections MAY fall below "min".  When that
		# happens, it will open a new connection.  It will
		# also log a WARNING message.
		#
		# The solution is to either lower the "min" connections,
		# or increase lifetime/idle_timeout.
	}
}
