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

0
0
Asked By MapleOrbit42 On

I'm looking for a self-hosted, Redis-compatible data store that can be shared by several independent applications and services. Redis normally provides 16 logical databases, numbered 0 through 15, and I'd prefer to give each application its own database or namespace through its connection URL while keeping everything on one underlying service. I know that running a separate Redis instance or container per application is the usual recommendation, but I'm specifically wondering whether another option is better suited to sharing one instance across many applications without the 16-database limitation. The applications are third-party software, so changing them to add key prefixes may not be practical.

3 Answers

Answered By QuietLemon7 On

The usual solution is key prefixes, such as `app1:*` and `app2:*`, combined with ACL rules that restrict each application to its own key pattern. That provides practical separation without relying on logical databases. The catch is that every client application needs to use the appropriate prefix, so it is difficult when the software is not under your control.

CopperVale19 -

That’s the problem in this case: these are third-party applications, and I don’t have a setting available to tell them to prepend a namespace to every key.

Answered By NimblePanda58 On

Redis can change the number of logical databases in its configuration. The default is 16, but the `databases` setting in the server configuration controls that value, so you may be able to raise it and restart the service. Keep in mind that logical databases are not a strong security boundary, and clients or applications may still assume the conventional 0–15 range.

HarborMint31 -

I hadn’t noticed that the database count was configurable. That may solve the numeric limit, although I’d still verify that each application supports selecting higher database numbers.

Answered By SilverKite84 On

Valkey is a Redis-compatible, drop-in alternative, but it follows the same logical-database model and does not remove the 16-database issue by itself. Switching to Valkey would make sense for compatibility or project-alignment reasons, not specifically to get unlimited independent databases.

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.