# Support for Redis services without multiple logical databases

**URL:** <https://meta.discourse.org/t/support-for-redis-services-without-multiple-logical-databases/417599>\
**Category:** Development\
**Created:** [November 17, 2026, 1:04am UTC](https://meta.discourse.org/t/support-for-redis-services-without-multiple-logical-databases/417599 "2026-11-17T01:04:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tanya\_byrne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanya_byrne/32/444826_2.png) [@tanya\_byrne](https://meta.discourse.org/u/tanya_byrne)\
**Post date:** [November 17, 2026, 1:04am UTC](https://meta.discourse.org/t/support-for-redis-services-without-multiple-logical-databases/417599/1 "2026-11-17T01:04:12Z")

</div>

Hi!

I’ve been looking into using Azure Managed Redis with a self-hosted Discourse installation and ran into a compatibility issue that I thought might be worth raising.

Azure Managed Redis only supports logical database 0, whereas Discourse currently uses a separate logical database for Sidekiq.

Looking through the Discourse code, I noticed that `sidekiq_redis_config` automatically increments the configured Redis database:

```plaintext
config.merge!(db: config[:db].to_i + 1)

```

This means that even with `DISCOURSE_REDIS_DB=0`, Sidekiq attempts to connect to database 1, resulting in:

```plaintext
Redis::CommandError: ERR DB index is out of range

```

I was wondering whether there would be any interest in making the Sidekiq Redis configuration a little more flexible, while retaining the existing behaviour by default.

A couple of possible approaches might be:

- **Configurable Sidekiq Redis database:** Introducing an optional setting such as `DISCOURSE_SIDEKIQ_REDIS_DB`, allowing the database index to be configured rather than automatically incremented.
- **Separate Redis connection for Sidekiq:** Allowing Sidekiq to connect to a different Redis instance using database 0. This would preserve isolation between Discourse and Sidekiq without requiring multiple logical databases.

We’re trying to reduce the amount of infrastructure we maintain ourselves, so using managed services for things like Redis is preferable to running and maintaining another VM. This is also becoming more relevant as Microsoft is retiring Azure Cache for Redis in favour of Azure Managed Redis, which doesn’t support multiple logical databases.

I appreciate that this isn’t necessarily the standard Discourse deployment model, and there may be good reasons for the existing configuration. However, I thought the compatibility issue was worth raising as it could affect other self-hosted installations using managed Redis services too.

I’d be interested to hear whether either approach would be appropriate, or if there’s an existing configuration option I’ve overlooked.

I’d also be happy to put together a PR if there’s interest in supporting this!

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/support-for-redis-services-without-multiple-logical-databases/417599)._
