This document discusses making microservices reactive using Play and Akka in Scala. It describes how to make a customer microservice resilient to data store failures and elastic to varying workloads. The solution involves clustering the data store using Postgres BDR, deploying the microservices to multiple nodes using ConductR for elastic scaling, and replicating cache updates across nodes using Akka data replication.
2. 5 Minute Microservices 2
Reactive Microservices
http://www.reactivemanifesto.org/
It’s for Developers AND Operations
• Resiliency
• The system stays responsive in the face of failure
• Elasticity
• The system stays responsive under varying
workload
3. 5 Minute Microservices 3
Example Problem
• Customer Microservice
• Create
• Retrieve
• Persisting to Datastore
• Local Caching
6. 5 Minute Microservices 6
But is it Reactive?
• Resilient
• What happens if/when our Datastore fails?
• Elastic
• How do we scale out?
• Cache Management
• How to maintain the cache across multiple nodes?
7. 5 Minute Microservices 7
Solution
• Cluster our Datastore
• Postgres BDR
• https://github.com/huntc/postgres-bdr
• Run on multiple nodes
• Deploy to ConductR
• https://conductr.typesafe.com/
• Signal for cache updates
• Akka Data Replication
• https://github.com/patriknw/akka-data-replication
8. 5 Minute Microservices 8
What is ConductR?
ConductR is a solution for deploying and managing
reactive applications across a cluster of machines.