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



WORKSHOP: AKKA CLUSTER MANAGEMENT ON KUBERNETES at http://scalar-conf.com/ & https://scala.io/ 2018

Jeferson David Ossa

April 07, 2018

More Decks by Jeferson David Ossa

Other Decks in Technology


  1. Akka cluster management on Kubernetes “One Actor is no Actor

    - they come in systems” — Carl Hewitt
  2. The aim of this workshop is to get familiar with

    Akka Management Service Discovery using Kubernetes API. We will create a stateful distributed service with persistent entities via sharding in persistence mode. A account's general balance which will receive credits and debits from potentially multiple simultaneous sources.
  3. The tools • Sbt ◦ https://www.scala-sbt.org/download.html • Docker ◦ https://docs.docker.com/install/

    • Minikube ◦ https://kubernetes.io/docs/tasks/tools/install-minikube/ • Cassandra ◦ http://cassandra.apache.org/download/
  4. Akka Cluster • Node • Seed Node • Cluster •

    Leader • Gossip • Convergence • Failure Detector
  5. Service Discovery Akka Discovery provides a simple interface around various

    ways of locating services, such as DNS. Kubernetes API • Find pods labeled with the name of the Akka Management port
  6. Cluster Sharding How to distribute entities across the entire cluster

    with location transparency. Send messages without requiring the sender to know the location of the destination actor. Send messages to ShardRegion Actor, wich knows how to route it. How does it work ? sbt: groll next, docker:publishLocal ./delete, ./create
  7. Akka Persistence Enables stateful actors to persist their internal state

    so that it can be recovered when an actor is started, restarted after a JVM crash or by a supervisor, or migrated in a cluster. Only changes to an actor’s internal state are persisted but never its current state directly (except for optional snapshots) sbt: groll next, docker:publishLocal ./delete, ./create