jambonz / realtimedb-helpers

utility functions for querying jambonz redis database
0 stars 9 forks source link

Add support for redis clusters #54

Open zscgeek opened 8 months ago

zscgeek commented 8 months ago

Can we add support for connecting to redis clusters? When using Amazon ElastiCache Serverless they require you to connect via the cluster method. From what I have seen the redis client should support this - take a look at this page:

https://github.com/redis/ioredis?tab=readme-ov-file

Main thing is we need to support connecting to a Redis.Cluster object.

const Redis = require("ioredis");

const cluster = new Redis.Cluster([
  {
    port: 6380,
    host: "127.0.0.1",
  },
  {
    port: 6381,
    host: "127.0.0.1",
  },
]);
zscgeek commented 8 months ago

Additional background:

https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.deployment.html