SlideShare une entreprise Scribd logo
1  sur  28
Meetup Cassandra
Lan Party
Sommaire
● Rappels
● Installation réseau et logiciels
● Configuration du cluster
● Tests
Who’s who
● Gérald Quintana
o @gerald_quintana
o gerald.quintana@zenika.com
o Formateur Cassandra
Rappels
Key Features
Elastic scalability
Always on
architecture
Fast linear-scale
performance
Flexible data storage
Easy data
distribution
Operational
simplicity
Transaction support
Cluster
● Noeuds
o 1 seul type
o 1 IP
● Configuration
o cassandra.yaml
o cassandra-env.sh
o log4j.properties
● Données
o CommitLog
o Data
o Saved caches
o Log
Column oriented data model
Keyspace Table
(ColumnFamily)
Row:
Row key
Column:
Clustering key
Value
TTL
Map<PartKey, SortedMap<ClustKey, Column>>
Username Timestamp Message Status
gquintana 2015-01-15 Meetup Speaking
jdoe 2015-01-15 Meetup
jdoe 2015-01-16 Holidays
Partition
Row Key
Primary Key
Partition & Consistent hashing
● Hash(Row Key) → Token
● Noeud → Plage de tokens
Replication
Virtual nodes
Multi datacenters
● Physiques
o Distribution géographique
o Failover
● Logiques
o Live backup
o Analytique (OLAP)
● Sans ETL
● Replication factor
Réplication: Combien?
● Niveau keyspace
create keyspace meetup
with replication={
'class':'NetworkTopologyStrategy',
'lyon':2,'paris':2};
Réplication: Où?
● Niveau node:
o SimpleSnitch
o RackInferringSnitch
 + IP 10.dc.rc.n
o PropertyFileSnitch
 + cassandra-topology.properties
o GossipingPropertyFileSnitch
 + cassandra-rackdc.properties
o EC2Snitch, GoogleCloudSnitch, CloudstackSnitch
Notre cluster
Lyon
10.1.rc.n
Paris
10.2.rc.n
OpsCenter
10.1.0.1
Au boulot!
Etape 1 Copier/Télécharger
● Java 7
● Python 2.6+
o https://www.python.org/downloads/release/python-
279/ (ou bien paquets apt-get, yum)
● Cassandra 2.0 DSC (DataStax Community)
o http://planetcassandra.org/cassandra/
o http://downloads.datastax.com/community/dsc-
cassandra-2.0.11-bin.tar.gz
● DataStax OpsCenter Agent
o http://downloads.datastax.com/community/datastax-
agent-5.0.2.tar.gz
● Injecteur
Etape 2 Configurer le réseau
● Désactiver le Wifi & le firewall
● Configurer l’IP de manière statique
o IP 10.dc.rc.n
o Masque 255.0.0.0
● Pinguer & se faire pinguer
Etape 3 Installer
● Java: JAVA_HOME, java -version
● Python: python --version
● Cassandra
o Si besoin, supprimer les data
● OpsCenter Agent
● Synchroniser les horloges
Ne pas démarrer
Cassandra
Etape 4a Configurer Cassandra
● cassandra.yaml
o cluster_name: 'meetup'
o listen_address: 10.dc.rc.n
o rpc_address: 0.0.0.0
o seed_provider.parameters.seeds:
10.1.1.1, 10.1.1.2, 10.2.1.1
o endpoint_snitch: GossipingPropertyFileSnitch
o commitlog_directory, data_file_directories,
saved_caches_directory
Ne pas démarrer
Cassandra
Etape 4b Configurer Cassandra
● cassandra-rackdc.properties
o dc=lyon|paris, rack=RAC1
● log4-server.properties
o ...File=log/system.log
● Vérifier la configuration du voisin
Ne pas démarrer
Cassandra
Etape 5 Configurer DataStax Agent
● datastax-agent.bat
o set JAR=datastax-agent-5.0.2-standalone.jar
● address.yaml
o stomp_interface: '10.1.0.1'
o local_interface: '10.dc.rc.n'
Etape 6 Démarrer Cassandra
● Attendre le Go
● Démarrer Cassandra puis l’Agent
● Surveiller les logs
● Surveiller l’état
o du noeud nodetool info
o du cluster nodetool status
o des tokens nodetool ring
● Surveiller OpsCenter
Etape 7 Initialiser le schéma
create keyspace meetup
with replication={
'class':'NetworkTopologyStrategy',
'lyon':2,'paris':2};
create table metric (
host varchar,
name varchar,
date timestamp,
value bigint,
primary key ((host,name),date)
);
Etape 7 Insérer des données
● Avec cqlsh
● Démarrer l’injecteur
describe keyspaces;
describe keyspace meetup;
use meetup;
describe tables;
describe table metric;
select * from metric;
insert into metric(host,name,date,value)
values ('localhost','cpu',dateOf(now()), 12);
Scénario 1 Perte d’un noeud
● Hinted handoff
● Surveiller
o notetool status
o OpsCenter
o cqlsh
 select * from system.hints
Scénario 2 Ajout d’un noeud
● Streaming
● Surveiller
o Cluster: nodetool status
o Streaming: nodetool netstats
o OpsCenter
Scénario 3 Perte d’un datacenter
● Surveiller
o notetool status
o OpsCenter
Conclusion
● Les vertues de Cassandra
o Tolérance aux pannes
o Scalabilité linéaire
o Configuration Simple
● Reset configuration réseau
o Configuration IP
o Réactiver firewall

Contenu connexe

Tendances

Work Stealing For Fun & Profit: Jim Nelson
Work Stealing For Fun & Profit: Jim NelsonWork Stealing For Fun & Profit: Jim Nelson
Work Stealing For Fun & Profit: Jim Nelson
Redis Labs
 

Tendances (20)

Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
 
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, KibanaLogging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
 
OpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoOpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ Criteo
 
Simon
SimonSimon
Simon
 
ELK stack at weibo.com
ELK stack at weibo.comELK stack at weibo.com
ELK stack at weibo.com
 
Dnsdist
DnsdistDnsdist
Dnsdist
 
BlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year InBlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year In
 
XSKY - ceph luminous update
XSKY - ceph luminous updateXSKY - ceph luminous update
XSKY - ceph luminous update
 
Drupal MySQL Cluster
Drupal MySQL ClusterDrupal MySQL Cluster
Drupal MySQL Cluster
 
MySQL Parallel Replication (LOGICAL_CLOCK): all the 5.7 (and some of the 8.0)...
MySQL Parallel Replication (LOGICAL_CLOCK): all the 5.7 (and some of the 8.0)...MySQL Parallel Replication (LOGICAL_CLOCK): all the 5.7 (and some of the 8.0)...
MySQL Parallel Replication (LOGICAL_CLOCK): all the 5.7 (and some of the 8.0)...
 
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
 
Distributed Storage and Compute With Ceph's librados (Vault 2015)
Distributed Storage and Compute With Ceph's librados (Vault 2015)Distributed Storage and Compute With Ceph's librados (Vault 2015)
Distributed Storage and Compute With Ceph's librados (Vault 2015)
 
Openstack 簡介
Openstack 簡介Openstack 簡介
Openstack 簡介
 
Work Stealing For Fun & Profit: Jim Nelson
Work Stealing For Fun & Profit: Jim NelsonWork Stealing For Fun & Profit: Jim Nelson
Work Stealing For Fun & Profit: Jim Nelson
 
Sharding in MongoDB 4.2 #what_is_new
 Sharding in MongoDB 4.2 #what_is_new Sharding in MongoDB 4.2 #what_is_new
Sharding in MongoDB 4.2 #what_is_new
 
How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best Practices
 
Introduction to apache zoo keeper
Introduction to apache zoo keeper Introduction to apache zoo keeper
Introduction to apache zoo keeper
 
MongoDB - External Authentication
MongoDB - External AuthenticationMongoDB - External Authentication
MongoDB - External Authentication
 
The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202
 

En vedette

Réseau local sous windows 2003 server
Réseau local sous windows 2003 serverRéseau local sous windows 2003 server
Réseau local sous windows 2003 server
Oussama BenGharbi
 
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
DataStax
 

En vedette (20)

DataStax: Backup and Restore in Cassandra and OpsCenter
DataStax: Backup and Restore in Cassandra and OpsCenterDataStax: Backup and Restore in Cassandra and OpsCenter
DataStax: Backup and Restore in Cassandra and OpsCenter
 
Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?
 
Apache Cassandra in the Real World
Apache Cassandra in the Real WorldApache Cassandra in the Real World
Apache Cassandra in the Real World
 
83010 world pre enlightenment 50m
83010 world pre enlightenment 50m83010 world pre enlightenment 50m
83010 world pre enlightenment 50m
 
Introduction to Cassandra and datastax DSE
Introduction to Cassandra and datastax DSEIntroduction to Cassandra and datastax DSE
Introduction to Cassandra and datastax DSE
 
Internet
InternetInternet
Internet
 
Stellar Phoenix récupération de données
Stellar Phoenix récupération de donnéesStellar Phoenix récupération de données
Stellar Phoenix récupération de données
 
Cassandra Operations at Netflix
Cassandra Operations at NetflixCassandra Operations at Netflix
Cassandra Operations at Netflix
 
Réseau local sous windows 2003 server
Réseau local sous windows 2003 serverRéseau local sous windows 2003 server
Réseau local sous windows 2003 server
 
An Introduction to Priam
An Introduction to PriamAn Introduction to Priam
An Introduction to Priam
 
L'utilisation du Big Data en entreprise
L'utilisation du Big Data en entrepriseL'utilisation du Big Data en entreprise
L'utilisation du Big Data en entreprise
 
Les reseaux
Les reseauxLes reseaux
Les reseaux
 
Analytics et Big Data, une histoire de cubes...
Analytics et Big Data, une histoire de cubes...Analytics et Big Data, une histoire de cubes...
Analytics et Big Data, une histoire de cubes...
 
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
 
Introduction à Cassandra
Introduction à CassandraIntroduction à Cassandra
Introduction à Cassandra
 
Use In IoT : l’objet connecté de la board au dashboard
Use In IoT : l’objet connecté de la board au dashboardUse In IoT : l’objet connecté de la board au dashboard
Use In IoT : l’objet connecté de la board au dashboard
 
How to size up an Apache Cassandra cluster (Training)
How to size up an Apache Cassandra cluster (Training)How to size up an Apache Cassandra cluster (Training)
How to size up an Apache Cassandra cluster (Training)
 
Overview of DataStax OpsCenter
Overview of DataStax OpsCenterOverview of DataStax OpsCenter
Overview of DataStax OpsCenter
 
BI : Analyse des Données avec Mondrian
BI : Analyse des Données avec Mondrian BI : Analyse des Données avec Mondrian
BI : Analyse des Données avec Mondrian
 
Installation et Configuration de Pfsense
Installation et Configuration de PfsenseInstallation et Configuration de Pfsense
Installation et Configuration de Pfsense
 

Similaire à Cassandra Lan party

Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
DataStax
 
20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack
Jeff Yang
 
Integrity and Security in Filesystems
Integrity and Security in FilesystemsIntegrity and Security in Filesystems
Integrity and Security in Filesystems
Conferencias FIST
 

Similaire à Cassandra Lan party (20)

Cassandra Metrics
Cassandra MetricsCassandra Metrics
Cassandra Metrics
 
Cassandra Summit 2014: Monitor Everything!
Cassandra Summit 2014: Monitor Everything!Cassandra Summit 2014: Monitor Everything!
Cassandra Summit 2014: Monitor Everything!
 
Avoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdfAvoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdf
 
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
 
MySQL HA with Pacemaker
MySQL HA with  PacemakerMySQL HA with  Pacemaker
MySQL HA with Pacemaker
 
Monitoring Cassandra with graphite using Yammer Coda-Hale Library
Monitoring Cassandra with graphite using Yammer Coda-Hale LibraryMonitoring Cassandra with graphite using Yammer Coda-Hale Library
Monitoring Cassandra with graphite using Yammer Coda-Hale Library
 
Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.
Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.
Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.
 
Apache Spark II (SparkSQL)
Apache Spark II (SparkSQL)Apache Spark II (SparkSQL)
Apache Spark II (SparkSQL)
 
Taskerman: A Distributed Cluster Task Manager
Taskerman: A Distributed Cluster Task ManagerTaskerman: A Distributed Cluster Task Manager
Taskerman: A Distributed Cluster Task Manager
 
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
 
Linux-HA with Pacemaker
Linux-HA with PacemakerLinux-HA with Pacemaker
Linux-HA with Pacemaker
 
ivanova-samba_backend.pdf
ivanova-samba_backend.pdfivanova-samba_backend.pdf
ivanova-samba_backend.pdf
 
20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack
 
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
 
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut:  Orchestrating  Percona XtraDB Cluster with KubernetesClusternaut:  Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
 
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
How Opera Syncs Tens of Millions of Browsers and Sleeps Well at Night
How Opera Syncs Tens of Millions of Browsers and Sleeps Well at NightHow Opera Syncs Tens of Millions of Browsers and Sleeps Well at Night
How Opera Syncs Tens of Millions of Browsers and Sleeps Well at Night
 
Tips and Tricks for Operating Apache Kafka
Tips and Tricks for Operating Apache KafkaTips and Tricks for Operating Apache Kafka
Tips and Tricks for Operating Apache Kafka
 
Integrity and Security in Filesystems
Integrity and Security in FilesystemsIntegrity and Security in Filesystems
Integrity and Security in Filesystems
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Cassandra Lan party

  • 2. Sommaire ● Rappels ● Installation réseau et logiciels ● Configuration du cluster ● Tests
  • 3. Who’s who ● Gérald Quintana o @gerald_quintana o gerald.quintana@zenika.com o Formateur Cassandra
  • 5. Key Features Elastic scalability Always on architecture Fast linear-scale performance Flexible data storage Easy data distribution Operational simplicity Transaction support
  • 6. Cluster ● Noeuds o 1 seul type o 1 IP ● Configuration o cassandra.yaml o cassandra-env.sh o log4j.properties ● Données o CommitLog o Data o Saved caches o Log
  • 7. Column oriented data model Keyspace Table (ColumnFamily) Row: Row key Column: Clustering key Value TTL Map<PartKey, SortedMap<ClustKey, Column>> Username Timestamp Message Status gquintana 2015-01-15 Meetup Speaking jdoe 2015-01-15 Meetup jdoe 2015-01-16 Holidays Partition Row Key Primary Key
  • 8. Partition & Consistent hashing ● Hash(Row Key) → Token ● Noeud → Plage de tokens
  • 11. Multi datacenters ● Physiques o Distribution géographique o Failover ● Logiques o Live backup o Analytique (OLAP) ● Sans ETL ● Replication factor
  • 12. Réplication: Combien? ● Niveau keyspace create keyspace meetup with replication={ 'class':'NetworkTopologyStrategy', 'lyon':2,'paris':2};
  • 13. Réplication: Où? ● Niveau node: o SimpleSnitch o RackInferringSnitch  + IP 10.dc.rc.n o PropertyFileSnitch  + cassandra-topology.properties o GossipingPropertyFileSnitch  + cassandra-rackdc.properties o EC2Snitch, GoogleCloudSnitch, CloudstackSnitch
  • 16. Etape 1 Copier/Télécharger ● Java 7 ● Python 2.6+ o https://www.python.org/downloads/release/python- 279/ (ou bien paquets apt-get, yum) ● Cassandra 2.0 DSC (DataStax Community) o http://planetcassandra.org/cassandra/ o http://downloads.datastax.com/community/dsc- cassandra-2.0.11-bin.tar.gz ● DataStax OpsCenter Agent o http://downloads.datastax.com/community/datastax- agent-5.0.2.tar.gz ● Injecteur
  • 17. Etape 2 Configurer le réseau ● Désactiver le Wifi & le firewall ● Configurer l’IP de manière statique o IP 10.dc.rc.n o Masque 255.0.0.0 ● Pinguer & se faire pinguer
  • 18. Etape 3 Installer ● Java: JAVA_HOME, java -version ● Python: python --version ● Cassandra o Si besoin, supprimer les data ● OpsCenter Agent ● Synchroniser les horloges Ne pas démarrer Cassandra
  • 19. Etape 4a Configurer Cassandra ● cassandra.yaml o cluster_name: 'meetup' o listen_address: 10.dc.rc.n o rpc_address: 0.0.0.0 o seed_provider.parameters.seeds: 10.1.1.1, 10.1.1.2, 10.2.1.1 o endpoint_snitch: GossipingPropertyFileSnitch o commitlog_directory, data_file_directories, saved_caches_directory Ne pas démarrer Cassandra
  • 20. Etape 4b Configurer Cassandra ● cassandra-rackdc.properties o dc=lyon|paris, rack=RAC1 ● log4-server.properties o ...File=log/system.log ● Vérifier la configuration du voisin Ne pas démarrer Cassandra
  • 21. Etape 5 Configurer DataStax Agent ● datastax-agent.bat o set JAR=datastax-agent-5.0.2-standalone.jar ● address.yaml o stomp_interface: '10.1.0.1' o local_interface: '10.dc.rc.n'
  • 22. Etape 6 Démarrer Cassandra ● Attendre le Go ● Démarrer Cassandra puis l’Agent ● Surveiller les logs ● Surveiller l’état o du noeud nodetool info o du cluster nodetool status o des tokens nodetool ring ● Surveiller OpsCenter
  • 23. Etape 7 Initialiser le schéma create keyspace meetup with replication={ 'class':'NetworkTopologyStrategy', 'lyon':2,'paris':2}; create table metric ( host varchar, name varchar, date timestamp, value bigint, primary key ((host,name),date) );
  • 24. Etape 7 Insérer des données ● Avec cqlsh ● Démarrer l’injecteur describe keyspaces; describe keyspace meetup; use meetup; describe tables; describe table metric; select * from metric; insert into metric(host,name,date,value) values ('localhost','cpu',dateOf(now()), 12);
  • 25. Scénario 1 Perte d’un noeud ● Hinted handoff ● Surveiller o notetool status o OpsCenter o cqlsh  select * from system.hints
  • 26. Scénario 2 Ajout d’un noeud ● Streaming ● Surveiller o Cluster: nodetool status o Streaming: nodetool netstats o OpsCenter
  • 27. Scénario 3 Perte d’un datacenter ● Surveiller o notetool status o OpsCenter
  • 28. Conclusion ● Les vertues de Cassandra o Tolérance aux pannes o Scalabilité linéaire o Configuration Simple ● Reset configuration réseau o Configuration IP o Réactiver firewall

Notes de l'éditeur

  1. Elastic scalability - Allows you to easily add capacity online to accommodate more customers and more data whenever you need. Always on architecture - Contains no single point of failure (as with traditional master/slave RDBMS’s and other NoSQL solutions) resulting in continuous availability for business-critical applications that can’t afford to go down, ever. Fast linear-scale performance - Enables sub-second response times with linear scalability (double your throughput with two nodes, quadruple it with four, and so on) to deliver response time speeds your customers have come to expect. Flexible data storage - Easily accommodates the full range of data formats including: structured, semi-structured and unstructured, that run through today’s modern applications. Also dynamically accommodates changes to your data structures as your data needs evolve. Easy data distribution - Gives you maximum flexibility to distribute data where you need by replicating data across multiple datacenters, the cloud and even mixed cloud/on-premise environments – all of which are becoming extremely common deployment environments. Read and write to any node with all changes being automatically synchronized across a cluster. Operational simplicity - with all nodes in a cluster being the same, there is no complex configuration to manage so administration duties are greatly simplified. Transaction support - Delivers atomicity, isolation and durability of ACID compliance through its use of a commit log to capture all writes and built-in redundancies that ensure data durability in the event of hardware failures, as well as transaction isolation, atomicity, with consistency being tunable.