LogoLogo
API Documentation
Current Version
Current Version
  • DecisionRules Documentation
  • DecisionRules Academy
  • API
    • API Introduction
    • API Keys
      • Solver API Keys
      • Management API keys
      • BI API keys
    • Rule Solver API
    • Management API
      • Rule Migration Strategies
      • Deprecated Endpoints
    • Console Logs API
    • Business Intelligence API
      • Deprecated Endpoints
    • Datacenters & Locations
      • Global Cloud
      • Regional Cloud
    • Apache Kafka Solver API
    • Endpoint Settings
    • Archive
      • Rule Flow Solver API (DEPRECATED)
  • AI Assistant
    • About Assistant
  • RULES
    • Rules Introduction
    • Rule List
    • Rule Mode
    • Common Rule Features
      • Input & Output Model
        • Simple Editor
        • JSON Editor
      • Test Bench
      • Rule Alias
      • Rule State
      • Versioning
      • Rule Variables
      • Execution Strategy
      • Rule Dependencies
      • Rule Export & Import
        • Rule Export
        • Rule Import
        • Managing Decision Table in Excel/Google Sheets
        • Deprecated Formats: XLSX v.1 and CSV
      • Tags
      • Rule Comparison
        • Decision Table Comparison
        • Decision Tree Comparison
        • Scripting Rule Comparison
      • Rule Lock
      • Teamwork Indicator
      • Event Timeline
    • Data Types & Functions
      • Supported Data Types
      • Operators and Functions
        • Basic operators
        • Date operators
        • Functions
          • Logical Functions
          • Math Functions
          • Date and Time Functions
          • Text Functions
          • Data Functions
          • Array Functions
          • Integration functions
          • Functions and JSON
    • Decision Table
      • Table Designer
        • Table Operations
          • Filter Values
          • Valid Values
          • Sorting
      • Binding to Model
    • Decision Tree
      • Tree Designer
    • Workflow
      • Workflow Designer
      • Workflow Nodes Overview
      • Workflow Limits
    • Scripting Rule
      • Custom functions in Scripting Rules
      • Calling external API within ScriptingRules
      • Use Rule Variables in Scripting Rules
      • Call Embedded Rules in Scripting Rules
      • Tips
    • Rule Flow
      • Rule Flow Designer
      • Rule Flow Mapping
      • Rule States in Rule Flow
      • Warnings & Errors
      • Rule Flow Limits
  • SPACE
    • Space Introduction
    • Space Info
    • Dashboard
    • Access
    • API Keys
    • Audit Logs
  • Organization
    • Organization Introduction
    • Organization List
    • Members
    • Teams
    • Spaces
    • Space Roles
    • Policies
    • Statistics
    • Settings
  • Profile
    • Profile Introduction
    • General
    • Dashboard
    • Plans
    • Add-ons
    • Limits
      • Plan Limits Explained
    • Subscriptions
    • Invoices
  • Access
    • Sign Up & Login
    • Invitations & Permissions
    • Single Sign-On (SSO)
  • Business Intelligence
    • Audit Logs
    • Power BI Connectivity
      • Create a Power BI Report
      • Connect Power BI to Business Intelligence API
      • Connecting from Power BI (deprecated)
      • Connect DecisionRules to Power BI Using Our Custom Connector
  • OTHER DEPLOYMENT OPTIONS
    • Regional Cloud
      • Region Specific API URLs
    • Docker & On-Premise
      • Environment Variables
      • Redis Connection Modes
      • DecisionRules Application
        • Minimal Requirements
        • DecisionRules Server
        • DecisionRules Client
        • DecisionRules Business Intelligence
        • Networking Between Docker Containers
      • Setup Single Sign-On (SSO)
        • Set up Microsoft Entra ID SSO
        • Set up Google SSO
      • Docker Showcase App
        • Showcase
        • Showcase + Business Intelligence
      • AWS Setup
        • AWS ECS/Fargate
        • Cache - Amazon ElastiCache
      • Microsoft Azure Setup
        • Database - Azure CosmosDB
        • Cache - Azure Cache for Redis
        • Azure Container Apps
      • Azure Red Hat OpenShift
      • Google Kubernetes Engine (GKE)
      • Kubernetes Setup
        • Kubernetes Setup with Business Intelligence
      • Logging options
      • CD/CI Pipelines
        • Azure DevOps CICD Pipelines
        • Using Migration script (old way)
      • Offline License
  • SDK and Integrations
    • Languages / Frameworks
      • SQL Server
      • Oracle PL/SQL
      • PostgreSQL
      • JavaScript
      • Java Spring Example
      • PHP Library
      • Python Library
      • .NET Library
      • Google Tag Manager
    • Excel Add-in
  • Terms & Conditions
    • Terms and Conditions
    • Privacy Policy
    • Service Level Agreement
      • Community Support
      • Standard Cloud (SaaS)
      • Silver SLA
      • Gold SLA
      • Custom SLA
    • Sub-Processor List
  • Product Updates
    • Release Notes
      • Public Cloud
      • On-Premise / Private Cloud
    • Major Updates
      • Changes in Version 1.19.0 (10/2024)
      • Changes in Version 1.20.0 (4/2025)
    • Roadmap
Powered by GitBook
On this page
  • Overview
  • Connection Modes
  • Example Configuration
  • NORMAL Mode
  • NORMAL_READER Mode
  • CLUSTER Mode:
  • Summary

Was this helpful?

  1. OTHER DEPLOYMENT OPTIONS
  2. Docker & On-Premise

Redis Connection Modes

This document explains the three modes of connection available for connecting to Redis, controlled via the REDIS_MODE environment variable. The modes allow flexibility in connecting to single-instance

Overview

  • REDIS_MODE: Defines the mode in which the application will connect to Redis.

  • READER_REDIS_URL (optional): Specifies the connection URL for Redis reader instances, only applicable in NORMAL mode.

Connection Modes

  1. NORMAL Mode

  2. NORMAL Mode with Reader Instances

  3. CLUSTER Mode

1. NORMAL Mode (Default)

In NORMAL mode, the application connects to a single Redis instance for both read and write operations.

  • Environment Variables:

    • REDIS_MODE: Set to NORMAL to enable this mode.

    • REDIS_URL: Connection URL to the main Redis instance. This URL is used for all operations.

  • Use Case:

    • Ideal for applications that don't require high availability for read operations or cannot be distributed across multiple Redis instances.

2. NORMAL Mode with Reader Instances

In NORMAL mode with reader instances, the application connects to the main Redis instance for write operations while distributing read operations across dedicated reader instances specified by READER_REDIS_URL. This setup helps offload read operations from the main Redis instance, which can improve scalability and performance.

  • Environment Variables:

    • REDIS_MODE: Set to NORMAL to enable this mode.

    • REDIS_URL: URL of the main Redis instance used for write operations.

    • READER_REDIS_URL: URL of the Redis reader instance(s) for read operations.

  • Use Case:

    • Suitable for applications that need to balance the load by separating read and write operations across different Redis instances.

3. CLUSTER Mode

In CLUSTER mode, the application connects to a Redis cluster, which is a distributed setup with multiple nodes. Each node in the cluster contains a subset of the data, allowing for high availability and scalability across nodes.

  • Environment Variables:

    • REDIS_MODE: Set to CLUSTER to enable this mode.

    • REDIS_URL: URL for Redis configuration endpoind in the cluster. This allows the application to connect to any node within the Redis cluster, which then handles data distribution across all nodes in the setup.

  • Use Case:

    • Recommended for applications that need high availability and scalability, with data distributed across multiple Redis nodes. This mode supports automatic failover and load balancing across nodes within the cluster.

Example Configuration

Here's an example of environment variable settings for each mode:

NORMAL Mode

REDIS_MODE=NORMAL

REDIS_URL=redis://localhost:6379

NORMAL_READER Mode

REDIS_MODE=NORMAL

REDIS_URL=redis://write-instance:6379

READER_REDIS_URL=redis://reader-instance:6379

CLUSTER Mode:

REDIS_MODE=CLUSTER

REDIS_CLUSTER_URL=redis://cluster-node-1:6379

Summary

The REDIS_MODE environment variable configures the mode of connection to Redis:

  • NORMAL: Connects to a single Redis instance for all operations.

  • NORMAL with Reader Instances: Connects to a single Redis instance for writes and distributes reads across one or more reader instances.

  • CLUSTER: Connects to a Redis cluster, distributing data across multiple nodes for high availability and scalability.

Each mode offers distinct advantages depending on the application's needs for performance, scalability, and high availability.

Last updated 6 months ago

Was this helpful?