14:41:04 GMT hi, if I want my ruby app+nginx to connect to redis with a unix socket, what is the correct way to set permissions? I've set unixsocket /var/run/redis/redis.socket and unixsocketperm 755 14:41:56 GMT that's not working, as my ruby script doesn't run as the redis user (redis.socket belongs to redis:redis), so it doesn't get write permission 15:21:04 GMT not sure if the executable bit is necessary 15:21:55 GMT you could either change the socket's group to your ruby app's group or add your ruby app's user to the redis group and give it write permissions (775 or 664) 15:51:14 GMT I don't have much experience with Redis, so I wanted to know if my approach is sensible: Let's say I have multiple server nodes running, all connected to a Redis instance. A user connected to one server sends a message to another user, so basically what I need to do is route the message to the recipient. I was wondering whether I should just keep a set of connected users in memory in the each server process and as a message is rec 15:51:30 GMT check if a client is connected, and if so, send it to the connected client. 15:52:01 GMT Or, should I perhaps store the connected state in Redis for each client and the relevant server id/address, and if so, how would it be best to go about that? 15:52:43 GMT For instance, a set of "presence:server_id":user_id - but this would not allow me to get the count of all connected users, for instance. 15:53:07 GMT or perhaps a set, "presence:server_id": { user_id1, user_id2, ... } 15:54:06 GMT that way I should easily be able to count the individual number of connected users, by joining each set 15:55:12 GMT what I ultimately need to do is an efficient way to route websocket messages received in one server to all the relevant servers with recipient clients, and I'm just not sure what the standard approach is here - also taking into account that I want to be able to see user presence, etc... 15:55:47 GMT Any tips would be greatly appreciated :) 16:09:56 GMT minus: I'm not sure which one is better... the ruby app should run with the same user as nginx, right? (I'm using nginx+passenger) 16:10:17 GMT in which case that's nbody, and I'm not sure adding user nobody to groups is a good idea 16:10:55 GMT the other solution as you said would be to make redis.socket belong to redis:http (nginx runs as nobody:http) 16:11:05 GMT King_DuckZ: nginx and passenger should be fine running under separate users too 16:11:15 GMT but I couldn't find a setting for changing that group in redis.conf 16:11:17 GMT yes, that would work 16:11:29 GMT hmm 16:11:47 GMT afaik redis doesn't start as root and drop privs, it gets started as a specific user already 16:11:59 GMT you'll have to modify your service scripts 16:12:02 GMT ahh so systemd 16:12:08 GMT let me have a look 16:12:50 GMT you're right, it's in the redis.service script... so I should start it as redis:http ? 16:15:25 GMT yeah. however every web thing running will then have redis-access too 16:18:43 GMT I tried your first suggestion actually and it works - it turns out that if I change my website's owner to redis, it will be able to access redis.socket with 600 perm 16:19:28 GMT it looks like the cleanest way to me 16:21:31 GMT you don't have to change the owner, just the group and fix group permissions 16:21:57 GMT ok, let me try 16:23:54 GMT hmm nope, I can't just change the group of my website, I think I'd have to create a my_app user and add it to redis group 16:25:35 GMT yeah 16:27:08 GMT it worked like that :) 16:27:12 GMT thanks! 21:44:02 GMT Hi there - I'm trying to figure out whether I should use a single (or few) pub/sub channels or whether it might work to have many, many channels. 21:44:43 GMT My use case is basically inter-node communication. So if i have 100k nodes, and each node has their own channel, would it be scalable if each node subscribed to say... 10 of these? 21:46:39 GMT Never mind - figured it out!