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

Enable support for redis sentinal #103

Open
killermoehre opened this issue Apr 27, 2023 · 1 comment
Open

Enable support for redis sentinal #103

killermoehre opened this issue Apr 27, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@killermoehre
Copy link

redis sentinel is a fairly easy way to make redis high available.

django-cacheops has actual inbuilt support for this operation mode.

CACHEOPS_SENTINEL = {
    'locations': [('localhost', 26379)], # sentinel locations, required
    'service_name': 'mymaster',          # sentinel service name, required
    'socket_timeout': 0.1,               # connection timeout in seconds, optional
    'db': 0                              # redis database, default: 0
    ...                                  # everything else is passed to Sentinel()
}

Can this be implemented as well? Probably somewhere in /b3lb/loadbalancer/settings.py.

Or is a HA redis not necessary for b3lb?

@PhilippKilian PhilippKilian self-assigned this May 9, 2023
@liske liske added the enhancement New feature or request label May 9, 2023
@liske
Copy link
Member

liske commented May 9, 2023

Using redis for cacheops increases the overall performance of b3lb (less db query overhead). b3lb won't fail if redis is unavailable if the setting CACHEOPS_DEGRADE_ON_FAILURE is set to true (default). It is encouraged to use a local redis instance on each b3lb node for resilience against a redis SPoFs.

Although having no functional impact the accessibility of redis might lead to severe performance issues in high load environments. It should be possible to add configuration support (parsing JSON from a env variable?) for CACHEOPS_SENTINEL.

@liske liske added this to the 4.0.0 milestone May 10, 2023
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

No branches or pull requests

3 participants