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.

Building Real-time Distributed Applications with Akka.NET, Kubernetes. and .NET Core


Published on

In this session you will learn about how companies ranging from the Fortune 500 to brand new startups are changing the way the build .NET applications to leverage the very latest offerings from Microsoft and the .NET open source community.

You'll learn how and why companies are moving their applications onto .NET Core; rearchitecting them to use Akka.NET for fault tolerance, scalability, and the ability to respond to customers in real-time; containerizing them with Docker; putting everything together using Kubernetes for orchestration on-premise or on the cloud with Azure Kubernetes Services.

This session will provide an overview of how all of these technologies fit together and why companies are adopting them.

Published in: Technology
  • Login to see the comments

Building Real-time Distributed Applications with Akka.NET, Kubernetes. and .NET Core

  1. 1. Real-time Distributed Applications with Akka.NET, Kubernetes, and .NET Core By Aaron Stannard, CEO, Petabridge
  2. 2. Real-time Apps Becoming Common Consumer • Video games • Social apps • Chat and remote work • Personal data monitoring (credit, payables, health) • Collaboration & sharing Enterprise • Industrial IOT • Fleet and vehicle tracking • Workflow processing • Fraud & risk analysis • Dynamic pricing • Healthcare
  3. 3. What Makes an App “Real- time?”
  4. 4. Fastest Response Time?
  5. 5. Real-time Application Challenges • You’re responsible for the consistency of your state. • State has to be moved between nodes during deployments, scaling, and recovery from failures. • Deployment tools need to allow for movement of state at deploy-time.
  6. 6. Roadmap
  7. 7. Stateful Application Programming Using Akka.NET Actors to Manage & Distribute State
  8. 8. What is an Actor?
  9. 9. What is an Actor?
  10. 10. IActorRef – Actor References
  11. 11. Actors Process One Message at a Time
  12. 12. Processes Usually Contain Many Actors
  13. 13. Child-per-Entity Pattern
  14. 14. Actors Simplify State Management • Actors are serial message processors – state can’t be modified concurrently. • State is always shared via passing immutable messages, thus no side effects. • Actors can be easily partitioned into hierarchies of entities. • IActorRef, the actor reference, is location transparent. Messages can be shared across network boundaries automatically.
  15. 15. State Distribution, Scaling, and Fault Tolerance Akka.Cluster, Akka.Persistence, and Akka.Cluster.Sharding
  16. 16. Highly Available State with Akka.Cluster Each node is its own ActorSystem
  17. 17. What Akka.Cluster Does
  18. 18. What is a "Cluster?"
  19. 19. State Distribution Techniques • Consistent hash routing – All events with same entity ID (hash range) end up in same server • Akka.Cluster.Sharding – Uses consistent hashing, but smarter handling of partition hand-offs • Writable Replication (Akka.DistributedData) – Have state written to multiple places in network at same time
  20. 20. Consistency Strategy: guarantee maximum of 1 instance of entity actor across entire cluster
  21. 21. Consistent Hash Partitioning
  22. 22. State has to be Moved
  23. 23. Akka.Persistence: State Durability
  24. 24. Akka.Persistence: State Recovery
  25. 25. Moving State via Akka.Persistence
  26. 26. Doing it in Production with K8s
  27. 27. Why Kubernetes? • Ubiquitous – runs on- premise, on the cloud, etc… • Robust deployment models – including handling for stateful apps. • Rich ecosystem.
  28. 28. Why Azure Kubernetes Service? • Takes only a few minutes to setup. • Integrates well with Azure DevOps. • Great environment for learning K8s.
  29. 29. Kubernetes Core Concepts • K8s is an “orchestration” platform – networks multiple container hosts together into unified abstraction. • Applications are deployed to the K8s cluster – K8s then orchestrates the instantiation of containers across hosts. • Applications define via configuration: – Which parts can be exposed publicly and how. – How different parts of application can be deployed and managed.
  30. 30. Kubernetes Core Concepts
  31. 31. K8s Infrastructure on Azure AKS
  32. 32. K8s Key Terms (for Akka.Cluster) • “Pod” – represents a single application unit of execution. Consists of 1 or more Docker container. • “Stateful set” – a deployment group of identical pods working together as a stateful service. • “Service” – defines how a stateful set exposes itself to other services within K8s and Akka.NET cluster.
  33. 33. Akka.Cluster K8s Methodology • All applications are deployed as stateful sets – State is fundamental to how Akka.Cluster works • All internal Akka.Cluster functionality is exposed as “ClusterIp” services • External / public functionality can exposed as a “LoadBalancer” service or otherwise • Petabridge.Cmd used for node exits • Deployments / rollbacks performed by
  34. 34. Akka.Cluster Continuous Deployment Process
  35. 35. Learn it Step by Step