RFC: Redis as the default Cache

Coming back to this to attempt to arrive at a decision. Based on the current feedback, and operation of Redis by users in production, I am proposing:

We stick with one Redis instance for now to not add the complication of operating a second instance. We move to using Redis as the caching option by default with a period of fallback to file-based if a user wants to configure it as such. If and when the time comes that this solution is impeding operations or we desire to have caching rules in place that contradict the tenants of the Redis instance we can re-evaluate deploying a secondary Redis system.

2 Likes

This has been implemented in Foreman 3.9.

1 Like

Can I use external redis server for this purpose?

There are 2 Redis databases Foreman uses and this should work (though I didn’t test it myself):

  • Dynflow: --foreman-dynflow-redis-url redis://$HOST:$PORT/$DB (default DB: 6)
  • Foreman cache: --foreman-rails-cache-store type:rails --foreman-rails-cache-store urls:HOST:PORT:DB (default DB: 4)

In a Katello installation there’s also:

I’ve submitted Configurable Redis URL by ekohl · Pull Request #331 · theforeman/puppet-pulpcore · GitHub to enhance puppet-pulpcore. Once that’s available, we can expose it in puppet-foreman_proxy_content.

2 Likes