Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a read only connection in Redis?

I searched google for this but didn't get a clue.

Suppose a user has full read/write access to Redis database. I am wondering, is there any way to connect to database in read-only mode?

like image 363
Sabari Krishnan M Avatar asked Jan 08 '19 10:01

Sabari Krishnan M


1 Answers

Redis, until and including v5, does not have the notion of user privileges as it does not support the notion of users. There is one user as far as the database is concerned, and that user is omnipotent.

That said, since v2.6 replicas are configured by default to reject writes, effectively making them a read-only interface (the replica-read-only configuration directive).

Note: it is expected that in its next major version, Redis will provide user access lists.

like image 151
Itamar Haber Avatar answered Sep 19 '22 00:09

Itamar Haber