LogoLogo
API Documentation
Version 1.19.5 and Older
Version 1.19.5 and Older
  • DecisionRules Documentation
  • API
    • API Introduction
    • API Keys
      • Solver API Keys
      • Management API keys
      • BI API keys
    • Rule Solver API
    • Management API
      • 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)
  • Decision tables
    • Decision Tables Introduction
    • Table Designer
    • Input & Output JSON Model
      • Simple Editor
      • JSON Editor
      • Binding to Model
    • 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
    • Export & Import of Decision Tables
      • Export Decision Table
      • Import Decision Table
      • File Structure of JSON Format
      • Managing Decision Table in Excel/Google Sheets
      • Deprecated Formats: XLSX v.1 and CSV
    • Table Operations
      • Filter Values
      • Valid Values
      • Sorting
  • Decision Trees
    • Decision Trees Introduction
    • Decision Tree Designer
    • Export & Import Decision Trees
      • Export Decision Tree
      • Import Decision Tree
  • Scripting Rules
    • Scripting Rule Introduction
    • Custom functions in Scripting Rules
    • Calling external API within ScriptingRules
    • Use Rule Variables in Scripting Rules
    • Call Embedded Rules in Scripting Rules
    • Export & Import Scripting Rules
      • Export Scripting Rule
      • Import Scripting Rule
    • Tips
  • Rule Flow
    • Rule Flow Designer
    • Rule Flow Mapping
    • Rule States in Rule Flow
    • Warnings & Errors
    • Rule Flow Limits
    • Export & Import Rule Flows
      • Export Rule Flow
      • Import Rule Flow
  • Workflow
    • Workflow Introduction
    • Workflow Designer
    • Workflow Nodes Overview
    • Workflow Limits
  • Other
    • Rule Alias
    • Execution Strategy
    • Rule State
    • Rule Versioning
    • Favorite Rules
    • Rule Variables
    • Rule Comparison
      • Decision Table Comparison
      • Decision Tree Comparison
      • Scripting Rule Comparison
    • Rule Tags
    • Rule Dependencies
    • Test Bench
    • Single Sign-On (SSO)
    • Event timeline
    • Rule Lock
    • Rule Migration Strategies
    • Changes in Version 1.19.0 (10/2024)
  • Organizations
    • Introduction
      • Access to Organization
    • Structure
      • Organization Roles
      • Members
      • Teams
      • Spaces
      • Space Roles
      • Policies
      • Settings
  • Teamwork
    • Dashboard
    • Folders
    • Spaces
    • Manage Spaces
    • Share Rules Between Spaces
    • Users & Roles
    • Teamwork Indicator
  • 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
  • Business Intelligence
    • Audit Logs
    • 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
  • Billing
    • Invoices & Billing
    • Change Product Plan
    • Billing Information
    • Plan Limits Explained
  • Regional Cloud
    • Regional Cloud
    • Region Specific API URLs
  • On-Premise / Docker
    • Environment Variables
    • Redis Connection Modes
    • Setup Single Sign-On (SSO)
      • Set up Microsoft Entra ID SSO
      • Set up Google SSO
    • DecisionRules Application
      • Minimal Requirements
      • DecisionRules Server
      • DecisionRules Client
      • DecisionRules Business Intelligence
      • Networking Between Docker Containers
    • 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
  • Terms & Conditions
    • Terms and Conditions
    • Privacy Policy
    • Service Level Agreement
      • Community Support
      • Standard Cloud (SaaS)
      • Silver SLA
      • Gold SLA
      • Custom SLA
    • Sub-Processor List
  • Roadmap 🚲 🗺️
  • Release Notes
    • Public Cloud
    • On-Premise / Private Cloud
Powered by GitBook
On this page
  • Overview
  • Connection Modes
  • Example Configuration
  • NORMAL Mode
  • NORMAL_READER Mode
  • CLUSTER Mode:
  • Summary

Was this helpful?

  1. On-Premise / Docker

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.

Was this helpful?