The microservices approach Monolithic application approach A monolith

  • Slides: 41
Download presentation

The microservices approach

The microservices approach

Monolithic application approach • A monolith app contains domain specific functionality and is normally

Monolithic application approach • A monolith app contains domain specific functionality and is normally divided by functional layers such as web, business and data • Scales by cloning the app on multiple servers/VMs/Containers App 1 Microservices application approach • A microservice application separates functionality into separate smaller services. • App 1 App 2 Scales out by deploying each service independently creating instances of these services across servers/VMs/containers

State in Monolithic approach • Single monolithic database • Tiers of specific technologies State

State in Monolithic approach • Single monolithic database • Tiers of specific technologies State in Microservices approach • Graph of interconnected microservices • State typically scoped to the microservice • Variety of technologies used stateless presentation services stateless services stateful services stateless services with separate stores

Azure Developer Platform Azure Platform Services Active Directory SQL Data Warehouse SQL Database Platform

Azure Developer Platform Azure Platform Services Active Directory SQL Data Warehouse SQL Database Platform Services Redis Cache HDInsight Search Data Factory Tables Stream Analytics Document. DB Machine Learning Service Bus Event Hubs Storage Queues Mobile Engagement Biztalk Services Application Code Cloud Services More control Service Application Fabic Platform Max control Control Productivity Web Apps

Microservices High Availability Simple programming models Hybrid Operations High Density Hyper-Scale Azure Data Partitioning

Microservices High Availability Simple programming models Hybrid Operations High Density Hyper-Scale Azure Data Partitioning Rolling Upgrades Automated Rollback Service Fabric Low Latency Stateful services Health Monitoring Container Orchestration & lifecycle management Placement Constraints Private cloud Fast startup & shutdown Self-healing Replication & Failover Resource balancing Other clouds

Demo: Building your first microservice with Service Fabric

Demo: Building your first microservice with Service Fabric

Services built with Service Fabric

Services built with Service Fabric

300+ Service Fabric Preview Customers

300+ Service Fabric Preview Customers

Demo: Creating a Service Fabric cluster via the portal

Demo: Creating a Service Fabric cluster via the portal

Building and managing microservice applications

Building and managing microservice applications

Service Fabric Programming Models Scalability Availability Performance Azure Service Fabric Private cloud Lifecycle management

Service Fabric Programming Models Scalability Availability Performance Azure Service Fabric Private cloud Lifecycle management Portability Other clouds Monitoring

public interface IHello. World : IActor {. . . } public class Hello. World.

public interface IHello. World : IActor {. . . } public class Hello. World. Actor : Actor, IHello. World {. . . } using (var fabric. Runtime = Fabric. Runtime. Create()) { fabric. Runtime. Register. Actor(typeof(Hello. World. Actor));

Demo: Building reliable actor applications

Demo: Building reliable actor applications

 • Build stateless services using existing technologies such as ASP. NET, node. js,

• Build stateless services using existing technologies such as ASP. NET, node. js, EXEs etc • Manage concurrency and granularity of state changes with transactions in stateful services. • Communicate with services using the technology of your choice (e. g Web API, WCF, [web]sockets, etc).

 • Reliable collections make it easy to build stateful services. • An evolution

• Reliable collections make it easy to build stateful services. • An evolution of. NET collections for the cloud. Collections • Single machine • Single threaded Concurrent Collections • Single machine • Multi threaded Reliable Collections • • • Multi machine Replicated (HA) Persistence (durable) Asynchronous Transactional

Reliable Collections IReliable. Dictionary<K, V> IReliable. Queue<T> • Data is replicated and durably stored

Reliable Collections IReliable. Dictionary<K, V> IReliable. Queue<T> • Data is replicated and durably stored on multiple replicas. • Atomically update one or more collections using transactions. • Supports LINQ.

Cloud Services OR Service Fabric Stateless Service Azure Queue Azure Tables/No. SQL Service Fabric

Cloud Services OR Service Fabric Stateless Service Azure Queue Azure Tables/No. SQL Service Fabric Stateful Service

Demo: Building reliable service applications

Demo: Building reliable service applications

Azure Cloud Services Azure Service Fabric (Web and Worker Roles) • • 1 service

Azure Cloud Services Azure Service Fabric (Web and Worker Roles) • • 1 service instance per VM with uneven workloads Lower compute density Slow in deployment & upgrades Slower in scaling and disaster recovery (Stateless, stateful or Actor services) • • Many microservices per VM High microservices density Fast deployment & upgrades Fast scaling microservices across the cluster

Example Customer Solutions

Example Customer Solutions

Blinkbox, the UKs leading video-on-demand service delivering TV and movie content across multiple-devices Benefits

Blinkbox, the UKs leading video-on-demand service delivering TV and movie content across multiple-devices Benefits Microservices workflow for content encoding and resolution Agility - Ability to upgrade microservices independently and without downtime. No need to coordinate DB schema with app upgrades Programming API - Using actors and reliable collections to easily orchestrate the encoding and resolution of the on-demand content Scalability - Real time résolution for 30 K titles, designed to scale for growth of users, devices and content • Replacing existing Iaa. S/DB backed system with microservices solution • 1. 5 PB of for streaming content delivered to millions of customers using Azure Media Services

Microservices workflow for content encoding Service Fabric Cluster Content Master App Document. DB (Ad-hoc

Microservices workflow for content encoding Service Fabric Cluster Content Master App Document. DB (Ad-hoc searching, long term data storage) Content Profile App Encoding Workflow App Azure Media Services Job Management App Media Services Management API Key. Store App Resource Resolution App Encryption Job Management App Batch Compute

Microservices workflow for content encoding Service Fabric Cluster Document. DB (Ad-hoc searching, long term

Microservices workflow for content encoding Service Fabric Cluster Document. DB (Ad-hoc searching, long term data storage) Content Profile App Content Master App Encoding Workflow App API Service Activity (OWIN/ASP. Net) Service Activity Step Service Azure Media Services Job Management App Media Services Management API Encryption Job Management App Actor Key. Store App Actor Activity Step Actor Resource Resolution App Batch Compute

Schneider Electric develops connected technologies and solutions to manage energy and process in ways

Schneider Electric develops connected technologies and solutions to manage energy and process in ways that are safe, reliable, efficient and sustainable Benefits Microservices Io. T solution to manage uninterruptable power supplies (UPS) Scale – Service Fabric simplifies scale. With millions of devices we need partitioning and resource balancing that makes this transparent Actor Programming API – Service Fabric has the simplest-to-use actor model implementation in the market Density and Availability – VM utilization enables managing millions of devices with automatic failover • Management & operation of devices. Query and execute commands, send commands from device to LOB apps • Communicate with devices securely and in multiple protocols • Processing and latency need to be sub-second • Integration Azure services such as Event Hubs and storage.

Microservices Io. T solution to manage devices Service Fabric Cluster Management Service Identity Service

Microservices Io. T solution to manage devices Service Fabric Cluster Management Service Identity Service LOB App Egress Topic Commands & State Enquiry Http Req Data Collection System Connection M 2 M Device Signal. R Notification REST API Service Application Notifications Queue Device Actors Service Stream Analytics Analysis Notifications Queue Storage Ingress Event Hub Device Adaptor Service Device Gateway

http: //aka. ms/Service. Fabric http: //github. com/Azure/Service. Fabric-Samples http: //aka. ms/Service. Fabricdocs

http: //aka. ms/Service. Fabric http: //github. com/Azure/Service. Fabric-Samples http: //aka. ms/Service. Fabricdocs

Iaa. S VM OI Pipeline ELK Pipeline Application Event. Source Operational Insights Portal Azure

Iaa. S VM OI Pipeline ELK Pipeline Application Event. Source Operational Insights Portal Azure Table Elastic. Search Event. Listener WAD Service Fabric Runtime Event Hub (optional) Elasticsearch Cluster

Platform Services Security & Management Cloud Services Service Fabric Hybrid Operations Web Apps API

Platform Services Security & Management Cloud Services Service Fabric Hybrid Operations Web Apps API Apps Portal Azure Active Directory Batch Automation Scheduler Mobile Apps Document. DB Logic Apps Redis Cache Azure Search Storage Tables Azure AD Health Monitoring AD Privileged Identity Management Domain Services Storage Queues Biz. Talk Services Hybrid Connections Service Bus Key Vault Store/ Marketplace Data Warehouse Remote. App Azure AD B 2 C Multi-Factor Authentication SQL Database Media Services Content Delivery Network (CDN) API Management Notification Hubs Backup HDInsight Visual Studio Azure SDK VS Online App Insights Data Factory Machine Learning Event Hubs Io. T Hub Stream Analytics Data Lake Data Catalog Mobile Engagement Operational Analytics Import/Export Azure Site Recovery Stor. Simple VM Image Gallery & VM Depot Infrastructure Services