04:31:35 GMT Hi guys, i am new to redis DB. Could someone provide any tutorial link with deep dive in redis. I went through the redis.io tutorial. would love to understand redis' architecture in much more detail 10:01:09 GMT can anyone help me figure out what might be going on here? https://gist.github.com/mikecmpbll/e081f92b862e794ca0332ee90a8b32a9 10:01:24 GMT looks like they're all (the sentinels) trying to reconfigure eachother in a loop 10:02:34 GMT one thing i notice is the two "known-slave" in the sentinel config are actually two IPs for the same server, which could be the cause. not sure how these are discovered though so don't know how to address the issue. 10:15:43 GMT Are you doing anything with proxies or so? 10:16:30 GMT Don't attach slaves through haproxy or so 10:16:45 GMT the sentinels seem to see different IPs for a single node 10:16:57 GMT ensure sentinels are all using the right IP to talk to other sentinels 10:17:05 GMT either bind to a fixed IP or change the advertised IP 10:18:43 GMT nothing with proxies. there are two networks involved but all the servers are on both networks 10:19:57 GMT how do the sentinels "see" an IP for a node 10:20:37 GMT if nodes are resolving IPs differently, i'm not sure how to sort that 10:22:47 GMT Sentinel nodes try to detect the IP from the interface they are bound to and than advertise that 10:23:08 GMT and the other side sees a node connect with another IP 10:23:15 GMT and thus lead to both sides seeing different things 10:23:25 GMT so just pick one and stick with it ;) 10:51:45 GMT "<@badboy_> Sentinel nodes try to detect the IP from the interface they are bound to" — how does a sentinel get bound to interface? sorry if i'm being a moron just trying to figure this out. 10:53:32 GMT oh, literally the bind directive in the config? i'm not using that at all at present. 11:07:31 GMT so if i explicitly bind everything, sentinels and servers, to their interface on the same vlan .. 11:13:26 GMT how many sentinels do you have? 11:13:40 GMT 3 11:13:49 GMT 2 in one DC, 1 in the other? 11:13:52 GMT correct 11:13:59 GMT with a quorum of 2? 11:14:23 GMT indeed. (yes i know, it doesn't make sense right now, i'm just getting it set up and i'll add more :D) 11:15:40 GMT i'm not sure it can ever make sense with sentinels in the DCs. the DC with fewer sentinels can never promote to master on netsplit 11:16:06 GMT well, maybe if you put at least one sentinel in a third location 11:17:31 GMT hmmm. 11:18:23 GMT can i have 4 sentinels and a quorum of 2? :D 11:18:36 GMT of course 11:18:44 GMT if you want 2 masters 11:18:47 GMT :D 11:20:23 GMT why 2 masters? 😖 11:20:44 GMT oh yeah nvm. 11:29:23 GMT what happens if >=quorum of sentinels become unavailable 11:29:47 GMT no reconfiguration will ever happen? 11:30:26 GMT i'd assume so 11:31:02 GMT you can have 4 sentinels, but that won't buy you anything 11:31:11 GMT you will need 3 sentinels in contact to do a failover 11:31:46 GMT it's always (n/2)+1 for the actual failover, no matter what quorum you configured for down detection 11:32:23 GMT i see. 11:32:23 GMT so this isn't the right tool for the job, i'm assuming? i want datacentre independence like i have for all my other services. 11:35:47 GMT I don't know what you want to achieve^^ 11:36:43 GMT if one DC goes down my clients can failover to the redis slave at the other DC :D 11:38:42 GMT in that case you wil always need an external node to help with decisions 11:39:08 GMT also it's not clients doing a failover, it's the actual data nodes switching ;) 11:39:14 GMT (but I guess I know what you mean) 11:40:38 GMT hmmm yeah. so i could have 2 at each DC and 1 at another place. therefore if either production DC goes down we got a majority of sentinels external to that to detect it 11:40:54 GMT right 11:41:03 GMT or just one per datacenter, but definitely one externally 11:41:46 GMT ah yeah. that's good. i can understand that 👍🏼. just this IP issue to figure out now. 11:42:10 GMT yes, use "bind" to explicitely bind to one IP 11:42:33 GMT righto, i'll stick binds in everywhere and see how i get on. 11:42:44 GMT thanks for your help @badboy_ & minus :') 13:34:54 GMT is there a way I can see the announce-ip from redis-cli? https://github.com/antirez/redis/blob/06263485d46696ba76a653d2b594f3493103c001/src/sentinel.c#L2478-L2484 13:44:49 GMT config get announce-ip 13:45:07 GMT oh, well, that will show the configured one 13:51:20 GMT yeah, i'm interested to see how it is configured with bind address as 0.0.0.0 14:03:02 GMT SUBSCRIBE __sentinel__:hello on one of your Redis nodes 14:03:20 GMT then you will see what they announce 14:05:14 GMT <3 thanks 14:13:01 GMT this is what i'm trying to achieve .. https://goo.gl/obwLe0 14:15:12 GMT well, can sentinel 3 reach 10.1.24.* IPs? 14:15:22 GMT no :( 14:18:06 GMT then this will never work 14:18:15 GMT Sentinels need to be able to talk to each other 14:21:11 GMT well, they could talk to eachother, but on different interfaces. 14:25:26 GMT maybe i can make them all announce public ips and do some NAT for ones on the same local network :/ 14:38:39 GMT is there a library for sorted sets like they exist for python? 14:38:54 GMT is there a library for sorted sets like they exist in redis for python? 15:03:38 GMT whois soveran 18:20:19 GMT is there a way to blpop multiple items? 18:21:53 GMT no 18:37:48 GMT anyone using the predis php lib? 18:38:13 GMT trying to figure out transactions 18:48:42 GMT WATCH is like a lock, right? 18:50:47 GMT no, it doesn't lock anything 18:50:59 GMT well, it's passive 18:51:14 GMT I need to protect against a race condition - I need to DEL 2 things, but only if HGET firstthing foo is a certain value 18:51:16 GMT if any of the watched keys are touched the transaction aborts 18:51:37 GMT you can do that in a lua script 18:51:42 GMT those are atomic 18:51:47 GMT yeah... I was hoping to avoid that 18:51:51 GMT but you'll have to do the check in lua 18:52:32 GMT watch/multi/exec should work too though, as long as you just have one DEL command 18:52:37 GMT and no other modifications 18:52:43 GMT already have too many different languages :/ 18:52:46 GMT but it might fail and you have to retry 18:53:14 GMT just 1 DEL? why is that? 18:54:06 GMT ah nvm 18:55:22 GMT should probably work 18:55:42 GMT the docs should tell you everything you need to know 18:56:10 GMT except that I have to "translate" the redis docs into php/predis :) 18:56:59 GMT hah. I just realized that the race condition can't happen. 18:57:02 GMT wheeeee 18:58:10 GMT it's impossible to go from "ok to delete" to "not ok to delete"