Re: multi-region replication and fail-over

170 views
Skip to first unread message

Yiftach Shoolman

unread,
May 20, 2013, 6:16:21 AM5/20/13
to redi...@googlegroups.com
Why do you need to mix public and private IPs ? AFAIK private IPs can be used across all the zone in an AWS region.


On Fri, May 17, 2013 at 9:03 PM, Dane Miller <da...@optimalsocial.com> wrote:
Hi,

I've seen this topic covered incompletely in a couple of places, and I'd like to bring it up again.  We have redis slaves in multiple EC2 regions, replicating from a single master, and would like to implement an auto-failover solution, perhaps with redis-sentinel.  As others have noticed, sentinel doesn't play well when mixing public and private IPs because all IPs registered with the master must be reachable be all redis and sentinel instances.  So we're considering a couple of options to make all IPs reachable...

1. use a vpn
2. use public IPs

What are other options?  

I'm also curious if ZooKeeper makes this easier.

Dane

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Yiftach Shoolman
+972-54-7634621

Dane Miller

unread,
May 29, 2013, 1:59:41 PM5/29/13
to redi...@googlegroups.com
On Monday, May 20, 2013 3:16:21 AM UTC-7, Yiftach wrote:
Why do you need to mix public and private IPs ? AFAIK private IPs can be used across all the zone in an AWS region.

I'm dealing with a multi-region scenario in us-east-1 and us-west-1, not simply a multi-AZ scenario in a single region.

One solution would be for redis-sentinel to use domain names instead of IP addresses.  Instead if broadcasting "newmaster 10.20.30.40" it would broadcast "newmaster redis-east1.mydomain.com".  This allows mixing public/private IPs, since the same DNS name can resolve to different IPs in different regions.  In fact, this is the approach used by mongodb replication.

At present, it looks like there are only 2 options for a multi-region redis-sentinel cluster: public IPs or VPN.  But perhaps there are others lurking who can chime in... ?

Dane

Dane Miller

unread,
May 30, 2013, 3:28:46 PM5/30/13
to redi...@googlegroups.com
I just tested with external IPs and found a problem.   Sentinels publish their *internal* IP to the SENTINEL_HELLO_CHANNEL on the master (__sentinel__:hello).  My C is a bit rusty, but it looks like this is the culprit in sentinel.c: inet_ntoa(sa.sin_addr).  Actually, it's 

Would it be reasonable to request an option to specify the IP address (or even better, specify a domain name) sentinels publish?  

Maybe something like this...
  sentinel publish-addr <IP or domain name>

Dane

Dane Miller

unread,
May 30, 2013, 3:31:27 PM5/30/13
to redi...@googlegroups.com
On Thursday, May 30, 2013 12:28:46 PM UTC-7, Dane Miller wrote:
I just tested with external IPs and found a problem.   Sentinels publish their *internal* IP to the SENTINEL_HELLO_CHANNEL on the master (__sentinel__:hello).  My C is a bit rusty, but it looks like this is the culprit in sentinel.c: inet_ntoa(sa.sin_addr).  Actually, it's 

Sorry, that sentence got truncated.  Should read... Actually, it's the socket address, which is also the internal address for EC2 and other NAT environments. 
Reply all
Reply to author
Forward
0 new messages