You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Tomas Vondra <tv...@fuzzy.cz> on 2011/04/23 01:58:24 UTC

multiple nodes sharing the same IP

Hi all,

I have a very simple question - is it possible to operate multiple
cassandra nodes on the same IP?

I'm a complete newbie so I've been playing with a bunch of local nodes,
struggling to build a ring. It took me a lot of time until I set up two
nodes on diffent IP addresses (localhost and an IP assigned to the eth
interface) and suddenly everything started to work.

It seems a bit strange that you can set storage/rpc/jmx port but it's
not possible to set port for a seed (at least I haven't found a way to
do that).

Do I really need to set virtual IPs, or have I missed something?

regards
Tomas

Re: multiple nodes sharing the same IP

Posted by Tomas Vondra <tv...@fuzzy.cz>.
Dne 23.4.2011 10:15, Maki Watanabe napsal(a):
> storage_port: Used for Gossip and Data exchange. So in your word, it
> is the port for the seeds.
> 
> You CAN change the storage_port, but all nodes in your ring need to
> use same storage_port number.
> That's why you need different IP address for each node.

Oh, I see. So if the nodes can't use different storage ports, then it's
obvious why it's not needed to specify a port for seeds (there's only
one possible value, shared by all the nodes). I don't see a reason for
this restriction, but it explains the need for multiple IPs.

> rpc_port: Used for Thrift which the Cassandra clients connect to.
> 
> I can't understand why you can't change rpc_port.

That statement (I've mixed rpc and storage port in my previous post) was
based on the logic that if you can't specify a port for a seed, you
can't actually change it. I didn't know all the nodes need to share the
same storage port, which means you don't need to specify the port
because it's equal to the port for the new node.

regards
Tomas

Re: multiple nodes sharing the same IP

Posted by Maki Watanabe <wa...@gmail.com>.
storage_port: Used for Gossip and Data exchange. So in your word, it
is the port for the seeds.

You CAN change the storage_port, but all nodes in your ring need to
use same storage_port number.
That's why you need different IP address for each node.

rpc_port: Used for Thrift which the Cassandra clients connect to.

I can't understand why you can't change rpc_port.

maki


2011/4/23 Tomas Vondra <tv...@fuzzy.cz>:
> Dne 23.4.2011 03:08, Jonathan Ellis napsal(a):
>> You really need different IPs.
>
> OK, thanks. Is there some reason for that? Because if you can't specify
> the port for the seeds (which seems like the reason why different IPs
> are needed), then you actually can't change the port at all. So the rpc
> port is actually fixed and there's no point in changing it ...
>
> Tomas
>

Re: multiple nodes sharing the same IP

Posted by Tomas Vondra <tv...@fuzzy.cz>.
Dne 23.4.2011 03:08, Jonathan Ellis napsal(a):
> You really need different IPs.

OK, thanks. Is there some reason for that? Because if you can't specify
the port for the seeds (which seems like the reason why different IPs
are needed), then you actually can't change the port at all. So the rpc
port is actually fixed and there's no point in changing it ...

Tomas

Re: multiple nodes sharing the same IP

Posted by Jonathan Ellis <jb...@gmail.com>.
You really need different IPs.

2011/4/22 Tomas Vondra <tv...@fuzzy.cz>:
> Hi all,
>
> I have a very simple question - is it possible to operate multiple
> cassandra nodes on the same IP?
>
> I'm a complete newbie so I've been playing with a bunch of local nodes,
> struggling to build a ring. It took me a lot of time until I set up two
> nodes on diffent IP addresses (localhost and an IP assigned to the eth
> interface) and suddenly everything started to work.
>
> It seems a bit strange that you can set storage/rpc/jmx port but it's
> not possible to set port for a seed (at least I haven't found a way to
> do that).
>
> Do I really need to set virtual IPs, or have I missed something?
>
> regards
> Tomas
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com