Redis and multiple users

1,165 views
Skip to first unread message

Kevin Burton

unread,
Nov 13, 2012, 1:38:14 PM11/13/12
to redi...@googlegroups.com
Many of the examples that I see have a single user entering commands in the redis-cli. There are no name spaces or other partiions. My question is when I create a variable using something like 'SET count 2' can another user connect with the same redis server and see this value and update it? If so at what point is the value available? When are the values persisted?

Thank you.

Felix Gallo

unread,
Nov 13, 2012, 1:41:22 PM11/13/12
to redi...@googlegroups.com
Redis is single threaded.   Changes in values are made immediately in memory.  Every user can see and modify all values; there is no security model.  Values are persisted (to disk) depending on the particular persistence mode selected.

F.

On Tue, Nov 13, 2012 at 10:38 AM, Kevin Burton <rkevin...@charter.net> wrote:
Many of the examples that I see have a single user entering commands in the redis-cli. There are no name spaces or other partiions. My question is when I create a variable using something like 'SET count 2' can another user connect with the same redis server and see this value and update it? If so at what point is the value available? When are the values persisted?

Thank you.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To view this discussion on the web visit https://groups.google.com/d/msg/redis-db/-/jaqqrroBJMYJ.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.

Marc Gravell

unread,
Nov 13, 2012, 2:34:39 PM11/13/12
to Felix Gallo, redi...@googlegroups.com
Just to add - namespace isolation (mentioned in the question) is basically: however you name the keys. For example, instead of count you could have "mgravell/count". There is also db isolation (see the "select" command), although this isn't supported on redis-cluster.

From: Felix Gallo
Sent: 13/11/2012 18:41
To: redi...@googlegroups.com
Subject: Re: Redis and multiple users

Michael Jackson

unread,
Nov 13, 2012, 2:36:32 PM11/13/12
to redi...@googlegroups.com
The only kind of partition that you have in Redis apart from starting up a completely separate server is the idea of a database. Databases are named using a number. You can choose to use one database over another by issuing a SELECT command (see http://redis.io/commands/select). The default redis.config specifies 16 databases.

As far as security goes, Redis provides a simple password-based authentication. You just set a password in the server's config file and use the AUTH command (see http://redis.io/commands/auth) to authenticate with the server.

--
Michael Jackson
@mjackson


On Tue, Nov 13, 2012 at 10:38 AM, Kevin Burton <rkevin...@charter.net> wrote:
Many of the examples that I see have a single user entering commands in the redis-cli. There are no name spaces or other partiions. My question is when I create a variable using something like 'SET count 2' can another user connect with the same redis server and see this value and update it? If so at what point is the value available? When are the values persisted?

Thank you.

--

Josiah Carlson

unread,
Nov 13, 2012, 2:56:11 PM11/13/12
to redi...@googlegroups.com
Some things to note that haven't been mentioned in this thread yet:
* passwords in Redis are sent in plain text, so you should trust the
network you send the password over
* Redis is not meant to be called directly from a non-controlled
client; it is a database (without user authentication), and should
have controlled access like any other database

Regards,
- Josiah
Reply all
Reply to author
Forward
0 new messages