[rakuten tecktalk] microservices and azure service fabric (2016/06/02)

28

Upload: naoki-sato

Post on 08-Jan-2017

1.109 views

Category:

Technology


0 download

TRANSCRIPT

http://samnewman.io/books/building_microservices/

http://www.oreilly.co.jp/books/9784873117607/

http://www.slideshare.net/spnewman/principles-of-microservices-ndc-oslo

Web Apps

MobileApps

APIManagement

APIApps

LogicApps

NotificationHubs

Content DeliveryNetwork (CDN)

MediaServices

HDInsight MachineLearning

StreamAnalytics

DataFactory

EventHubs

MobileEngagement

BiztalkServices

HybridConnections

ServiceBus

StorageQueues

Backup

StorSimple

SiteRecovery

Import/Export

SQLDatabase

DocumentDB

RedisCache

Search

Tables

SQL DataWarehouse

Azure AD Connect Health

AD PrivilegedIdentity Mngt

OperationalInsights

CloudServices

Batch Remote App

ServiceFabric Visual Studio

ApplicationInsights

Azure SDK

Team Project

ActiveDirectory

Multi-FactorAuthentication

Automation

Portal

Key Vault

Store /Marketplace

VM Image Gallery& VM Depot

SECURITY & MANAGEMENT

PLATFORM SERVICESHYBRID

OPERATIONS

Build on infrastructure (IaaS) Build on Dev framework (PaaS)

Preview

GAThe Azure Application Platform“App Creators”

Developers Non-Devs

Microsoft Azure

LOBSaaSLift & Shift Docker

Virtual

Machines

Stateful and

stateless one-

off solutions

VM

ScaleSet

s

Scalable

stateless

solutions

Containe

r Service

Scalable,

orchestrated

Docker

images

deployed into

containers

Differentiation Time to valueExisting App Investments

Batch

Custom

High

Performanc

e

Computing

solutions

Cloud

Service

sCustom

Monolithic

3-tier

stateless

solutions

Service

Fabric

Custom

Microservice

-based

stateless and

stateful

solutions

Power

Apps

Graphical

design

mobile

solutions

App Service

Template based

rapid

development

web, mobile

and API

solutions

Orchestrate

d workflow

based

integration

solutions

LogicWeb/Mob/

APIAll the

goodness of

App Service in

a dedicated

environment

Environments

IaaS VMs and

ScaleSets

Raw

Containers

Corey StorageCorey vNIC

Corey VM

Mark StorageMark vNIC

Mark VM

VM 1 VM 2 VM 3

VM 4 VM 5 VM 5

PaaS

IaaS VMs and

ScaleSets

Raw

Containers

Microservices Existing

Frameworks

Web/Mobile Serverless

Microservices

Existing

Frameworks

Web/Mobile

Serverless Event-driven compute application components.

Ex: IOT events, game events, operational events

Web and mobile fully managed applications. No infra management.

Ex: ecommerce sites, LOB sites, supporting websites

Massive-scale, 24x7 available applications with agile multi-components.

Ex: Multi-part live games, queuing systems, large-scale sites/LOB

Applications focused on the framework/runtime/application model.

Ex: Existing enterprise/LOB apps, new scale-out with existing components

App Service

Service Fabric

Cloud Services

Azure Functions

Microservices

Existing

Frameworks

Web/Mobile

Serverless

Plan1 Monitor + Learn

ReleaseDevelop + Test2

Development Production

4

3

• Scales by cloning the app on multiple

servers/VMs/Containers

Monolithic application approach Microservices application approach

• A microservice application

separates functionality into

separate smaller services.

• Scales out by deploying each service

independently creating instances of these services

across servers/VMs/containers

• A monolith app contains domain

specific functionality and is

normally divided by functional

layers such as web, business and

data

App 1 App 2App 1

Service Fabric Cluster

Age of Ascent Architecture

Spatial

(In Space)

Gaia (stateless)

Trade Inventory Production CommsNavigation

PlayerAccount CrewCommerce Alliance

Avatar

(stateless)

AI Events

web browser

or device

game

function

services

CDN

aggregate

services

physics

service

routing

services

Microservices

Public Cloud Other CloudsOn Premises

Private cloud

Azure Service Fabric

Composable platform

Prescriptive microservices platform

Service Fabric

Datacenter (Azure, On Premises, Other Clouds )

Load

Balancer

PC/VM #1

Service Fabric

Your code, etc.

PC/VM #2

Service Fabric

Your code, etc. PC/VM #3

Service Fabric

Your code, etc.

PC/VM #4

Service Fabric

Your code, etc.PC/VM #5

Service Fabric

Your code, etc.

Management to deploy

your code, etc.

(Port: 19080)

App Web Request(Port: 80/443/?)

Application Type: sfAuction

Service Type: Website

Guest Executable (stateless)

(Node.js)

Service Type: Auction

Reliable Collections (stateful)

(C#/.NET)

Service Fabric Auction AppMicroservices design

Service Type: APIGateway

Reliable Service (stateless)

(C#/.NET)

Cluster

Load

Balancer

VMSS #1 (stateless tier)

NodeType=“FrontEnd”

Node #1

Website

ApiGateway

Node #2

Website

ApiGateway

VMSS #2 (stateful tier)

NodeType=“BackEnd”

Node #3

Auction

Node #4

Auction

Service Type: Website

Guest Executable (stateless)

(Node.js)

<ServiceManifest Name="Pkg-Svc.Website" Version="1.0.0" …><ServiceTypes>

<StatelessServiceType ServiceTypeName="Svc.WebsiteType" UseImplicitHost="true"/></ServiceTypes><CodePackage Name="Code" Version="1.0.0">

<EntryPoint><ExeHost>

<Program>node.exe</Program><Arguments>Server.js</Arguments>

</ExeHost></EntryPoint>

</CodePackage></ServiceManifest>

<ContainerHost><ImageName>myNodeImage:latest</ImageName><Commands></Commands>

</ContainerHost>

Service Type: APIGateway

Reliable Service (stateless)

(C#/.NET)

Service Type: Website

Guest Executable (stateless)

(Node.js)

Load

Balancer

Stateful

Data

Load

Balancer

Other

Internal

Tiers

?

Stateless

Compute

Stateless

Web

Cach

e

Stateless

Web

Stateful

Compute

Service Type: Auction

Reliable Collections (stateful)

(C#/.NET)

Service Type: APIGateway

Reliable Service (stateless)

(C#/.NET)

Service Type: Website

Guest Executable (stateless)

(Node.js)

Auction (Partition #1)

Users Dictionary

Email UserInfo

U1 ItemId[]

U2 ItemId[]

Active Items List

ItemId

U1/“A”

U2/“X”

U1’s Items Dictionary

ItemId ItemInfo

U1/“A” 2016-2-1, Bid[]

U1/“B” 2016-2-5, Bid[]

U2’s Items Dictionary

ItemId ItemInfo

U2/“X” 2016-3-3, Bid[]

U2/”Y” 2016-4-9, Bid[]

APIGatewayCreateUserAsync

http://aka.ms/servicefabric

http://aka.ms/tryservicefabric