Questions tagged [ioredis]

A robust, performance-focused and full-featured Redis client for Node and io.js.

About

ioredis is a robust, full-featured Redis client for Node and io.js.

Features

  • Full-featured. It supports Cluster, Sentinel, Pipelining and of course Lua scripting & Pub/Sub (with the support of binary messages). High performance.
  • Delightful API. It works with Node callbacks and Bluebird promises.
  • Transformation of command arguments and replies.
  • Transparent key prefixing.
  • Abstraction for Lua scripting, allowing you to define custom commands.
  • Support for binary data.
  • Support for TLS.
  • Support for offline queue and ready checking.
  • Support for ES6 types, such as Map and Set.
  • Support for GEO commands (Redis 3.2 Unstable).
  • Sophisticated error handling strategy.

Links

204 questions
19
votes
1 answer

Nodejs IOREDIS: how to set expire time for a key?

I am connecting to a Redis sentinel using the code given below var Redis = require('ioredis'); var redis = new Redis({ sentinels: [{ host: '99.9.999.99', port: 88888 }], name: 'mymaster' }); I am setting the value of a key by using…
Vikas Bansal
  • 10,662
  • 14
  • 58
  • 100
18
votes
2 answers

Redis (ioredis) - Unable to catch connection error in order to handle them gracefully

I'm trying to gracefully handle redis errors, in order to bypass the error and do something else instead, instead of crashing my app. But so far, I couldn't just catch the exception thrown by ioredis, which bypasses my try/catch and terminates the…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
9
votes
2 answers

Redis TLS configuration with Nodejs

I'm using ioRedis node package for connecting my node js application to redis server which is secured by TLS. Redis version I'm using is Redis 6.0. My server is running fine with the certificates but while connecting from node application I get…
Rajat Gupta
  • 91
  • 1
  • 1
  • 2
8
votes
4 answers

ioredis Unhandled error event: Error: connect ETIMEDOUT

Has anyone encountered below error while connecting to standalone redis server using node js ioredis package? Below is the error stack trace: 2018-08-16T10:52:18.351869060Z [ioredis] Unhandled error event: Error: connect…
Ankur Soni
  • 5,725
  • 5
  • 50
  • 81
7
votes
1 answer

ioredis connection keeps resetting when connecting to local redis cluster from docker container

I have a docker compose containerized client/server node app that is failing to create a stable connection to a redis cluster I have running on my local environment. The redis cluster has 6 nodes (3 master, 3 replica configuration) running on my…
kachow6
  • 1,134
  • 12
  • 15
7
votes
3 answers

Redis docker not available on localhost of docker-compose

I've currently ran into a problem i'm trying to solve for more than a week and i'm getting nowhere. I hope you can point me into the right direction. Initial Situation Description The project i am building is a NestJS App which connects to some…
sehe
  • 390
  • 5
  • 16
7
votes
4 answers

ReplyError: MOVED error after connecting to Redis Cluster AWS

I am building a nodejs app that connects to redis. I have this working with my local instance of redis. Now, I am using ioredis to connect from my nodejs app to my redis cluster in k8s in AWS. Here is what I have. const Redis =…
afriedman111
  • 1,925
  • 4
  • 25
  • 42
7
votes
1 answer

IOREDIS - Error Trying to Migrate from Redis to KeyDB

We were using Redis for a plenty of time until we have come to the conclusion that moving to KeyDB may be a good choice for its features. Environment OS: Centos 7 NodeJs: v12.18.0 Redis: v6.0.5 Targeted KeyDB: v0.0.0 (git:1069d0b4) // keydb-cli -v…
Peshraw H. Ahmed
  • 439
  • 3
  • 22
7
votes
3 answers

Redis sentinel not connect to master: Error: READONLY You can't write against a read only slave?

I have this redis replication with sentinel architect: 5 servers: .1, .2, .3, .4 and .5 .1: nodejs app, redis master, redis sentinel .2: nodejs app, redis slave .3: nodejs app, redis slave .4: redis sentinel .5: redis sentinel Sentinel handle…
Justin
  • 4,400
  • 2
  • 32
  • 36
7
votes
1 answer

how to check with ioredis if the a connection was established to the redis server?

I'm writing a nodejs 5.10.1 application, and i connect to a redis-server. i'm using the ioredis nodejs module from https://github.com/luin/ioredis. I can't seem to figure out how to check if a connection was established to the server. the code to…
ufk
  • 30,912
  • 70
  • 235
  • 386
6
votes
3 answers

Close redis connection when using NestJS Queues

I'm trying to setup E2E tests in a NestJS project, however, jest output looks like this: Jest did not exit one second after the test run has completed After a lot of reading this is because there are some resources, not yet liberated, after some…
zzantares
  • 341
  • 3
  • 12
5
votes
1 answer

Using a Redis Singleton for NextJS API Routes

In my NextJS app, I have multiple API routes: /api/user/[id] /api/questions /api/posts Each of these endpoints uses a Redis connection to get or put data within a Redis server. I've noticed that I get errors in my console, because I am making too…
Jonty800
  • 482
  • 7
  • 20
5
votes
2 answers

Why does connecting to a cluster constantly loop in IoRedis?

I am currently trying to connect to my Redis cluster stored on another instance from a server running my application. I am using IoRedis to interface between my application and my Redis instance and it worked fine when there was only a single Redis…
serbis
  • 111
  • 1
  • 4
5
votes
2 answers

Sending arbitrary commands to redis using ioredis

Is it possible to send arbitrary commands to Redis using ioredis for Node JS? For example, I'm using the new RediSearch module, and want to create an index using the command: FT.CREATE test SCHEMA title TEXT WEIGHT 5.0 How would I send this command…
Jesse Reilly
  • 186
  • 2
  • 11
5
votes
1 answer

Should I keep my redis connection persistent?

I'm considering using redis as a key value store for my api application. The api basically only needs one client connection to the redis. What I'm not sure is that should I keep the connection open forever? Or should I only open the connection when…
Ville Miekk-oja
  • 18,749
  • 32
  • 70
  • 106
1
2 3
13 14