-
-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Add support for Redis clusters
Motivation
I tried to use this plugin to connect to a Redis Cluster but I couldn't do it. Is not specified in the docs and I couldn't find any options in the interface so I'm assuming this is not supported but it would be a great feature.
Currently I couldn't find any workaround other than using a custom implementation directly with ioredis.
Example
import { fastifyRedis } from '@fastify/redis';
import type { FastifyInstance } from 'fastify';
import fp from 'fastify-plugin';
export default fp(async function (fastify: FastifyInstance) {
const { REDIS_HOST, REDIS_PORT } = fastify.getEnvs<EnvSchema>();
fastify.register(fastifyRedis, {
// Something like this would be nice.
clusterOptions: {
host: REDIS_HOST,
port: parseInt(REDIS_PORT),
...
});
});
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers