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

There's no Clusterf*ck without a Cluster

There's no Clusterf*ck without a Cluster

Dan Hopkins

April 19, 2014
Tweet

More Decks by Dan Hopkins

Other Decks in Programming

Transcript

  1. A dictionary says • clus·ter noun \ˈkləs-tər\ a number of

    similar things that occur together (includes pronunciation for legitimacy)
  2. Our definition • Who is currently in the cluster? •

    Tell me when nodes are coming and going • High Availability / scaling
  3. What could go wrong? • Partitions are permanent • Want

    some config? How about six! ◦ failure-detector.threshold x 2 ◦ failure-detector.min-std-deviation x 2 ◦ failure-detector.acceptable-heartbeat-pause x 2 • Hazelcast uses hazelcast.max.no.heartbeat.seconds • ZooKeeper uses “session timeout”
  4. More picking on Akka • Logging during failures is sparse

    • Remoting / Failure detection weren’t bulkheaded
  5. Requirements 2.0 1. Member lists 2. Easy to configure, ability

    to add machines w/o config 3. Pass remoting address around
  6. Implementation akka.remote.quarantine-systems-for = "off" akka.remote.gate-invalid-addresses-for = 0 s src: akka-devel

    • Publish Akka address using a map • Detect nodes joining / leaving cluster
  7. • Multicast • In memory • Cluster Client • Member

    list isn’t consistent across cluster What went wrong?
  8. Recap on requirements 2.0 1. Member lists 2. Easy to

    configure 3. Pass remoting address around
  9. What is ZooKeeper? • Clustered, consistent file system • API

    is focused on building distributed concepts
  10. Implementation • Cluster Membership = EPHEMERAL • Leader Election =

    SEQUENTIAL • “Cluster” = EPHEMERAL_SEQUENTIAL • Store akka addresses in ephemeral nodes • Curator project
  11. The final tally • Solid concept of membership • Keep

    things simple • Log / Graph / Monitor everything