Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Oslo Cassandra Users
Data consistency workshop
Agenda:
- Eat
- Install
- Learn
- Experiment

(courtesy of xkcd.com)

alexe...
Install

set $JAVA_HOME and $PATH
adjust machine time: no.pool.ntp.org
http://cassandra.apache.org – download and unpack f...
Learn

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

Goto https://github.com/bakaleks/nappyshopper-> release ->
nappyshopper-1.0.jar
$java -jar nappysh...
NappyShoper: data model

cart created time
keyspace

column
family

username

cart number

[default@meetup2_rf3] get shopp...
NappyShopper: GUI
Experiment 1. No replication

●

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

●

Fill with Libero, checkou...
Experiment 2. Replication. Eventual consistency

●

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

●

Fill w...
Experiment 3. Strong consistency. One node down

●

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

●

...
Experiment 4. Strong consistency. Two nodes down

●

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

●
...
Experiment 5. Datacenter setup. Datacenter down

●

Choose keyspace with RF=3(DC1),RF=3(DC2). Set Read to
LOCAL_QUORUM and...
Experiment 6. Datacenter setup. Datacenters partitioning

●

●

●

Choose keyspace with RF=3(DC1),RF=3(DC2). Set Read to
L...
Final notes

●

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

●
...
Prochain SlideShare
Chargement dans…5
×

Data Consistency Workshop — Oslo Cassandra Users Oct 8, 2013

902 vues

Publié le

The Oslo Cassandra Users explored what is difficult to experience on a single-node Cassandra cluster, namely data consistency issues. That's why they got together to form a cluster of Cassandra nodes.

Publié dans : Technologie, Formation
  • If you are looking for customer-oriented academic and research paper writing service try ⇒⇒⇒ WRITE-MY-PAPER.net ⇐⇐⇐ liked them A LOTTT Really nice solutions for the last-day papers
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Data Consistency Workshop — Oslo Cassandra Users Oct 8, 2013

  1. 1. Oslo Cassandra Users Data consistency workshop Agenda: - Eat - Install - Learn - Experiment (courtesy of xkcd.com) alexei.bakanov@finn.no
  2. 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. 3. Learn DataStax Cassandra Tutorials - Understanding data consistency in Cassandra http://www.youtube.com/watch?v=hKLKpqY9UrY
  4. 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. 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
  6. 6. NappyShopper: GUI
  7. 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. 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. 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. 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. 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. 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. 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

×