Separating Redis clusters. What’s sent into Redis? Cached views, Sessions, both?

(Renoir Boulanger) #1

Hi all,

In my cluster I have two separate Redis clusters. One that stores session data (“sessions” cluster), and another that I send expensive generated objects (“objects” cluster). The idea behind this is that I can purge completely what’s in “objects” redis nodes without risking to kick out users.

My question becomes then, is there such separation?

(Renoir Boulanger) #2

After reading related discussion in Multisite configuration with Docker, another question came up to mind.

Besides running Redis and PostgreSQL, what does the data container runs? I imagine its useless if I already configured my app node to use already managed Redis and PostgreSQL cluster?

This makes me wonder, what would be the syntax if I had more than one private IPs of Redis servers available?

Container configuration template

Here is my containers/app.yml file (the only one I need):

The following template is used;

The {{ variable_name }} would get interpolated into the Docker host server with values that woud look like this;

  • dir: /var/discourse
  • db.username: foo
  • db.password: bar
  • db.hostname: (direct private IP to PostgreSQL server)
  • tld:
  • alpha_redis: ['',''] but first item would be caught and have :6379 stripped off.
# Managed by Salt Stack. Do NOT edit manually!
# location:

  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

  - "{{ upstream_port }}:80"   # fwd host port {{ upstream_port }}   to container port 80 (http)

  db_default_text_search_config: "pg_catalog.english"

  DISCOURSE_DB_USER: {{ db.username }}
  DISCOURSE_DB_PASSWORD: {{ db.password }}
  DISCOURSE_DB_HOST: {{ db.hostname }}
  DISCOURSE_REDIS_HOST: {{ alpha_redis[0].split(':')[0] }}

  LANG: en_US.UTF-8
  DISCOURSE_HOSTNAME: 'discuss.{{ tld }}'
  DISCOURSE_SMTP_ADDRESS: mail.production.wpdn

  - volume:
      host: {{ dir }}/shared/standalone
      guest: /shared
  - volume:
      host: {{ dir }}/shared/standalone/log/var-log
      guest: /var/log

Programmatic configuration of a new Discourse site