Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat[work-in-progress]: add a PostgreSQL database as primary storage πŸ—ƒοΈ #40

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

danBamikiya
Copy link
Owner

This WIP PR is my work on adding a PostgreSQL database as a primary storage demoting Redis to a caching layer.

It also resolves #38

Since we're going to setup a database as a primary data persistence, Redis won't be needed a primary memory store but just as a caching layer. So all redis connection errors are handled to prevent the errors from crashing the Nodejs server

* configure a retry strategy for redis client when connection to Redis server is unavailable
* ping Redis server every 60 minutes to prevent an idle connection timeout
* add event listeners to redis client for basic logging
* set log level to emergency on Nodejs server crashes
* add redis client names for Nodejs connection to Redis server and rate-limit store connection to Redis server
* format Redis connection errors to be more verbose and readable

Resolves #38
@danBamikiya danBamikiya added the enhancement New feature or request label Aug 18, 2021
@danBamikiya danBamikiya self-assigned this Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unavailable Redis connection kills Nodejs process (crashes the server)
1 participant