How to handle read & write operations in different endpoint using Redis Client

394 Views Asked by At

Can we configure two different host for read and write operations in latest redis client version 4.6.5.

I was tried to configure the different redis server host read and write inside the createClient method but could't do that. Is there any other way to achieve this? redis.createClient()

1

There are 1 best solutions below

0
Asad Awadia On

No, there isn't. You can create two clients - 1 for each hostname

The closest thing would be https://github.com/redis/node-redis/blob/master/docs/clustering.md