Skip to content

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

@jnm

Description

@jnm

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions