SlideShare a Scribd company logo
1 of 13
Download to read offline
Oslo Cassandra Users
Data consistency workshop
Agenda:
- Eat
- Install
- Learn
- Experiment

(courtesy of xkcd.com)

alexei.bakanov@finn.no
Install

set $JAVA_HOME and $PATH
adjust machine time: no.pool.ntp.org
http://cassandra.apache.org – download and unpack f.ex. to /home/user/cassandra
conf/cassandra.yaml:
data_file_directories:
- /home/user/cassandra/data/data
commitlog_directory: /home/user/cassandra/data/commitlog
saved_caches_directory: /home/user/cassandra/data/saved_caches
seeds: "192.168.239.1"
listen_address: 192.168.239.x
rpc_address: 0.0.0.0
endpoint_snitch: GossipingPropertyFileSnitch
conf/cassandra-rackdc.properties:
dc=DCx
Run bin/cassandra
Learn

DataStax Cassandra Tutorials - Understanding data
consistency in Cassandra
http://www.youtube.com/watch?v=hKLKpqY9UrY
NappyShopper: Download

Goto https://github.com/bakaleks/nappyshopper-> release ->
nappyshopper-1.0.jar
$java -jar nappyshopper-1.0.jar
or
Double-click nappyshopper-1.0.jar if you are in Windows
NappyShoper: data model

cart created time
keyspace

column
family

username

cart number

[default@meetup2_rf3] get shoppingcarts['user66021:1381150822598:2'];
=> (name=Libero, value=60 kroner, timestamp=1381150825320000)
=> (name=Pampers, value=70 kroner, timestamp=1381150825973000)
columns
NappyShopper: GUI
Experiment 1. No replication

●

Choose keyspace with RF=1. Set Read to ONE and Write to ONE

●

Fill with Libero, checkout.

●

Unplug one node, checkout

●

Create new shoppingcarts

●

Set Write to ANY and fill with Libero. Checkout

●

Plug the node back and checkout
NB!:
–

CL.ANY – data stored just as Hinted Handoffs (couple of hours TTL)
Experiment 2. Replication. Eventual consistency

●

Choose keyspace with RF=2. Set Read to ONE and Write to ONE

●

Fill with Libero. Disconnect one node. Checkout

●

Fill with Pampers. Checkout

●

Disconnect one more node. Connect first node back. Checkout

●

Connect second node back. Checkout
Experiment 3. Strong consistency. One node down

●

Choose keyspace with RF=3. Set Read to QUORUM and Write to
QUORUM

●

Fill with Libero. Disconnect one node. Checkout

●

Fill with Pampers. Checkout

●

Disconnect one more node. Connect first node back. Checkout.

●

Disconnect first node, such that we have 2 nodes down. Checkout.
Experiment 4. Strong consistency. Two nodes down

●

Choose keyspace with RF=5. Set Read to QUORUM and Write to
QUORUM

●

Fill with Libero. Disconnect two nodes. Checkout

●

Fill with Pampers. Checkout

●

Disconnect two other nodes. Connect first two nodes node back.
Checkout.
Experiment 5. Datacenter setup. Datacenter down

●

Choose keyspace with RF=3(DC1),RF=3(DC2). Set Read to
LOCAL_QUORUM and Write to LOCAL_QUORUM

●

Fill with Libero. Disconnect one datacenter. Checkout

●

Fill with Pampers. Checkout

●

Disconnect one node. Checkout

●

Reconnect datacenters.
Experiment 6. Datacenter setup. Datacenters partitioning

●

●

●

Choose keyspace with RF=3(DC1),RF=3(DC2). Set Read to
LOCAL_QUORUM and Write to EACH_QUORUM
Fill with Libero. Disconnect one datacenter.
Checkout with the same username from a machine in another
datacenter
Final notes

●

C* Summit 2013: Eventual Consistency != Hopeful Consistency
http://www.youtube.com/watch?v=A6qzx_HE3EU

●

Datastax Java Driver 1.0.4 & 2.0.0-beta2 fails QUORUM operations
when nodes are coming back up after physical network failure
https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-d
river-user/zo3yGrKbpWg

●

Astyanax 1.56.43 supports CQL3, but consistency is always ONE

More Related Content

What's hot

Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica set
Sudheer Kondla
 
In-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several timesIn-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several times
Aleksander Alekseev
 
The Magic of Hot Streaming Replication, Bruce Momjian
The Magic of Hot Streaming Replication, Bruce MomjianThe Magic of Hot Streaming Replication, Bruce Momjian
The Magic of Hot Streaming Replication, Bruce Momjian
Fuenteovejuna
 

What's hot (20)

Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
HBaseCon 2013: OpenTSDB at Box
HBaseCon 2013: OpenTSDB at BoxHBaseCon 2013: OpenTSDB at Box
HBaseCon 2013: OpenTSDB at Box
 
Troubleshooting PostgreSQL with pgCenter
Troubleshooting PostgreSQL with pgCenterTroubleshooting PostgreSQL with pgCenter
Troubleshooting PostgreSQL with pgCenter
 
Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica set
 
Installation of application server 10g in red hat 4
Installation of application server 10g in red hat 4Installation of application server 10g in red hat 4
Installation of application server 10g in red hat 4
 
XtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithmsXtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithms
 
Monitoring MySQL with OpenTSDB
Monitoring MySQL with OpenTSDBMonitoring MySQL with OpenTSDB
Monitoring MySQL with OpenTSDB
 
opentsdb in a real enviroment
opentsdb in a real enviromentopentsdb in a real enviroment
opentsdb in a real enviroment
 
Go Replicator
Go ReplicatorGo Replicator
Go Replicator
 
Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with Gluster
 
Tinydns and dnscache
Tinydns and dnscacheTinydns and dnscache
Tinydns and dnscache
 
Full Text Search in PostgreSQL
Full Text Search in PostgreSQLFull Text Search in PostgreSQL
Full Text Search in PostgreSQL
 
PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challenges
 
Cassandra
CassandraCassandra
Cassandra
 
In-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several timesIn-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several times
 
The Magic of Hot Streaming Replication, Bruce Momjian
The Magic of Hot Streaming Replication, Bruce MomjianThe Magic of Hot Streaming Replication, Bruce Momjian
The Magic of Hot Streaming Replication, Bruce Momjian
 
Linux-Fu for PHP Developers
Linux-Fu for PHP DevelopersLinux-Fu for PHP Developers
Linux-Fu for PHP Developers
 
Curcumin job file
Curcumin job fileCurcumin job file
Curcumin job file
 

Viewers also liked

οι πρωτες μας λεξουλες!
οι πρωτες μας λεξουλες!οι πρωτες μας λεξουλες!
οι πρωτες μας λεξουλες!
elinalda
 
Texto cientifico
Texto cientifico Texto cientifico
Texto cientifico
kbravoc
 
DE LA COMUNICACION MODULO 1
DE LA COMUNICACION MODULO 1DE LA COMUNICACION MODULO 1
DE LA COMUNICACION MODULO 1
Ricardo Molina
 
Sostenibilidad en las islas del mediterraneo antonini final
Sostenibilidad en las islas del mediterraneo antonini finalSostenibilidad en las islas del mediterraneo antonini final
Sostenibilidad en las islas del mediterraneo antonini final
Alessandra Antonini
 
Употреба на бустер вентилатори во подземни рудници
Употреба на бустер вентилатори во подземни руднициУпотреба на бустер вентилатори во подземни рудници
Употреба на бустер вентилатори во подземни рудници
Gjorgi Vezenkovski
 

Viewers also liked (20)

Renacer
RenacerRenacer
Renacer
 
Metodo de Entrenamiento
Metodo de EntrenamientoMetodo de Entrenamiento
Metodo de Entrenamiento
 
Perchè usare a gesic
Perchè usare a gesic Perchè usare a gesic
Perchè usare a gesic
 
οι πρωτες μας λεξουλες!
οι πρωτες μας λεξουλες!οι πρωτες μας λεξουλες!
οι πρωτες μας λεξουλες!
 
Aspectos fundamentales
Aspectos fundamentalesAspectos fundamentales
Aspectos fundamentales
 
Texto cientifico
Texto cientifico Texto cientifico
Texto cientifico
 
In The Spotlight Marketing Website Audits PowerPoint
In The Spotlight Marketing Website Audits PowerPointIn The Spotlight Marketing Website Audits PowerPoint
In The Spotlight Marketing Website Audits PowerPoint
 
Ejercicio 8
Ejercicio 8Ejercicio 8
Ejercicio 8
 
DE LA COMUNICACION MODULO 1
DE LA COMUNICACION MODULO 1DE LA COMUNICACION MODULO 1
DE LA COMUNICACION MODULO 1
 
Prosa didáctica
Prosa didácticaProsa didáctica
Prosa didáctica
 
Ejercicio 8 acabadoooooooo
Ejercicio 8 acabadooooooooEjercicio 8 acabadoooooooo
Ejercicio 8 acabadoooooooo
 
seminario 1
seminario 1seminario 1
seminario 1
 
Adopta
AdoptaAdopta
Adopta
 
My favourite Monster
My favourite MonsterMy favourite Monster
My favourite Monster
 
Algoritmo del avion.
Algoritmo del avion.Algoritmo del avion.
Algoritmo del avion.
 
Algoritmo bombilla
Algoritmo bombillaAlgoritmo bombilla
Algoritmo bombilla
 
Sostenibilidad en las islas del mediterraneo antonini final
Sostenibilidad en las islas del mediterraneo antonini finalSostenibilidad en las islas del mediterraneo antonini final
Sostenibilidad en las islas del mediterraneo antonini final
 
Jupiter atmosphere and magnetosphere exploration satellite
Jupiter atmosphere and magnetosphere exploration satelliteJupiter atmosphere and magnetosphere exploration satellite
Jupiter atmosphere and magnetosphere exploration satellite
 
Употреба на бустер вентилатори во подземни рудници
Употреба на бустер вентилатори во подземни руднициУпотреба на бустер вентилатори во подземни рудници
Употреба на бустер вентилатори во подземни рудници
 
About Oneself+Parts of body1+ป.2+121+dltvengp2+54en p02 f26-4page
About Oneself+Parts of body1+ป.2+121+dltvengp2+54en p02 f26-4pageAbout Oneself+Parts of body1+ป.2+121+dltvengp2+54en p02 f26-4page
About Oneself+Parts of body1+ป.2+121+dltvengp2+54en p02 f26-4page
 

Similar to Data Consistency Workshop — Oslo Cassandra Users Oct 8, 2013

Scaling Cassandra for Big Data
Scaling Cassandra for Big DataScaling Cassandra for Big Data
Scaling Cassandra for Big Data
DataStax Academy
 

Similar to Data Consistency Workshop — Oslo Cassandra Users Oct 8, 2013 (20)

Percona XtraDB 集群安装与配置
Percona XtraDB 集群安装与配置Percona XtraDB 集群安装与配置
Percona XtraDB 集群安装与配置
 
Building Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scaleBuilding Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scale
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档
 
The Apache Cassandra ecosystem
The Apache Cassandra ecosystemThe Apache Cassandra ecosystem
The Apache Cassandra ecosystem
 
Apache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek BerlinApache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek Berlin
 
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
 
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
 
Scaling Cassandra for Big Data
Scaling Cassandra for Big DataScaling Cassandra for Big Data
Scaling Cassandra for Big Data
 
An introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methodsAn introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methods
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Lec7
Lec7Lec7
Lec7
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
 
10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production
 
Scaling Up Logging and Metrics
Scaling Up Logging and MetricsScaling Up Logging and Metrics
Scaling Up Logging and Metrics
 
Troubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issuesTroubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issues
 
MySQL Galera 集群
MySQL Galera 集群MySQL Galera 集群
MySQL Galera 集群
 
Cassandra - A decentralized storage system
Cassandra - A decentralized storage systemCassandra - A decentralized storage system
Cassandra - A decentralized storage system
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
 

More from DataStax Academy

Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
DataStax Academy
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
DataStax Academy
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 

More from DataStax Academy (20)

Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftForrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraIntroduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
 
Cassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingCassandra 3.0 Data Modeling
Cassandra 3.0 Data Modeling
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
 
Data Modeling for Apache Cassandra
Data Modeling for Apache CassandraData Modeling for Apache Cassandra
Data Modeling for Apache Cassandra
 
Coursera Cassandra Driver
Coursera Cassandra DriverCoursera Cassandra Driver
Coursera Cassandra Driver
 
Production Ready Cassandra
Production Ready CassandraProduction Ready Cassandra
Production Ready Cassandra
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
 
Bad Habits Die Hard
Bad Habits Die Hard Bad Habits Die Hard
Bad Habits Die Hard
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
 
Advanced Cassandra
Advanced CassandraAdvanced Cassandra
Advanced Cassandra
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
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
 

Data Consistency Workshop — Oslo Cassandra Users Oct 8, 2013

  • 1. Oslo Cassandra Users Data consistency workshop Agenda: - Eat - Install - Learn - Experiment (courtesy of xkcd.com) alexei.bakanov@finn.no
  • 2. Install set $JAVA_HOME and $PATH adjust machine time: no.pool.ntp.org http://cassandra.apache.org – download and unpack f.ex. to /home/user/cassandra conf/cassandra.yaml: data_file_directories: - /home/user/cassandra/data/data commitlog_directory: /home/user/cassandra/data/commitlog saved_caches_directory: /home/user/cassandra/data/saved_caches seeds: "192.168.239.1" listen_address: 192.168.239.x rpc_address: 0.0.0.0 endpoint_snitch: GossipingPropertyFileSnitch conf/cassandra-rackdc.properties: dc=DCx Run bin/cassandra
  • 3. Learn DataStax Cassandra Tutorials - Understanding data consistency in Cassandra http://www.youtube.com/watch?v=hKLKpqY9UrY
  • 4. NappyShopper: Download Goto https://github.com/bakaleks/nappyshopper-> release -> nappyshopper-1.0.jar $java -jar nappyshopper-1.0.jar or Double-click nappyshopper-1.0.jar if you are in Windows
  • 5. NappyShoper: data model cart created time keyspace column family username cart number [default@meetup2_rf3] get shoppingcarts['user66021:1381150822598:2']; => (name=Libero, value=60 kroner, timestamp=1381150825320000) => (name=Pampers, value=70 kroner, timestamp=1381150825973000) columns
  • 7. Experiment 1. No replication ● Choose keyspace with RF=1. Set Read to ONE and Write to ONE ● Fill with Libero, checkout. ● Unplug one node, checkout ● Create new shoppingcarts ● Set Write to ANY and fill with Libero. Checkout ● Plug the node back and checkout NB!: – CL.ANY – data stored just as Hinted Handoffs (couple of hours TTL)
  • 8. Experiment 2. Replication. Eventual consistency ● Choose keyspace with RF=2. Set Read to ONE and Write to ONE ● Fill with Libero. Disconnect one node. Checkout ● Fill with Pampers. Checkout ● Disconnect one more node. Connect first node back. Checkout ● Connect second node back. Checkout
  • 9. Experiment 3. Strong consistency. One node down ● Choose keyspace with RF=3. Set Read to QUORUM and Write to QUORUM ● Fill with Libero. Disconnect one node. Checkout ● Fill with Pampers. Checkout ● Disconnect one more node. Connect first node back. Checkout. ● Disconnect first node, such that we have 2 nodes down. Checkout.
  • 10. Experiment 4. Strong consistency. Two nodes down ● Choose keyspace with RF=5. Set Read to QUORUM and Write to QUORUM ● Fill with Libero. Disconnect two nodes. Checkout ● Fill with Pampers. Checkout ● Disconnect two other nodes. Connect first two nodes node back. Checkout.
  • 11. Experiment 5. Datacenter setup. Datacenter down ● Choose keyspace with RF=3(DC1),RF=3(DC2). Set Read to LOCAL_QUORUM and Write to LOCAL_QUORUM ● Fill with Libero. Disconnect one datacenter. Checkout ● Fill with Pampers. Checkout ● Disconnect one node. Checkout ● Reconnect datacenters.
  • 12. Experiment 6. Datacenter setup. Datacenters partitioning ● ● ● Choose keyspace with RF=3(DC1),RF=3(DC2). Set Read to LOCAL_QUORUM and Write to EACH_QUORUM Fill with Libero. Disconnect one datacenter. Checkout with the same username from a machine in another datacenter
  • 13. Final notes ● C* Summit 2013: Eventual Consistency != Hopeful Consistency http://www.youtube.com/watch?v=A6qzx_HE3EU ● Datastax Java Driver 1.0.4 & 2.0.0-beta2 fails QUORUM operations when nodes are coming back up after physical network failure https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-d river-user/zo3yGrKbpWg ● Astyanax 1.56.43 supports CQL3, but consistency is always ONE