Building Resilient Scalable Services with Microsoft Azure Service
Building Resilient, Scalable Services with Microsoft Azure Service Fabric Érsek Attila @ersekattila
Frontend/API/Gateway (Stateless) Compute (Stateful? ) Storage (Stateful)
ATTEMPTING TO SCALE… Gateway (Stateless) … Compute (Stateful? ) … Cache Storage (Stateful)
ATTEMPTING TO INCREASE RELIABILITY… Gateway (Stateless) … Compute (Stateful? ) … Storage (Stateful) …
A platform for reliable, hyperscale, microservice-based applications microservices High Availability Simple programming models Hybrid Operations High Density Hyper-Scale Windows Server Data Partitioning Rolling Upgrades Automated Rollback Service Fabric Low Latency Stateful services Health Monitoring Container Orchestration & lifecycle management Placement Constraints Fast startup & shutdown Load balancing Windows Server Linux Azure Self-healing Replication & Failover Linux Hosted Clouds Windows Server Linux Private Clouds
Node Node
System Services Failover manager Cluster manager Naming Image store
Runtime APIs Levels & Capabilities Reliable Actors [ ] Io. T Applications, Halo… Reliable Services [ ] Current Enterprise Developers… Reliable Collections [ ] In. Tune, … State Management APIs [ ] Doc DB, Lync… Replica Set Management APIs [ ] SQL Azure Provided by Platform Provided by User [ ] Replica Set Management State Replication State Storage Messaging Programming Model Business Logic
public class Voicemail. Box. Actor : Voicemail. Box. Actor. Base { public override Task<List<Voicemail>> Get. Messages. Async() { return Task. From. Result(this. State. Message. List); } public override Task Leave. Message. Async(string message) { this. State. Message. List. Add( new Voicemail() { Id = Guid. New. Guid(), Message = message, Received. At = Date. Time. Now }); return Task. From. Result(true); } }
Reliable Collections Single Machine Multi-Machine Collections Concurrent Collections • Single Threaded • Multi-Threaded Dictionary<TKey, TValue> Concurrent. Dictionary<TKey, TValue> Reliable Collections • Multi-Node • Replicated (HA) • Persistence Option • Asynchronous • Transactional Reliable. Dictionary, Tvalue>
Conventionally data is made highly available with external storage. Gateway (Stateless) … Scale is achieved by scaling out stateless front ends and affinitization to workers Compute (Stateful? ) … Latency is caused by many network hops and data layer contention at scale. Storage (Stateful) …
… Stateful Workers used for “hot” data to minimize contention and network hops External Storage used for “cold” data such as analytics Compute (Stateful and Highly Reliable) Storage …
- Slides: 22