What Redis-compatible option supports more than 16 isolated application namespaces?

0
0
Asked By MellowCedar42 On

I'm looking for a self-hosted, Redis-compatible data store that can be shared by many applications and services. Redis provides logical databases 0–15, but I'd prefer to give each application its own database or namespace through its connection configuration while keeping everything on one underlying service. I understand that running a separate Redis instance or container per application is often recommended, but I'm interested in alternatives that support more isolated namespaces in a shared deployment. The applications are third-party services, so I may not be able to modify them to add key prefixes themselves.

3 Answers

Answered By QuartzHarbor19 On

The number of logical databases is configurable in Redis. The `databases` setting in the configuration file controls how many numbered databases are available, so you are not necessarily limited to the default range of 0–15. Check the Redis version and client behavior first, since some applications assume the standard database range or do not expose database selection in their connection settings.

Answered By CrispLemon88 On

Valkey is intended to be a drop-in Redis replacement, but it follows the same logical-database model, so switching to it will not remove this limitation. If the applications cannot use prefixes and need genuinely separate namespaces, separate Redis or Valkey instances are generally the safer isolation boundary. You can still run multiple lightweight instances on one host or orchestrator.

Answered By OrbitingPanda7 On

Key prefixes are usually the practical solution. Each application would use a namespace such as `app1:` or `service2:`. Redis ACLs can then restrict each account to keys matching only its assigned prefix. The catch is that the application has to support configuring a prefix or namespace; ACLs cannot automatically rewrite arbitrary keys for an application that does not use prefixes.

MellowCedar42 -

That’s the problem in my case—the services are third-party applications, so I can’t necessarily make them prepend a prefix to every key.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.