Re: Implication of having similar private IPs in two datacenters

2020-07-03 Thread manish khandelwal
I did a small poc for this *(similar rpc_address for both data centers) . *My
observations:

1. rpc_address is used by a client( datastax java driver) in my case to
connect to cassandra nodes.
2. Driver is keeping a list of contact points which it is updating using
system.peers table
3. Having two entries for the same rpc_address sometimes results in one of
the contact points being overridden by a host from another DC.
4. After updates, your cluster metadata may contain contact points from
different DC which is not what we wanted and it results in traffic failure
as the driver is not willing to contact hosts of other DC.
5. Lessons learnt : Don't keep similar rpc_address on two data centers.

Regards
Manish

On Thu, Jun 25, 2020 at 6:29 AM Erick Ramirez 
wrote:

> In a network one can assign valid private IP. Private IPs can conflict if
>> we do not put any restriction on private IP.
>>
>
> Yes, you're right and I was aware of that (not realising that your
> question was more around what I would consider multi-region comms). My
> disconnect now is around the motivation for doing it.
>
> Yes, it will work since C* will communicate over the broadcast address
> across regions. But I personally wouldn't go down this path for the
> operational complexity it adds though YMMV. Cheers!
>


Re: Implication of having similar private IPs in two datacenters

2020-06-24 Thread Erick Ramirez
>
> In a network one can assign valid private IP. Private IPs can conflict if
> we do not put any restriction on private IP.
>

Yes, you're right and I was aware of that (not realising that your question
was more around what I would consider multi-region comms). My disconnect
now is around the motivation for doing it.

Yes, it will work since C* will communicate over the broadcast address
across regions. But I personally wouldn't go down this path for the
operational complexity it adds though YMMV. Cheers!


Re: Implication of having similar private IPs in two datacenters

2020-06-24 Thread Jeff Jirsa
So a few things are true:

- Cassandra uses IP addresses for internal data structures (in released
versions), so duplicating IP nominally means stomping on the wrong host
- Cassandra also differentiates broadcast IP from listen IP  (local IP)
- The broadcast IP is what the other DC is going to see, which probably
means internally things wont conflict. It does mean that your local DC
traffic is going to go out the NAT to the public IP (I think), which may or
may not be a problem
- In general this may actually work, but sounds horrible, and I wouldn't do
it if it were me.


On Wed, Jun 24, 2020 at 1:26 PM Elliott Sims  wrote:

> The Cassandra documentation doesn't require IPs to be unique among members
> of a cluster, because it's not a Cassandra limitation.  Hosts that want to
> communicate amongst themselves over the network need non-conflicting IPs,
> regardless of application.
>
> On Wed, Jun 24, 2020 at 5:09 AM manish khandelwal <
> manishkhandelwa...@gmail.com> wrote:
>
>> The nodes within one datacenter will talk on private IPs and for
>> communication across data center public ips are used. Does that  answer
>> your question? or you are asking in terms of network layer.
>>
>> As per this link
>> ,
>> there is no mention of private IP to be unique.
>>
>> In a network one can assign valid private IP. Private IPs can conflict if
>> we do not put any restriction on private IP.
>>
>> Regards
>>
>>
>> On Wed, Jun 24, 2020 at 5:12 PM Erick Ramirez 
>> wrote:
>>
>>> Putting Cassandra aside, I'm curious to know how you envision that would
>>> work from a network perspective. How would the connectivity between servers
>>> work?
>>>



Re: Implication of having similar private IPs in two datacenters

2020-06-24 Thread manish khandelwal
The nodes within one datacenter will talk on private IPs and for
communication across data center public ips are used. Does that  answer
your question? or you are asking in terms of network layer.

As per this link
,
there is no mention of private IP to be unique.

In a network one can assign valid private IP. Private IPs can conflict if
we do not put any restriction on private IP.

Regards


On Wed, Jun 24, 2020 at 5:12 PM Erick Ramirez 
wrote:

> Putting Cassandra aside, I'm curious to know how you envision that would
> work from a network perspective. How would the connectivity between servers
> work?
>
>>


Re: Implication of having similar private IPs in two datacenters

2020-06-24 Thread Erick Ramirez
Putting Cassandra aside, I'm curious to know how you envision that would
work from a network perspective. How would the connectivity between servers
work?

>