Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

The node "Redis Enhanced" provides a comprehensive interface to interact with a Redis database, supporting a wide range of Redis operations including string manipulation, list handling, set and sorted set management, hash operations, key scanning, and Lua script execution. It is designed for users who want to get, send, and update data in Redis with enhanced capabilities beyond basic commands.

A common use case is managing real-time data caching, session storage, or leaderboard systems where sorted sets are used. For example, the "Sorted Set Cardinality" operation allows you to retrieve the number of members in a sorted set, which can be useful to quickly assess the size of a leaderboard or ranking list stored in Redis.

Practical examples:

  • Counting how many unique scores exist in a game leaderboard (sorted set).
  • Managing expiration times on keys for session management.
  • Executing Lua scripts for atomic multi-step operations.
  • Publishing messages to Redis channels for event-driven architectures.

Properties

Name Meaning
Sorted Set The name of the sorted set in Redis on which the operation will be performed.
Value Is JSON (Shown only if key type is "hash") Whether the value is JSON or key-value pairs.

Note: The above properties are specific to the "Sorted Set Cardinality" operation under the "Default" resource. The node supports many other properties depending on the selected operation.

Output

The output JSON structure for the "Sorted Set Cardinality" operation includes:

{
  "sortedSet": "name_of_sorted_set",
  "cardinality": 123
}
  • sortedSet: The name of the sorted set queried.
  • cardinality: The number of members in the sorted set (an integer).

This output provides a direct count of elements in the specified sorted set.

The node does not output binary data for this operation.

Dependencies

  • Requires a Redis server connection configured via an API key credential or equivalent authentication method.
  • The node uses a Redis client library internally to communicate with the Redis instance.
  • No additional external services are required beyond the Redis server itself.

Troubleshooting

  • Common issues:

    • Connection failures due to incorrect Redis credentials or network issues.
    • Providing an empty or non-existent sorted set name will result in zero cardinality or errors.
    • Misformatted input parameters (e.g., missing required fields) may cause the node to throw errors.
  • Error messages:

    • Errors related to Redis connection or command execution will be surfaced with their message.
    • If the node is set to continue on failure, errors for individual items will be included in the output JSON under an error property.
    • For example, "Score-member pairs must be even number of arguments" error occurs if input formatting is incorrect for certain operations (not directly relevant to cardinality but indicative of input validation).
  • Resolution tips:

    • Verify Redis credentials and connectivity.
    • Ensure the sorted set name is correct and exists in Redis.
    • Use the node's "continue on fail" option to handle partial failures gracefully.

Links and References

Discussion