All three modes share the same set of configuration fields. The sections below explain those fields, then show how to apply them for each mode.
Supported Versions
Visit the Configure Redis page for more info.
Configuration Reference
The various components that use Redis all contain similar configuration options within their config files (or equivalent environment variables):- Tyk Gateway and Tyk MDCB configure Redis inside a
storageblock - Tyk Pump uses
analytics_storage_config - Tyk Dashboard uses top-level fields prefixed with
redis_
Address Configuration
- For a single-node connection, use
hostandport. - For Redis Cluster, use
addrswith the addresses of all cluster nodes (both primary and replica). - For Redis Sentinel, use
addrswith the addresses of your Sentinel nodes, not the Redis data nodes directly. - When
addrsis set,hostandportare ignored.
Connection Pool
Each Tyk component maintains a pool of connections to Redis. Two settings control this pool:optimisation_max_active: the maximum number of active connections (this is calledredis_max_activefor Tyk Dashboard)timeout: the connection timeout, after which an attempt to connect to Redis is abandoned
optimisation_max_active: 500, timeout: 5 seconds) are suitable for most deployments.
If you are running Tyk under high load and see connection pool timeouts, raise the maximum number of active connections incrementally until the timeouts stop. Avoid setting it excessively high, as opening too many connections can place unnecessary load on Redis.
Keep the connection timeout low so that failures are detected quickly rather than queuing behind slow connections.
Single Node Configuration
Use these settings when connecting to a standalone Redis instance. This is the simplest configuration and is appropriate for development or where your Redis provider exposes a single endpoint.Tyk Gateway
Intyk.conf (or via environment variables), Redis is configured inside the storage block:
Tyk Dashboard
Intyk_analytics.conf (or via environment variables), Redis settings are top-level fields:
Tyk Pump
Inpump.conf (or via environment variables), Redis is configured inside the analytics_storage_config block:
Tyk MDCB
Intyk_sink.conf (or via environment variables), Redis is configured inside the storage block:
Configure Redis Cluster
Redis Cluster automatically shards data across multiple nodes, providing horizontal scalability. It is suited to high-throughput deployments or where the dataset is too large for a single node. Redis Cluster is not the same as a primary/replica setup. In a primary/replica setup, all nodes hold the full dataset and replicas serve as failover targets. In Redis Cluster, the dataset is split across shards, and each shard has its own primary and optional replicas. We recommend reviewing this tutorial to learn more about Redis Cluster. The key differences from a single-node configuration are:- Set
enable_clustertotrue. - Replace
host/portwithaddrs, listing all cluster node addresses. Tyk needs visibility of the full cluster to route correctly. Do not list only the primary nodes.
When connecting to Amazon ElastiCache in cluster mode, you can use the configuration endpoint in
addrs instead of listing individual nodes. The configuration endpoint handles routing automatically and supports both read and write operations.Tyk Gateway
Intyk.conf (or via environment variables), Redis is configured inside the storage block. Set enable_cluster to true and list all cluster nodes under addrs:
Tyk Dashboard
Intyk_analytics.conf (or via environment variables), Redis settings are top-level fields. Set enable_cluster to true and list all cluster nodes under redis_addrs:
The
enable_cluster field does not have the redis_ prefix.Tyk Pump
Inpump.conf (or via environment variables), Redis is configured inside the analytics_storage_config block. Set enable_cluster to true and list all cluster nodes under addrs:
Tyk MDCB
Intyk_sink.conf (or via environment variables), Redis is configured inside the storage block. Set enable_cluster to true and list all cluster nodes under addrs:
Configure Redis Sentinel
Redis Sentinel provides high availability for a primary/replica Redis setup. Sentinel nodes monitor the primary, and if it becomes unavailable they coordinate promotion of a replica to primary. No change to Tyk’s configuration is required when a failover occurs. Sentinel is the right choice when you need automatic failover but do not need the horizontal sharding that Redis Cluster provides. We recommend reviewing this tutorial to learn more about Redis Sentinel. The key differences from a single-node configuration are:- List your Sentinel node addresses under
addrs(not the Redis data nodes directly). - Set
master_nameto the name of the monitored primary, as configured in your Sentinel setup.
Do not set
enable_cluster: Sentinel and Cluster are mutually exclusive modes.Tyk Gateway
Intyk.conf (or via environment variables), Redis is configured inside the storage block. Point addrs at your Sentinel nodes and set master_name to the name of the monitored primary:
- If your Sentinel nodes require a password, set
sentinel_password.
Tyk Dashboard
Intyk_analytics.conf (or via environment variables), Redis settings are top-level fields. Point redis_addrs at your Sentinel nodes and set redis_master_name to the name of the monitored primary:
- If your Sentinel nodes require a password, set
redis_sentinel_password.
Tyk Pump
Inpump.conf (or via environment variables), Redis is configured inside the analytics_storage_config block. Point addrs at your Sentinel nodes and set master_name to the name of the monitored primary:
- If your Sentinel nodes require a password, set
sentinel_password.
Tyk MDCB
Intyk_sink.conf (or via environment variables), Redis is configured inside the storage block. Point addrs at your Sentinel nodes and set master_name to the name of the monitored primary:
- If your Sentinel nodes require a password, set
sentinel_password.
TLS Encryption
Redis supports TLS encryption from version 6. TLS configuration uses the same fields regardless of whether you are using single-node, Cluster, or Sentinel mode.Configuration Fields
TLS fields are named here as Tyk Gateway configures them, nested inside itsstorage block. The other three components use the same fields, though not always under the same names - see below.
The other components rename these fields:
- Tyk Dashboard: prefix every field with
redis_(for example,redis_use_ssl,redis_tls_min_version). - Tyk MDCB: identical to Tyk Gateway, except the TLS version fields drop the
tls_prefix (min_version,max_version). - Tyk Pump: identical to Tyk Gateway for
use_sslandssl_insecure_skip_verify; every other field swaps its prefix forssl_(ssl_ca_file,ssl_cert_file,ssl_key_file,ssl_min_version,ssl_max_version).
IAM Authentication
IAM authentication requires the following minimum versions:IAM authentication is currently available for Google Cloud Memorystore for Valkey and Memorystore for Redis Cluster. Legacy (non-cluster) Memorystore for Redis does not support IAM authentication - continue to use a static password for that service.
iam_auth block, nested inside each component’s existing Redis settings - storage for Tyk Gateway and Tyk MDCB, analytics_storage_config for Tyk Pump:
Tyk Dashboard is the exception: its block is
redis_iam_auth, sitting at the top level alongside its other redis_-prefixed settings, rather than nested inside a storage-like block.iam_auth configuration block is available for each storage instance in the Tyk Gateway and Tyk MDCB config:
- Tyk Gateway:
storage,cache_storage(used whenenable_separate_cache_storeis set) andanalytics_storage(used whenenable_separate_analytics_storeis set) - Tyk MDCB:
storageandanalytics_storage(used whenenable_separate_analytics_storeis set)
Each block configures IAM authentication independently, for that block’s own Redis connection. If
enable_separate_cache_store or enable_separate_analytics_store is not set, Tyk uses only the primary storage connection, and any iam_auth block under cache_storage or analytics_storage is ignored.Google Cloud IAM
Tyk supports IAM authentication for two Google Cloud services: Only the role you grant differs between the two; this is entirely on the Google Cloud side and invisible to Tyk’s configuration. How It Works: Google Cloud’s client libraries use a mechanism called Application Default Credentials (ADC) to automatically discover which identity a piece of software is running as. Tyk uses ADC to discover its own identity, then requests a Google OAuth2 access token (Google’s name for the access token described above) using that identity, and presents the token as the password when connecting. Tyk caches and refreshes the token ahead of its roughly one-hour expiry, so existing connections keep working across a token rotation and only new connections need the latest token. Prerequisites:- Grant Tyk’s identity the role that permits connecting to your instance:
roles/memorystore.dbConnectionUserfor Memorystore for Valkey, orroles/redis.dbConnectionUserfor Memorystore for Redis Cluster. - Make sure ADC can discover that identity: on GKE, enable Workload Identity so the Kubernetes service account maps to a Google service account holding the role; elsewhere, set
GOOGLE_APPLICATION_CREDENTIALSto a service account key file, or run on a Compute Engine instance with an attached service account. - Enable in-transit encryption on the instance and set
use_ssl(redis_use_sslfor Tyk Dashboard) totrue.
tyk.conf):
enable_cluster to true for Memorystore for Redis Cluster, or for Valkey running in cluster mode. Leave it false for a standalone Valkey instance.
If the workload’s own identity can’t hold that role directly, grant it the roles/iam.serviceAccountTokenCreator role on a service account that does, then set service_account to that account:
Troubleshooting
Before adjusting Tyk configuration, verify that Redis itself is healthy. The commands below help diagnose problems across all deployment modes. Check Redis Is ReachablePONG. If this fails, the connection problem is at the network or Redis level, not in Tyk configuration.
Monitor Key Redis Metrics
Google Cloud IAM
For further troubleshooting guidance, see the Redis documentation:
- Troubleshooting Redis: general Redis problems including latency and memory
- Redis Sentinel: inspecting primary and replica state, quorum, and failover
- Redis Cluster: checking cluster state, node reachability, and slot distribution