Skip to main content

Overview

FlowX platform services use Redis for caching and real-time data management. Redis can be deployed in three different modes depending on your availability and scalability requirements. All FlowX Java microservices support the same Redis configuration properties based on Spring Boot’s Redis data configuration.

Supported deployment modes

FlowX supports three Redis deployment modes:
  • Standalone: Single Redis instance (suitable for development and low-traffic environments)
  • Sentinel: High availability with automatic failover (recommended for production)
  • Cluster: Horizontal scaling with data sharding (for high-throughput applications)
Starting with FlowX 5.x, Master-Replica mode is no longer supported. Use Sentinel mode for high availability with automatic failover, or Cluster mode for horizontal scaling.

Standalone mode

The default configuration for single Redis instance deployments.

Configuration parameters

Environment VariableDescriptionExample ValueRequired
SPRING_DATA_REDIS_HOSTHostname of the Redis serverlocalhost or redis.example.comYes
SPRING_DATA_REDIS_PORTPort number for Redis server6379 (default)Yes
SPRING_DATA_REDIS_PASSWORDPassword for Redis authenticationyourpasswordIf authentication is enabled
SPRING_DATA_REDIS_SSL_ENABLEDEnable SSL/TLS connectiontrue or falseNo

Example configuration

spring:
  data:
    redis:
      host: localhost
      port: 6379
      password: yourpassword
      ssl:
        enabled: false

Sentinel mode

For high-availability Redis with automatic failover. Sentinel provides monitoring, notification, and automatic failover capabilities.

Configuration parameters

Environment VariableDescriptionExample ValueRequired
SPRING_DATA_REDIS_SENTINEL_MASTERName of the Redis master instancemymasterYes
SPRING_DATA_REDIS_SENTINEL_NODESComma-separated list of Sentinel nodes (host:port format)host1:26379,host2:26379,host3:26379Yes
SPRING_DATA_REDIS_SENTINEL_PASSWORDPassword for Sentinel authenticationsentinelpasswordIf Sentinel authentication is enabled
SPRING_DATA_REDIS_PASSWORDPassword for Redis data node authenticationyourpasswordIf Redis authentication is enabled

Example configuration

spring:
  data:
    redis:
      sentinel:
        master: mymaster
        nodes: sentinel1:26379,sentinel2:26379,sentinel3:26379
        password: sentinelpassword
      password: yourpassword

Important notes

  • The SPRING_DATA_REDIS_SENTINEL_NODES must include all Sentinel instances for redundancy
  • Sentinel typically runs on port 26379 (different from Redis data port 6379)
  • The master name (SPRING_DATA_REDIS_SENTINEL_MASTER) must match the master configured in your Sentinel setup
  • Both Sentinel password and Redis password can be configured independently

Cluster mode

For Redis cluster deployments with data sharding across multiple nodes, providing horizontal scalability.

Configuration parameters

Environment VariableDescriptionExample ValueRequired
SPRING_DATA_REDIS_CLUSTER_NODESComma-separated list of cluster nodes (host:port format)host1:6379,host2:6379,host3:6379Yes
SPRING_DATA_REDIS_PASSWORDPassword for Redis cluster authenticationyourpasswordIf authentication is enabled

Example configuration

spring:
  data:
    redis:
      cluster:
        nodes: node1:6379,node2:6379,node3:6379
      password: yourpassword

Important notes

  • You only need to specify a subset of cluster nodes; the Redis client will discover all nodes automatically
  • At least 3 master nodes are recommended for a production Redis cluster
  • Data is automatically sharded across cluster nodes

Choosing the right deployment mode

Use this guide to select the appropriate Redis deployment mode:
  • Development & Testing
  • Production - High Availability
  • Production - High Throughput
Standalone mode is suitable for:
  • Development environments
  • Testing and staging environments
  • Low-traffic applications
  • Single-server deployments
Considerations:
  • No automatic failover
  • Single point of failure
  • Simplest to set up and maintain

SSL/TLS configuration

For secure Redis connections, you can enable SSL/TLS:
Environment VariableDescriptionExample Value
SPRING_DATA_REDIS_SSL_ENABLEDEnable SSL/TLS for Redis connectionstrue
spring:
  data:
    redis:
      ssl:
        enabled: true
SSL/TLS configuration is supported in all deployment modes (Standalone, Sentinel, and Cluster).

Additional configuration options

Connection timeout

Environment VariableDescriptionDefault Value
SPRING_DATA_REDIS_TIMEOUTConnection timeout in milliseconds2000

TTL (Time To Live)

Some services support custom TTL configuration for cached data:
Environment VariableDescriptionDefault Value
REDIS_TTLTime to live for cached entries in millisecondsService-specific
Check individual service setup guides for service-specific Redis configuration options.

Applying configuration

1

Choose your deployment mode

Select the appropriate Redis deployment mode based on your requirements (Standalone, Sentinel, or Cluster).
2

Set environment variables

Configure the required environment variables for your chosen deployment mode in your deployment configuration (Kubernetes ConfigMap, Docker Compose, etc.).
3

Verify Redis connectivity

Ensure your FlowX services can reach the Redis instance(s) on the network level.
4

Test the configuration

Deploy your services and verify Redis connectivity through service logs and health checks.

Services using Redis

The following FlowX services use Redis and support these configuration options:
  • Events Gateway
  • Authorization System
  • FlowX Engine
  • Notification Plugin
  • Document Plugin
  • OCR Plugin
  • Task Management Plugin
For service-specific Redis configuration details, refer to the individual setup guides in the Setup Guides section.

Troubleshooting

Connection issues

If services cannot connect to Redis:
  1. Verify network connectivity: Ensure the service can reach Redis hosts on the configured ports
  2. Check authentication: Verify the password is correct
  3. Review firewall rules: Ensure no firewall is blocking Redis ports
  4. Validate configuration: Double-check environment variable names and values

Sentinel mode issues

If Sentinel failover is not working:
  1. Verify master name: Ensure SPRING_DATA_REDIS_SENTINEL_MASTER matches your Sentinel configuration
  2. Check all Sentinel nodes: All Sentinel instances should be reachable
  3. Review Sentinel logs: Check Sentinel logs for failover events
  4. Validate Sentinel password: If using Sentinel authentication, ensure SPRING_DATA_REDIS_SENTINEL_PASSWORD is correct

Cluster mode issues

If cluster operations fail:
  1. Verify cluster health: Check Redis cluster status with CLUSTER INFO
  2. Ensure minimum nodes: At least 3 master nodes should be running
  3. Check node discovery: Ensure the service can discover all cluster nodes
  4. Review unsupported commands: Some Redis commands are not supported in cluster mode