Tech-Today
Apache Cassandra Clustering
This tutorial will help us configure an Apache Cassandra's ring with 2 nodes. It will not explain what Cassandra is, use Google for that.
There are actually not too many properties that we must update in order to set up the cluster. Note that in this particular example, we will be configuring 2 nodes: 1 seed and 1 client.
Configuration
The Seed
"The seed node designation has no purpose other than bootstrapping the gossip process for new nodes joining the cluster. Seed nodes are not a single point of failure, nor do they have any other special purpose in cluster operations beyond the bootstrapping of nodes."
Open and edit CASSANDRA_HOME/conf/cassandra.yaml
- rpc_address - set to the IP address of the node
- seed_provider / parameters / seeds - set to the ip address of the node
- listen_address - set to the IP address of the node
Client Node
"All nodes in Cassandra are peers. A client read or write request can go to any node in the cluster. When a client connects to a node and issues a read or write request, that node serves as the coordinator for that particular client operation.
The job of the coordinator is to act as a proxy between the client application and the nodes (or replicas) that own the data being requested. The coordinator determines which nodes in the ring should get the request based on the cluster configured partitioner and replica placement strategy."
Open and edit CASSANDRA_HOME/conf/cassandra.yaml
- rpc_address - set to the IP address of the node
- seed_provider / parameters/seeds - set to the IP address of the seed node
- listen_address - set to the IP address of the node
As you can see the only difference is the value of the seeds.
Now start the Cassandra instance on the seed node, followed by the client node. You should get the following log in the seed machine:
INFO [HANDSHAKE-/192.168.0.44] 2018-08-02 10:53:24,412 OutboundTcpConnection.java:560 - Handshaking version with /192.168.0.44
INFO [GossipStage:1] 2018-08-02 10:53:25,421 Gossiper.java:1053 - Node /192.168.0.44 has restarted, now UP
INFO [GossipStage:1] 2018-08-02 10:53:25,431 StorageService.java:2292 - Node /192.168.0.44 state jump to NORMAL
INFO [GossipStage:1] 2018-08-02 10:53:25,441 TokenMetadata.java:479 - Updating topology for /192.168.0.44
INFO [GossipStage:1] 2018-08-02 10:53:25,442 TokenMetadata.java:479 - Updating topology for /192.168.0.44
INFO [HANDSHAKE-/192.168.0.44] 2018-08-02 10:53:25,472 OutboundTcpConnection.java:560 - Handshaking version with /192.168.0.44
INFO [RequestResponseStage-1] 2018-08-02 10:53:26,216 Gossiper.java:1019 - InetAddress /192.168.0.44 is now UP
WARN [GossipTasks:1] 2018-08-02 10:53:26,414 FailureDetector.java:288 - Not marking nodes down due to local pause of 79566127100 > 5000000000
Can you guess which
IP is the seed?
Node:
- You may want to disable your firewall temporarily to make testing easier
- Youtube video is available at https://youtu.be/m-jByEocJfg
References
- https://docs.datastax.com/en/index.html
- http://www.datastax.com/docs/1.0/cluster_architecture/about_client_requests
-
How To Create A Wildfly Cluster
The following steps will help us configure a Wildfly cluster. *Note that I'm using Wildfly 11 *It took me some time to figure it out so I'm writing it here for reference. I'm using the standard-full-ha.xml profileIn the program arguments add -b...
-
Docker Swarm Commands
This tutorial requires connection to the internet as swarm creation and management needs Docker Hub. Requirements WindowsDocker CEVirtualBox*Needless to say, a docker for windows must be running. docker run swarm create --Download the swarm image locally....
-
Angular-cli, Node, Npm Most Used Commands
Below is a summary of the most used commands, specially when starting up or debugging an angular project tested on node server. Note that to execute the commands below, you need to install node first. // check node and npm versions node --version npm...
-
How To Configure Wildfly 8 Clustering And Deploying Picketlink Enabled War Application To Test The Session.
In this tutorial we will try to configure wildfly cluster and test it by deploying a picketlink enabled war application where a user can login and the session shared between the virtual server. Before we start, make sure that you read these links: https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto...
-
Create A New Eclipse-rcp Preference Page By Code When A Listener Is Invoked
Objective: -To create an eclipse-rcp preference page without using the preference extension, all is done in code. This is done by creating a customized button with a SelectionListener, and eventually that action will call a customized preference page....
Tech-Today