Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jepsen: Mon cluster est-il cohérent ?

Jepsen: Mon cluster est-il cohérent ?

A short introduction to jepsen, a distributed databases testing tool by @aphyr

Arnaud Bailly

June 10, 2014
Tweet

More Decks by Arnaud Bailly

Other Decks in Programming

Transcript

  1. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Jepsen: Testing Cluster Consistency Arnaud Bailly <[email protected]> @abailly http://blog.foldlabs.com/ 2014-06
  2. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Jepsen? ▶ A tool for testing that distributed databases respect some consistency model in face of network partitions
  3. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Jepsen? ▶ A tool for testing that distributed databases respect some consistency model in face of network partitions ▶ A set of primitives to define and run such tests
  4. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Jepsen? ▶ A tool for testing that distributed databases respect some consistency model in face of network partitions ▶ A set of primitives to define and run such tests ▶ A Domain Specific Language for test and network partitions generators (aka. nemesis)
  5. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Jepsen? ▶ A tool for testing that distributed databases respect some consistency model in face of network partitions ▶ A set of primitives to define and run such tests ▶ A Domain Specific Language for test and network partitions generators (aka. nemesis) ▶ Model checkers, includingLinearizability Checker (aka. Knossos) for asserting correctness of test runs
  6. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Jepsen? ▶ A tool for testing that distributed databases respect some consistency model in face of network partitions ▶ A set of primitives to define and run such tests ▶ A Domain Specific Language for test and network partitions generators (aka. nemesis) ▶ Model checkers, includingLinearizability Checker (aka. Knossos) for asserting correctness of test runs ▶ With specific tests for RabbitMQ, etcd, ElasticSearch, DAtomic, Riak
  7. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Jepsen? ▶ A tool for testing that distributed databases respect some consistency model in face of network partitions ▶ A set of primitives to define and run such tests ▶ A Domain Specific Language for test and network partitions generators (aka. nemesis) ▶ Model checkers, includingLinearizability Checker (aka. Knossos) for asserting correctness of test runs ▶ With specific tests for RabbitMQ, etcd, ElasticSearch, DAtomic, Riak ▶ Written by @aphyr (aka. Kyle Kingsbury) of Call Me Maybe fame
  8. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Tools Figure : The NoSQL Database Zoo
  9. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees
  10. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees ▶ Locks & Mutexes
  11. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees ▶ Locks & Mutexes ▶ Configuration
  12. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees ▶ Locks & Mutexes ▶ Configuration ▶ Service Discovery
  13. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees ▶ Locks & Mutexes ▶ Configuration ▶ Service Discovery ▶ Distributed Consensus
  14. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees ▶ Locks & Mutexes ▶ Configuration ▶ Service Discovery ▶ Distributed Consensus ▶ Sessions Synchronization
  15. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Why I Should Care - Usage ▶ Message Queues w/ different delivery guarantees ▶ Locks & Mutexes ▶ Configuration ▶ Service Discovery ▶ Distributed Consensus ▶ Sessions Synchronization ▶ …
  16. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Mapping the CAP Landscape Figure : CAP as A Metric Space
  17. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Mapping the CAP Landscape Figure : Consistency and Partition Tolerance
  18. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Partitioning?
  19. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Partitioning?
  20. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Partitioning?
  21. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency
  22. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency ▶ Eventual Consistency
  23. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency ▶ Eventual Consistency ▶ Causal Consistency
  24. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency ▶ Eventual Consistency ▶ Causal Consistency ▶ Read-Your-Writes Consistency
  25. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency ▶ Eventual Consistency ▶ Causal Consistency ▶ Read-Your-Writes Consistency ▶ Sequential Consistency
  26. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency ▶ Eventual Consistency ▶ Causal Consistency ▶ Read-Your-Writes Consistency ▶ Sequential Consistency ▶ Linearizability
  27. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . What is Consistency? ▶ Quiescent Consistency ▶ Eventual Consistency ▶ Causal Consistency ▶ Read-Your-Writes Consistency ▶ Sequential Consistency ▶ Linearizability ▶ …
  28. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Sequential Consistency
  29. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Linearizability
  30. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Demo
  31. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Questions?
  32. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Links ▶ jepsen proper
  33. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Links ▶ jepsen proper ▶ Knossos the linearizability checker
  34. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Links ▶ jepsen proper ▶ Knossos the linearizability checker ▶ Kyle Kingsbury’s blog and the famous Call Me Maybe posts that introduced Jepsen
  35. . . . .. . . . .. . .

    . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . .. . . . .. . . . . .. . . . .. . . . . .. . . . .. . . . .. . Links ▶ jepsen proper ▶ Knossos the linearizability checker ▶ Kyle Kingsbury’s blog and the famous Call Me Maybe posts that introduced Jepsen ▶ ETH Zurich Distributed Systems Course