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

Use distinct Redis database numbers (helpful when "main" and "cache" are the same server) #203

Open
jnm opened this issue Oct 18, 2022 · 0 comments

Comments

@jnm
Copy link
Member

jnm commented Oct 18, 2022

Sometimes we recommend that people make redis-main.… and redis-cache.${PRIVATE_DOMAIN_NAME} point to the same server, e.g. for staging environments. For those cases, since the database numbers are hard-coded, we should avoid using the same number (2) for both REDIS_SESSION_URL and KOBOCAT_BROKER_URL.

REDIS_SESSION_URL=redis://{% if REDIS_PASSWORD %}:${REDIS_PASSWORD}@{% endif REDIS_PASSWORD %}redis-cache.${PRIVATE_DOMAIN_NAME}:${REDIS_CACHE_PORT}/2

KOBOCAT_BROKER_URL=redis://{% if REDIS_PASSWORD %}:${REDIS_PASSWORD}@{% endif REDIS_PASSWORD %}redis-main.${PRIVATE_DOMAIN_NAME}:${REDIS_MAIN_PORT}/2

I didn't see any other overlapping database numbers, but I also didn't search exhaustively. Enketo uses database number 0 and cannot be configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant