You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Thouraya TH <th...@gmail.com> on 2015/08/04 16:09:25 UTC

Understanding Cassandra Architecture

Hi all,





1-  I have 4 nodes A, B, C, and D (A is the seed node). I have modified
seed node address and listen address of each Cassandra.yaml file (I have
modified nothing else)



2-

Then, from A:

CREATE KEYSPACE   my_keyspace WITH REPLICATION = {‘class’:’Simple Strategy,
‘replication_factor’:2}

CREATE TABLE my_table  (text varchar PRIMARY KEY);

USE my_keyspace;

INSERT INTO my_table (text)VALUES('text1');



Please, I try to understand the architecture of Cassandra and what happen
exactly in this case:

As I understand:

*Step 1:* Create the ring

1)      The seed node A bootstrap gossip protocol and wait listening other
clients (B, C, D)

2)      The other node joins (contacts) seed node and run gossip process
(to exchange information across the cluster every second)

*Question 1:* at that moment (at this step) the seed node store some
details about clients? It broadcasts details to other clients?

Each node exchanges information across the cluster every second ?



*Step 2:* Creating the key space and Storing rows (replication factor =2)



Thank you so much for help.

Best Reagrds.

Re: Understanding Cassandra Architecture

Posted by Patrick McFadin <pm...@gmail.com>.
Thouraya,

Assuming that you have started all 4 nodes in step 1, then your cluster is
setup and running. Gossip just relays state about the cluster members, not
much else.

The seed node isn't special in any way, it's just the node you have
designated the other nodes to contact if they need to get cluster
information. Keep in mind, there are no master nodes or leaders. This is
peer-to-peer so each node should have a complete picture of the cluster
stored in the system keyspace after joining the cluster.

One other thing. You will want to

USE my_keyspace;

Before

CREATE TABLE my_table  (text varchar PRIMARY KEY);

In your question, the clients will ask the node they connect to for cluster
information, but client state is not stored in Cassanda.

Patrick



On Tue, Aug 4, 2015 at 7:09 AM, Thouraya TH <th...@gmail.com> wrote:

> Hi all,
>
>
>
>
>
> 1-  I have 4 nodes A, B, C, and D (A is the seed node). I have modified
> seed node address and listen address of each Cassandra.yaml file (I have
> modified nothing else)
>
>
>
> 2-
>
> Then, from A:
>
> CREATE KEYSPACE   my_keyspace WITH REPLICATION = {‘class’:’Simple
> Strategy, ‘replication_factor’:2}
>
> CREATE TABLE my_table  (text varchar PRIMARY KEY);
>
> USE my_keyspace;
>
> INSERT INTO my_table (text)VALUES('text1');
>
>
>
> Please, I try to understand the architecture of Cassandra and what happen
> exactly in this case:
>
> As I understand:
>
> *Step 1:* Create the ring
>
> 1)      The seed node A bootstrap gossip protocol and wait listening
> other clients (B, C, D)
>
> 2)      The other node joins (contacts) seed node and run gossip process
> (to exchange information across the cluster every second)
>
> *Question 1:* at that moment (at this step) the seed node store some
> details about clients? It broadcasts details to other clients?
>
> Each node exchanges information across the cluster every second ?
>
>
>
> *Step 2:* Creating the key space and Storing rows (replication factor =2)
>
>
>
> Thank you so much for help.
>
> Best Reagrds.
>