
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@luckbox/redis
Advanced tools
Provides a wrapper that handles some of the connection deficiencies of the "redis" 2.x.x package
A wrapper that handles some of the connection deficiencies of the "redis" 2.x.x package.
When using Redis in a high-availability environment, one might find that in some cases the NodeRedis's retry_strategy might not provide enough flexibility. If the server does not come back before the next reconnection attempt happens, the client hangs until the underlying socket times out, usually 120 seconds - the system's default. If however, the connection_timeout is lowered so that the the reconnection attempts are given up on sooner, once the socket times out no further attempts are made, rendering the retry_strategy useless.
This wrapper can be used as a drop in replacement for the NodeRedis library, as it exposes the same API interface.
const redis = require('@luckbox/redis');
const client = redis.createClient({
host: '127.0.0.1',
port: 6379,
heartbeat_interval: 10000,
heartbeat_timeout: 5000
});
client.on('heartbeat-timeout', error => {
console.warn('Connection to Redis lost. Retrying...', error);
});
client.set('myKey', 'foo', redis.print);
...
For general usage, refer to the official documentation.
The following additional functionality has been added:
| Name | Default | Description |
|---|---|---|
| heartbeat_interval | 5000 | How often to check the connection's health in milliseconds |
| heartbeat_timeout | 1000 | How long before a heartbeat times out in milliseconds |
heartbeat-timeout
client will emit heartbeat-timeout when the last heartbeat has timed out.
FAQs
Provides a wrapper that handles some of the connection deficiencies of the "redis" 2.x.x package
The npm package @luckbox/redis receives a total of 7 weekly downloads. As such, @luckbox/redis popularity was classified as not popular.
We found that @luckbox/redis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.