# Redis

Category: Cache
|
Runtime: 2.1+
|
Available: Free

# Overview

Redis node will enable the connection to any Redis platform. The node can connect with both Redis enterprise cloud and On-Premise version. The node primarily helps in read and write operation on to the Redis cache.

# Setup

# Prerequisites

For Redis node to work properly, you need to have a valid subscription of Redis enterprise cloud account (opens new window) or an On-premise setup of Redis server. Ensure to have the username and password with necessary permission level to connect with the platform.

# Installation

To install the node from designer:

  1. Go to Add more nodes option on the palette section.
  2. Check for the Redis node and click install.
  3. Once installed, the designer is required to be restarted.

To install the node from CLI:

  1. Go to your project workspace where you can see your package.json file.
  2. Run the below give npm command.
    npm i @kumologica/kumologica-contrib-redis

# Technical Details

Properties

  • Hostname (Required)
    Hostname that will be used for connecting with the Redis cloud or on-premise server.
  • Port (optional)
    Port that will be used for Redis connection. Default port is 6379. The port may vary based on cloud or on-premise instance.
  • Username (Required)
    Username for basic authentication of Redis node with the platform.
  • Password (Required)
    Password for basic authentication of Redis node with the platform.
  • Key (optional)
    Key used for caching.
  • Value (optional)
    Value associated with the key that needs to be cached.
  • Channel (optional)
    Name of the channel to which message to be published.
  • Payload (optional)
    Payload message published to the channel. Redis channel support String, buffer and date type. The node will not be doing any default conversions. You can use the transformation nodes for this purpose.
  • Connection Timeout (optional)
    Connection timeout for redis node. The default is 3600000 milliseconds

Note
512 mb is the minimum memory requirement for your AWS lambda deployment when using Redis node.

Supported Operations

  • Set
    Set operation is used for inserting or updating a value for a particular key in Redis cache.
  • Get
    Get operation is used for retrieving the value for a particular key in Redis cache.
  • Publish
    Publish operation is used for publishing a message to Redis channel as part of pub sub model.

Throws

Redis node throws the following exception.

  • RedisPublishError
  • RedisBadRequestError
  • RedisUnknownError
  • RedisAuthenticationError
  • RedisConnectionError

Returns

Payload is not overwritten by the response from this node. The returned response from Redis node can be accessed using msg.redis object. Eg: To get the value for a key you can access the object using msg.redis.key.