Add possibility to configure socket timeout
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.6k
- Forks
- 2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 40
Description
Thanks for wanting to report an issue you've found in node_redis. Please delete
this text and fill in the template below. Please note that the issue tracker is only
for bug reports or feature requests. If you have a question, please ask that on gitter.
If unsure about something, just do as best as you're able.
Note that it will be much easier to fix the issue if a test case that reproduces
the problem is provided. It is of course not always possible to reduce your code
to a small test case, but it's highly appreciated to have as much data as possible.
Thank you!
- Version: 2.8.0
- Platform: Node.js 8.11.1on node:8-alpine docker image on Kubernetes 1.9.3
- Description: On different environments different default tcp timeouts might occur. Currently AFAIK node-redis doesn't allow to configure socket timeout. I find it problematic on my prod environment, when redis server (behind a k8s service, a kind of load balancer) is down for couple of seconds, node_redis client is hanged trying to reconnect. Even though redis starts responding, the client is still hanged until it reaches a timeout which seems to be 130 seconds in my case.
I would like to configure redis client to wait only a given timeout.
The deprecated param connect_timeout seems to not work as expected.
Is there any way to configure socket timeout in node-redis?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the report; start by tracing node-redis connection setup and the deprecated connect_timeout option. Confirm how socket timeout is configured, then verify with a test that a stalled Redis connection honors the configured limit and reconnects without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, node.js, redis
- Domain
- backend, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100