Allowed talking to redis sentinel by changing the redis client to ioredis. #214
+2,830
−96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is proposed to solve this issue
Problem statement
The problem was that the current state of hydra make it very hard for it to work in a high availability environment specifically in talking with redis since the current client that is used does not support
redis modes of working in high availability.
Solution
So , what this pull request do is that I have changed the main redis client which is node_redis to the more advanced redis client which is ioredis that supports redis cluster mode , and redis redis sentinel.
and actually that's all we need to make hydra work in high availability.
change description:
The change as said above is just changing the main connection from node_redis to ioredis .I did not to change most of the commands since ioredis have similar api to node_redis I have also used this guide for migrating which shows the difference between both clients.
so the main changes are
Also later on I will be making a small guide to be used on how to install and deploy hydra with redis in high availability environment in kubernetes.
Thanks