Building Hyper-Scale Platform-as-a-Service Microservices with Microsoft Azure Patriek van Dorp and Alex Thissen
About me: Patriek van Dorp pvandorp@xpirit.com @pvandorp Xpirit http://onwindowsazure.com
About me: Alex Thissen Microsoft Regional Director athissen@xpirit.com @alexthissen Xpirit http://blog.alexthissen.nl
Agenda Challenges in large distributed enterprise systems Micro-introduction to microservices Microsoft Azure Service Fabric Actor pattern and programming model Wrapup Questions and Answers
Challenges in large distributed systems Architecture aligned to organization and vice versa Strict technology choices with additional governance Specialized teams per function Monolithic structure from evolutionary growth Long test periods and big release schedules High risk big-bang deployments of dependent systems Hard to scale entire system or parts
Transitioning to a microservices architecture
The many definitions of microservices - Small and focused on doing one thing well - Autonomous Loosely coupled service oriented architecture with bounded contexts Adrian Cockcroft (Netflix) SOA done right Anonymous services are independently deployable and scalable, each service also provides a firm module boundary, even allowing for different services to be written in different programming languages. Martin Fowler (Thoughtworks)
From horizontal to vertical Change your architecture to vertical partitions Organized by logical cohesion Teams own layers spanning domains Unified technology choice Modeled after organization s domains Owned by team Top to bottom Isolated from each other as much as possible
Benefits Alignment with organization Ownership with teams Selective scaling Deployment of smaller pieces with lower risk Resilience against failure Heterogeneous technology landscape Composability Replaceability
Problems and solutions Rolling upgrades Availability guarantees Scale out architecture Resource governance Density Packaging and deployment Policy enforcement Granular versioning Stateful workloads Leader election Mesos Kubernetes Zookeeper Redis Raven MongoDB Yarn Fleet Hadoop Containers
Microsoft Azure Service Fabric Consistency Concurrency Replication & Failover Name Resolution Communication High-Density Low Latency Health Monitoring Rolling Upgrades Fault Domains
Microsoft Azure Service Fabric Consistency Name Resolution Concurrency High-Density Fault Domains Communication Rolling Upgrades Microsoft Azure Service Fabric Replication & Failover Low Latency Health Monitoring
Microsoft Azure Service Fabric Cluster Node App 1 Node Node Node Node App 2
What can you build with Service Fabric? Stateless Microservices: Has no local persistent state Optionally stores state in external data stores Can have multiple instances for improving performance E.g. Web API, Gateway Service, etc. Stateful Microservices: Contains highly consistent local state Provides redundancy through replication Scale for performance, not for redundancy E.g Databases, Workflows, etc. Existing apps written with other frameworks node.js, Java VMs, any EXE
Stateless vs. Stateful Services DEMO
Microsoft Azure Service Fabric Reliable Services API Reliable Actors API Consistency Name Resolution Concurrency High-Density Fault Domains Communication Rolling Upgrades Microsoft Azure Service Fabric Replication & Failover Low Latency Health Monitoring
Reliable Actors Actors are isolated single-threaded components that encapsulate both state and behavior Actor communicate with the system, including other Actors, by sending asynchronous messages with a request/response pattern Actors are virtual: there is no need to initialize or destroy them
Reliable Actors API DEMO
Summary Microservices as a potential architecture style Adding complexity to gain simplicity Choose an appropriate programming model Azure platform services help solve remaining challenges for reliability and scaling Read more in the Xpirit Magazine
Think ahead. Ask now. @pvandorp and @alexthissen pvandorp@xpirit.com athissen@xpirit.com http://www.xpirit.com/ @xpiritbv http://xpirit.com/blog
Leading IT specialists in Microsoft Application Lifecycle Management, Cloud, Enterprise Mobility & Security http://www.xpirit.com