forked from limitd/limitdb
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: removed ping in favor of ioredis keepalive (#86)
We observed that `limitd-redis` fails to promptly detect a stale TCP connection to Redis, only realizing the connection is down after approximately 12 minutes. After this delay, it reconnects as expected. This update enables the `keepAlive` feature in ioredis, which sets the `KEEPALIVE` option on the socket. This allows for a quicker reaction to stale connections. Key changes: - The `keepAlive` feature is enabled by default and set to 10000 ms. - The `keepAlive` interval can be customized by passing the `keepAlive` argument to the `LimitdRedis` constructor. - Setting the `keepAlive` argument to a non-numeric value will disable the feature. - The manually-implemented ping mechanism against Redis has been removed, as we now rely on ioredis' `keepAlive` feature.
- Loading branch information
Showing
9 changed files
with
28 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ on: | |
|
||
jobs: | ||
test: | ||
env: | ||
CI: true | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ describe('when using LimitDB', () => { | |
}); | ||
}); | ||
}) | ||
}); | ||
}); |
Oops, something went wrong.