Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Akka and Kubernetes, the beginning of a beautiful relationship - Container Days 2019

One of the best features of Akka is Akka Cluster. Akka cluster allows for building distributed applications, where one application or service spans multiple nodes. From its initial release in 2013, Akka Cluster needed a node management system to manage the Akka nodes and to provide a resilient and elastic platform. With Kubernetes Akka finally has the node management system that is has been waiting for. Akka Cluster has been designed to gracefully handle nodes leaving and joining a running cluster while continuing to run. Kubernetes adds and removes nodes as needed to increase capacity or to recover from failures. In effect, there is a perfect symbiosis between Akka Cluster and Kubernetes. In this talk, we will look at and demonstrate how Akka Java Cluster and Kubernetes work together and how together they form a beautiful relationship.

  • Login to see the comments

Akka and Kubernetes, the beginning of a beautiful relationship - Container Days 2019

  1. 1. Hugh McKee (@mckeeh3), Developer Advocate Akka and Kubernetes: The beginning of a beautiful relationship
  2. 2. Hugh McKee (@mckeeh3), Developer Advocate
  3. 3. Hugh McKee (@mckeeh3), Developer Advocate
  4. 4. Hugh McKee (@mckeeh3), Developer Advocate
  5. 5. The actor model in computer science is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent computation. In response to a message that it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other through messages (avoiding the need for any locks). Wikipedia
  6. 6. The actor model in computer science is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent computation. In response to a message that it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other through messages (avoiding the need for any locks). Wikipedia
  7. 7. The actor model in computer science is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent computation. In response to a message that it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other through messages (avoiding the need for any locks). Wikipedia
  8. 8. Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
  9. 9. Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications. elastic resilient
  10. 10. Akka cluster and Kubernetes Live demo
  11. 11. “Crop Circle” Shows Running Pods / JVMs
  12. 12. “Crop Circle” Shows Running Pods / JVMs POD / JVM POD / JVM POD / JVM
  13. 13. Entity Shard Singleton HTTP Server Pod
  14. 14. Entities added as needed Inactive entities shutdown
  15. 15. Microservice Application Microservice
  16. 16. Resilience and Scale Demo
  17. 17. The enabler of these characteristics is a Cloud-Ready Message Driven Model. Lightbend codified these principles into the Reactive Manifesto in 2013; 24,000+ signatories around the world so far. Responsive Resilient Elastic React to Users React to Failures React to Load Variance Low latency / High performance Real-time / NRT Graceful, Non-catastrophic Recovery Self-Healing Responsive in the face of changing loads Reactive Systems
  18. 18. The enabler of these characteristics is a Cloud-Ready Message Driven Model. Lightbend codified these principles into the Reactive Manifesto in 2013; 24,000+ signatories around the world so far. Responsive Resilient Elastic React to Users React to Failures React to Load Variance Low latency / High performance Real-time / NRT Graceful, Non-catastrophic Recovery Self-Healing Responsive in the face of changing loads Reactive Systems
  19. 19. Java Maven K8 Project Review
  20. 20. Clustered Entity Actors
  21. 21. You entity 64 Load Balancer Me entity 17 Other entity 76
  22. 22. You entity 64 Load Balancer Me entity 17 Other entity 76
  23. 23. Clustered Entity Actors Code Review
  24. 24. Load Balancer Pod 1
  25. 25. Load Balancer Pod 2Pod 1 Pod 3
  26. 26. Load Balancer Pod 2Pod 1 Pod 3
  27. 27. Distributed Actors Cluster Aware Actors
  28. 28. Distributed Actors Cluster Aware Actors
  29. 29. Distributed Actors Cluster Aware Actors
  30. 30. Distributed Actors Cluster Aware Actors
  31. 31. Cluster Aware Actors Code Review
  32. 32. Shard Distribution Akka Cluster Singleton
  33. 33. Shard Distribution Akka Cluster Singleton
  34. 34. Shard Distribution Akka Cluster Singleton
  35. 35. Entity Distributed Sharding Akka Cluster Sharding
  36. 36. Entity Distributed Sharding Akka Cluster Sharding
  37. 37. Event Sourcing & CQRS Akka Persistence & Persistence Query
  38. 38. Event Sourcing & CQRS Akka Persistence & Persistence Query
  39. 39. User ID Time Event You 64 08:11 Add Item 1567 Me 17 08:15 Add Item 3254 Other 76 08:16 Add Item 8359 You 64 08:20 Add Item 2632 Me 17 08:20 Add Item 4983 Other 76 08:24 Change Item 8359 You 64 08:25 Remove Item 1567 You 64 08:26 Add shipping address Other 76 08:30 Add Item 2438 Me 17 08:33 Add shipping address Me 17 08:33 Add billing address You 64 08:35 Add billing address Event Sourcing & CQRS
  40. 40. You entity 64 Load Balancer Me entity 17 Other entity 76
  41. 41. Akka Reactive Systems and Kubernetes Responsive Resilient Elastic React to Users React to Failures React to Load Variance Low latency / High performance Real-time / NRT Graceful, Non-catastrophic Recovery Self-Healing Responsive in the face of changing loads a beautiful relationship
  42. 42. /akka-java-cluster-openshift /akka-java-cluster.git /akka-java-cluster-aware.git /akka-java-cluster-singleton.git /akka-java-cluster-sharding.git /akka-java-cluster-persistence.git /akka-java-cluster-persistence-query.git https://github.com/mckeeh3…
  43. 43. Upgrade your grey matter!
 Get the free O’Reilly book by Hugh McKee, 
 Developer Advocate at Lightbend https://www.lightbend.com/ebooks
  44. 44. Hugh McKee (@mckeeh3), Developer Advocate hugh.mckee@lightbend.com Akka and Kubernetes: The beginning of a beautiful relationship

×