SlideShare ist ein Scribd-Unternehmen logo
1 von 87
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kitisak Sriprasert
Solutions Architect, Amazon Web Services
นักสร ้างสมัยใหม่ (Level 300)
เพิ1มคอนเทนเนอร์ ลดปฏิบัติการ
Let’s Talk About Microservices
What are Microservices?
Microservices are an architectural and organizational
approach to software development in which software is
composed of small, independent services that
communicate over well-defined APIs. These services are
owned by small, self-contained teams.
Whitepaper: http://bit.ly/2A0qGdt - Running Containerized Microservices on AWS
Monolithic -> Microservices
webserver
.package
Order UI
Order service
Inventory
service
Shipping
service
Order UI
Inventory
service
Order
service
Shipping
service
Tenets of Microservices
Tenets of Microservices Architectures
Do one
thing wellIndependent
Decentralized
Black box
Polyglot
You build it, you run it
Benefits of Microservices Architecture
Agility
Flexible
scaling
Easy
deployment
Technology
freedom
Reusable code Resilience
Any app, any language
Containers Are a Perfect Fit!
Image is the version
Test and deploy same artifact
Stateless servers decrease change risk
Self-contained services
CI/CD pipelines
CONTAINER ENGINE
Simple to model services
Containers on AWS
Run containerized Docker applications in production
AMAZON ECS
Production Workloads on AWS
AWS VPC
networking mode
Advanced task
placement
Deep integration
with AWS platform
ECS CLI…{ }
Global footprint
Powerful scheduling
engines
Auto scaling
CloudWatch metrics
Load balancers
Linux & Windows
Amazon ECS
EC2 INSTANCES
ECS
AGENT
TASK
CONTAINER
TASK
CONTAINER
ECS
AGENT
TASK
CONTAINER
TASK
CONTAINER AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
CONTAINER
TASK
CONTAINER
INTERNET LOAD
BALANCER
LOAD
BALANCER
63%
of Kubernetes workload run on
Amazon Web Services today
- CNCF 2017 Survey
https://www.cncf.io/blog/2017/06/28/survey-shows-kubernetes-leading-orchestration-platform/
https://www.cncf.io/blog/2017/12/06/cloud-native-technologies-scaling-production-applications/
E L A S T I C C O N TA I N E R S E R V I C E F O R K U B E R N E T E S
(EKS)
mycluster.eks.amazonaws.com
Availability
Zone 1
Availability
Zone 2
Availability
Zone 3
kubectl
Enable Focus On Applications
Run containers without managing servers or clusters
AWS FARGATE
AWS Fargate
No instances
to manage
Task
native API
Resource-
based pricing
Simple, easy to use,
powerful, and new
consumption model
=
Scheduling and Orchestration
Cluster Manager Placement Engine
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
AMAZON CONTAINER SERVICES
Choose your orchestration tool1
Choose your launch type2
ECS EKS
EC2 Fargate EC2 Fargate
Customers
● >400 services
currently deployed
● >80 container
instances
● >50,000 deploys
● 6 clusters
● 2 regions
Building a
platform on
Amazon ECS
More Containers, More Operations?
More Containers, More OperationsLESS
Continuous Deployment
Continuous Deployment
AWS
CodeCommit AWS
CodePipeline
AWS
CodeBuild
Amazon ECR
Amazon ECS
AWS
CloudFormation
1. Commit Code
2. Trigger
Pipeline
5.UpdateStack
6. Update Service
4. Push Image
3.BuildArtifact
Automatic Service Scaling
Automatic Service Scaling
Publish metrics
Auto Scaling ECS service
Availability
Zone A
Availability
Zone B
TASK A
Add/Remove ECS
tasks
TASK C
TASK BScaling Policies
Amazon CloudWatch
Amazon ECS
Application Load
Balancer
Secrets Management
Secrets Management
•prod.app1.db-pass
•general.license-code
•prod.app2.user-name
ECS Cluster
EC2 Instance EC2 Instance
TASK A
TASK B
TASK B
EC2 System Manager – Parameter
Store
Coordinate Microservices with
Visual Workflows
Step Functions and Containers
Container workflows
Video transcoding
Managed Service Discovery
Find endpoints,
then connect
Functional calls
Application communication is evolving
Known endpoints, APIs
Developers need to connect micro services
Build apps
invoking other
services by name
Ensure that service
name resolves to
correct IP/port
DEV OPS
“Where is Service X?”
Friendly name -> IP + port
E.g., app: {10.0.4.5:8080, 10.0.4.6:8080 }
What is Service Discovery?
Service registry is a database populated with
information on how to dispatch requests to
microservice instances.
Why is it non trivial?
Dynamic by design:
Number of containers & instances
Auto assigned IP addresses & ports
Placement, scheduling, scaling
Deployments and upgrades
Health and connectivity
SERVICE A
INSTANCE 1
SERVICE B
INSTANCE 1
CLIENT
How to contact you?
What’s your IP+Port?
How to contact you?
What’s your IP+Port?
SERVICE A
INSTANCE 1
SERVICE B
INSTANCE 1
CLIENT
Which one is available?
SERVICE A
INSTANCE 2
SERVICE B
INSTANCE 1
Which one is available?
SERVICE A
INSTANCE 1
CLIENT
SERVICE A
INSTANCE 2
SERVICE B
INSTANCE 1
SERVICE B
INSTANCE 2
Service removed!
SERVICE A
INSTANCE 1
SERVICE B
INSTANCE 1
CLIENT
SERVICE A
INSTANCE 2
SERVICE B
INSTANCE 2
NEW DEPLOYMENT!
SERVICE C
INSTANCE 1
SERVICE C
INSTANCE 2
Current patterns require install, setup and management
Load Balancers Key-value store Service Mesh
Service
registry
Decision Criteria
Service Registry
Discovery Mechanism
Registration Mechanism
Self-registration
Server-side Discovery
Third-party Registration
Client-side Discovery
Can We Make It Simpler?
Predictable
Names
for services
Auto updated
with latest,
healthy IP, port
Managed: No
overhead of
installation or
monitoring
High availability,
high scale
Extensible:
Flexible
boundaries for
auto discovery
Introducing Service Discovery for
Amazon ECS
You build apps where
services are invoked by
name & name resolves
to IP/port dynamically
You turn on service
discovery during
deployment —
service creation
DEV OPS
Service Discovery Components
Service
CNAME: A / SRV record
Namespace
Route 53 provides Service Registry
Route 53 provides APIs to create
• Namespace
• CNAME per service autoname
• A records per task IP
• SRV records per task IP + portService
CNAME: A / SRV record
Namespace
ECS schedules & places service endpoints
ECS Scheduler updates on:
• Service scaling
• Task registrations
• Task de-registrations
• Task health
• Scheduling / Placement changes
• ECS instance changes
ECS maintains latest state of the
dynamic environment in Service
Registry
Cluster: myapp
app
IP
web
IP
app
IP
web
IP
AZ 1 AZ 2
ECS updates service endpoints in Route 53
Cluster: myapp
AZ 1 AZ 2
app
10.0.6.5:8080
web
10.0.8.6:8080
app
10.0.4.5:8080
web
10.0.3.6:8080
Namespace: myapp.local
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
Service
app.myapp.local CNAME
10.0.6.5:8080
10.0.8.6:8080
Services connect to latest endpoints via DNS
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
app
>dig web.myapp.local
> 10.0.4.5:8080
>
app web
web
Cluster: myapp DNS Server:
AZ 1 AZ 2
Benefits of this approach
Cluster: myapp
AZ 1 AZ 2
Service
Namespace
Managed
Just turn on
Highly available
Tied to Route 53
availability, scale
Extensible
Public APIs that can be
used across AWS
Works across clusters,
accounts, AZs
Works across AWS services
Enables these use cases
1
Blue green deployments
• myapp.staging.local
• myapp.prod.local
• Private IP
• abstract cluster details
2
Internal micro services
• web.myapp.local
• Expose Private IP
3
External micro services
• web.myapp.mycompany.com
• Expose public IP or ELB EIP
• network + container health
check
4
Across ECS & EKS
• Service1.myapp.ecs
• Service2.myapp.eks
5
Across ECS &
AWS & onPrem
• Service1.myapp.ecs
• Service2.myapp.ec2
• Service3.myapp.onprem
6
Expose to service mesh
• Service1.myapp.local
• Service2.myapp.local
More Containers, More OperationsLESS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kitisak Sriprasert
Solutions Architect, Amazon Web Services
ย ้ายเลย! ย ้ายข ้อมูลไปยัง AWS (ระดับ 200)
ย ้ายและพัฒนาแอปพลิเคชัน Microsoft
เดิมให ้ทันสมัยด ้วยคอนเทนเนอร์
VM
Container
Who is this new kid in town?
Server
Host OS
Hypervisor
Server
Host OS
VM Containers
Guest OS
Lib,bin
App
VM 1
C 1
AppGuest OS
Lib,bin
App
VM 2
C 2
App
C 3
App
C 4
App
C 5
App
C 6
App
Common bin,lib Common bin,lib
OS Image 1 OS Image 2
Docker
Images
Running
Containers
2 Apps
Vs
6 Apps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why do we care?
https://pixabay.com/en/baby-boy-child-childhood-computer-84626/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bob
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customers
AWS cloud
Identity Federation
Active
Directory
Microsoft
Technologies
on AWS
AWS Tools for Windows PowerShell
MSFT SCVMM Plug-in
2008 Today
Innovation
CustomerAdoption
WS 2008 & SQL Server 2008
WS 2003
.NET SDK
WS 2008 R2
SQL Server 2008 R2
Visual Studio
Toolkit
EC2 Dedicated Instances
(BYOL)
MSFT SCOM
plug-in release
Amazon RDS adds SQL Server
WS 2012 & SQL Server 2012
EC2 Run Command
EC2 Dedicated Hosts (BYOL)
MSFT SharePoint 2016 (Marketplace)
AWS Directory Service
WS & SQL 2016
EC2 Systems Manager
.NET on Lambda
Buy license included
instances
Bring your own licenses
Licensing
2018
2017
2016
40%
20%
CPU Utilization
Windows Instance Example
m4.4xlarge -> $1.736/hr (SIN)
m4.xlarge -> $0.434/hr (SIN)
CPU Utilization ~ 15%
Change Instance Type
CPU Utilization
~60%
Still has ~40% head
room
75%
Savings
Bring Your Own License
(BYOL) – Windows Server
Running two m4.4xlarge instances
~2500 USD
On Demand
~1600 USD
3 Year Reservation
36% Savings
~1600 USD
3 Year Reservation
~800 USD
Dedicated Host
Reserved Instance
50% Savings
m4.4xlarge
25% Utilization
m4.large
50%
Utilization
~1200 USD ~800 USD
m4.large
50%
Utilization
m4.large
50%
Utilization
m4.large
50%
Utilization
33% Savings
m4.4xlarge
75% Utilization
How can I isolate?
So far what we found
Reserved instances
Bigger instances
Right sizing
Easy deployment
Easy Patching
Isolation
Increase
Utilization
Savings
Headache Free IT
Example: Batch Processing
Slicing & Isolating Resources
12am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am
Job 1
Job 2
Job 3
Slicing & Isolating Resources
docker run -d --cpu-percent 10 mycompany/myapp c:AppBatch.exe
12am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am
Job 1
Job 2
Job 3
Demo
Docker Images & Layers
Application 1 Application 2
Layer 110GB
Layer 22GB
Layer 350MB
Layer 410MB
Layer 320MB
Layer 45MB
Shared Layers
Patching and Maintenance
My application 1 layer
version 10
version 200
My application 2 layer
ASP.NET:latest
Windows Server:latest
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CC https://pixabay.com/en/container-port-loading-stacked-3118783/
Amazon ECR Amazon ECS
Set of containers
E.g. SQL server, Web sites
instance instance instance instance
Cluster
Constrains
E.g. HR, Finance, Instance Size
Resource Demand
E.g. Memory, CPU
Task
instance instance instance instance
Cluster
Task
Service
How many task?
Deployment
Strategy?
Auto scaling
Strategy?
Amazon ECS Amazon ECS
Example Deployment
Bin Packing Balance Spread
instance instance instance instance
Cluster
Service 1
Service 2
Service 3
Service N
Efficiency | Agility | Automation
I want…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CI/CD Pipeline
Microsoft
Visual Studio
Application Load
Balancer
v 1
v 1
container
container
Microsoft
TFS
Build Agent Amazon
ECR
Amazon ECS
container
container
v 2
v 2
Security Checks
Unit Test
Demo
What we learnt 1/3
Containers
CC https://pixabay.com/en/container-port-loading-stacked-3118783/
What we learnt 2/3
Isolation
CC https://pixabay.com/en/horse-barn-the-horses-are-stallion-2649609/
What we learnt 3/3
Automation
https://commons.wikimedia.org/wiki/File:KUKA_Industrial_Robots_IR.jpg
Thank You
Thank you.
Build on.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Introduction to Media Processing, Delivery and Storage in the Cloud - AWS Jun...
Introduction to Media Processing, Delivery and Storage in the Cloud - AWS Jun...Introduction to Media Processing, Delivery and Storage in the Cloud - AWS Jun...
Introduction to Media Processing, Delivery and Storage in the Cloud - AWS Jun...
 
Join Us to Explore DevOps on AWS with REAN Cloud
Join Us to Explore DevOps on AWS with REAN CloudJoin Us to Explore DevOps on AWS with REAN Cloud
Join Us to Explore DevOps on AWS with REAN Cloud
 
Platform for Innovation - AWS
Platform for Innovation - AWSPlatform for Innovation - AWS
Platform for Innovation - AWS
 
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
Automating Software Deployments with AWS CodeDeploy by Matthew Trescot, Manag...
 
AWS re:Invent 2016: Host a massively scalable website around the world for a ...
AWS re:Invent 2016: Host a massively scalable website around the world for a ...AWS re:Invent 2016: Host a massively scalable website around the world for a ...
AWS re:Invent 2016: Host a massively scalable website around the world for a ...
 
AWS re:Invent 2016: Journeys to the Cloud: Different Experiences in Video (CT...
AWS re:Invent 2016: Journeys to the Cloud: Different Experiences in Video (CT...AWS re:Invent 2016: Journeys to the Cloud: Different Experiences in Video (CT...
AWS re:Invent 2016: Journeys to the Cloud: Different Experiences in Video (CT...
 
Bluesoft @ AWS re:Invent 2017 + AWS 101
Bluesoft @ AWS re:Invent 2017 + AWS 101Bluesoft @ AWS re:Invent 2017 + AWS 101
Bluesoft @ AWS re:Invent 2017 + AWS 101
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Intro to Batch Processing on AWS - DevDay Los Angeles 2017
Intro to Batch Processing on AWS - DevDay Los Angeles 2017Intro to Batch Processing on AWS - DevDay Los Angeles 2017
Intro to Batch Processing on AWS - DevDay Los Angeles 2017
 
AWS re:Invent 2016: What’s New with AWS Lambda (SVR202)
AWS re:Invent 2016: What’s New with AWS Lambda (SVR202)AWS re:Invent 2016: What’s New with AWS Lambda (SVR202)
AWS re:Invent 2016: What’s New with AWS Lambda (SVR202)
 
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
 
AWS and Serverless with Alexa
AWS and Serverless with AlexaAWS and Serverless with Alexa
AWS and Serverless with Alexa
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWS
 
AWS Innovate 2016 : Opening Keynote - Glenn Gore
AWS Innovate 2016 :  Opening Keynote - Glenn GoreAWS Innovate 2016 :  Opening Keynote - Glenn Gore
AWS Innovate 2016 : Opening Keynote - Glenn Gore
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
DevOps at Amazon: A Look at Our Tools and Processes by Matthew Trescot, Manag...
DevOps at Amazon: A Look at Our Tools and Processes by Matthew Trescot, Manag...DevOps at Amazon: A Look at Our Tools and Processes by Matthew Trescot, Manag...
DevOps at Amazon: A Look at Our Tools and Processes by Matthew Trescot, Manag...
 
Media Workloads on AWS
Media Workloads on AWSMedia Workloads on AWS
Media Workloads on AWS
 
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 

Ähnlich wie AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Migrate & Modernize Legacy Microsoft Applications with Containers in Thai

Ähnlich wie AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Migrate & Modernize Legacy Microsoft Applications with Containers in Thai (20)

AWS Summit Singapore - More Containers, Less Operations
AWS Summit Singapore - More Containers, Less OperationsAWS Summit Singapore - More Containers, Less Operations
AWS Summit Singapore - More Containers, Less Operations
 
SRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerSRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and Docker
 
Dive deep into technical enhancements - re:Invent Come to London 2.0
Dive deep into technical enhancements - re:Invent Come to London 2.0Dive deep into technical enhancements - re:Invent Come to London 2.0
Dive deep into technical enhancements - re:Invent Come to London 2.0
 
SRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerSRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and Docker
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Secure your critical workload on AWS
Secure your critical workload on AWSSecure your critical workload on AWS
Secure your critical workload on AWS
 
Semplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWSSemplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWS
 
AWS re:Invent 2016: Running Microservices on Amazon ECS (CON309)
AWS re:Invent 2016: Running Microservices on Amazon ECS (CON309)AWS re:Invent 2016: Running Microservices on Amazon ECS (CON309)
AWS re:Invent 2016: Running Microservices on Amazon ECS (CON309)
 
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Deep Dive on Microservices and Docker
Deep Dive on Microservices and DockerDeep Dive on Microservices and Docker
Deep Dive on Microservices and Docker
 
AWS re:Invent 2016: Deploying Scalable SAP Hybris Clusters using Docker (CON312)
AWS re:Invent 2016: Deploying Scalable SAP Hybris Clusters using Docker (CON312)AWS re:Invent 2016: Deploying Scalable SAP Hybris Clusters using Docker (CON312)
AWS re:Invent 2016: Deploying Scalable SAP Hybris Clusters using Docker (CON312)
 
Microservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigliMicroservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigli
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
ServerlessConf Tokyo キーノート
ServerlessConf Tokyo キーノートServerlessConf Tokyo キーノート
ServerlessConf Tokyo キーノート
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
Verizon: Modernizing Enterprise Infrastructure with AWS - WIN307 - re:Invent ...
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
 
AWS Partner ConneXions Taiwan - Q3 2016 Technology Update
AWS Partner ConneXions Taiwan - Q3 2016 Technology UpdateAWS Partner ConneXions Taiwan - Q3 2016 Technology Update
AWS Partner ConneXions Taiwan - Q3 2016 Technology Update
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 

Mehr von Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Migrate & Modernize Legacy Microsoft Applications with Containers in Thai

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kitisak Sriprasert Solutions Architect, Amazon Web Services นักสร ้างสมัยใหม่ (Level 300) เพิ1มคอนเทนเนอร์ ลดปฏิบัติการ
  • 2. Let’s Talk About Microservices
  • 3. What are Microservices? Microservices are an architectural and organizational approach to software development in which software is composed of small, independent services that communicate over well-defined APIs. These services are owned by small, self-contained teams. Whitepaper: http://bit.ly/2A0qGdt - Running Containerized Microservices on AWS
  • 4. Monolithic -> Microservices webserver .package Order UI Order service Inventory service Shipping service Order UI Inventory service Order service Shipping service
  • 6. Tenets of Microservices Architectures Do one thing wellIndependent Decentralized Black box Polyglot You build it, you run it
  • 7. Benefits of Microservices Architecture Agility Flexible scaling Easy deployment Technology freedom Reusable code Resilience
  • 8. Any app, any language Containers Are a Perfect Fit! Image is the version Test and deploy same artifact Stateless servers decrease change risk Self-contained services CI/CD pipelines CONTAINER ENGINE Simple to model services
  • 10. Run containerized Docker applications in production AMAZON ECS
  • 11. Production Workloads on AWS AWS VPC networking mode Advanced task placement Deep integration with AWS platform ECS CLI…{ } Global footprint Powerful scheduling engines Auto scaling CloudWatch metrics Load balancers Linux & Windows
  • 12. Amazon ECS EC2 INSTANCES ECS AGENT TASK CONTAINER TASK CONTAINER ECS AGENT TASK CONTAINER TASK CONTAINER AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK CONTAINER TASK CONTAINER INTERNET LOAD BALANCER LOAD BALANCER
  • 13. 63% of Kubernetes workload run on Amazon Web Services today - CNCF 2017 Survey https://www.cncf.io/blog/2017/06/28/survey-shows-kubernetes-leading-orchestration-platform/ https://www.cncf.io/blog/2017/12/06/cloud-native-technologies-scaling-production-applications/
  • 14. E L A S T I C C O N TA I N E R S E R V I C E F O R K U B E R N E T E S (EKS)
  • 16. Enable Focus On Applications
  • 17. Run containers without managing servers or clusters AWS FARGATE
  • 18. AWS Fargate No instances to manage Task native API Resource- based pricing Simple, easy to use, powerful, and new consumption model =
  • 19. Scheduling and Orchestration Cluster Manager Placement Engine ECS AMI Docker agent ECS agent EC2 Instance ECS AMI Docker agent ECS agent EC2 Instance ECS AMI Docker agent ECS agent EC2 Instance
  • 20. AMAZON CONTAINER SERVICES Choose your orchestration tool1 Choose your launch type2 ECS EKS EC2 Fargate EC2 Fargate
  • 22. ● >400 services currently deployed ● >80 container instances ● >50,000 deploys ● 6 clusters ● 2 regions Building a platform on Amazon ECS
  • 23. More Containers, More Operations?
  • 24. More Containers, More OperationsLESS
  • 26. Continuous Deployment AWS CodeCommit AWS CodePipeline AWS CodeBuild Amazon ECR Amazon ECS AWS CloudFormation 1. Commit Code 2. Trigger Pipeline 5.UpdateStack 6. Update Service 4. Push Image 3.BuildArtifact
  • 28. Automatic Service Scaling Publish metrics Auto Scaling ECS service Availability Zone A Availability Zone B TASK A Add/Remove ECS tasks TASK C TASK BScaling Policies Amazon CloudWatch Amazon ECS Application Load Balancer
  • 30. Secrets Management •prod.app1.db-pass •general.license-code •prod.app2.user-name ECS Cluster EC2 Instance EC2 Instance TASK A TASK B TASK B EC2 System Manager – Parameter Store
  • 32. Step Functions and Containers Container workflows Video transcoding
  • 34. Find endpoints, then connect Functional calls Application communication is evolving Known endpoints, APIs
  • 35. Developers need to connect micro services Build apps invoking other services by name Ensure that service name resolves to correct IP/port DEV OPS
  • 36. “Where is Service X?” Friendly name -> IP + port E.g., app: {10.0.4.5:8080, 10.0.4.6:8080 } What is Service Discovery? Service registry is a database populated with information on how to dispatch requests to microservice instances.
  • 37. Why is it non trivial? Dynamic by design: Number of containers & instances Auto assigned IP addresses & ports Placement, scheduling, scaling Deployments and upgrades Health and connectivity
  • 38. SERVICE A INSTANCE 1 SERVICE B INSTANCE 1 CLIENT How to contact you? What’s your IP+Port? How to contact you? What’s your IP+Port?
  • 39. SERVICE A INSTANCE 1 SERVICE B INSTANCE 1 CLIENT Which one is available? SERVICE A INSTANCE 2 SERVICE B INSTANCE 1 Which one is available?
  • 40. SERVICE A INSTANCE 1 CLIENT SERVICE A INSTANCE 2 SERVICE B INSTANCE 1 SERVICE B INSTANCE 2 Service removed!
  • 41. SERVICE A INSTANCE 1 SERVICE B INSTANCE 1 CLIENT SERVICE A INSTANCE 2 SERVICE B INSTANCE 2 NEW DEPLOYMENT! SERVICE C INSTANCE 1 SERVICE C INSTANCE 2
  • 42. Current patterns require install, setup and management Load Balancers Key-value store Service Mesh Service registry
  • 43. Decision Criteria Service Registry Discovery Mechanism Registration Mechanism Self-registration Server-side Discovery Third-party Registration Client-side Discovery
  • 44. Can We Make It Simpler? Predictable Names for services Auto updated with latest, healthy IP, port Managed: No overhead of installation or monitoring High availability, high scale Extensible: Flexible boundaries for auto discovery
  • 46. You build apps where services are invoked by name & name resolves to IP/port dynamically You turn on service discovery during deployment — service creation DEV OPS
  • 48. Route 53 provides Service Registry Route 53 provides APIs to create • Namespace • CNAME per service autoname • A records per task IP • SRV records per task IP + portService CNAME: A / SRV record Namespace
  • 49. ECS schedules & places service endpoints ECS Scheduler updates on: • Service scaling • Task registrations • Task de-registrations • Task health • Scheduling / Placement changes • ECS instance changes ECS maintains latest state of the dynamic environment in Service Registry Cluster: myapp app IP web IP app IP web IP AZ 1 AZ 2
  • 50. ECS updates service endpoints in Route 53 Cluster: myapp AZ 1 AZ 2 app 10.0.6.5:8080 web 10.0.8.6:8080 app 10.0.4.5:8080 web 10.0.3.6:8080 Namespace: myapp.local Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 Service app.myapp.local CNAME 10.0.6.5:8080 10.0.8.6:8080
  • 51. Services connect to latest endpoints via DNS Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 app >dig web.myapp.local > 10.0.4.5:8080 > app web web Cluster: myapp DNS Server: AZ 1 AZ 2
  • 52. Benefits of this approach Cluster: myapp AZ 1 AZ 2 Service Namespace Managed Just turn on Highly available Tied to Route 53 availability, scale Extensible Public APIs that can be used across AWS Works across clusters, accounts, AZs Works across AWS services
  • 53. Enables these use cases 1 Blue green deployments • myapp.staging.local • myapp.prod.local • Private IP • abstract cluster details 2 Internal micro services • web.myapp.local • Expose Private IP 3 External micro services • web.myapp.mycompany.com • Expose public IP or ELB EIP • network + container health check 4 Across ECS & EKS • Service1.myapp.ecs • Service2.myapp.eks 5 Across ECS & AWS & onPrem • Service1.myapp.ecs • Service2.myapp.ec2 • Service3.myapp.onprem 6 Expose to service mesh • Service1.myapp.local • Service2.myapp.local
  • 54. More Containers, More OperationsLESS
  • 55. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kitisak Sriprasert Solutions Architect, Amazon Web Services ย ้ายเลย! ย ้ายข ้อมูลไปยัง AWS (ระดับ 200) ย ้ายและพัฒนาแอปพลิเคชัน Microsoft เดิมให ้ทันสมัยด ้วยคอนเทนเนอร์
  • 56. VM Container Who is this new kid in town?
  • 57. Server Host OS Hypervisor Server Host OS VM Containers Guest OS Lib,bin App VM 1 C 1 AppGuest OS Lib,bin App VM 2 C 2 App C 3 App C 4 App C 5 App C 6 App Common bin,lib Common bin,lib OS Image 1 OS Image 2 Docker Images Running Containers 2 Apps Vs 6 Apps
  • 58. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why do we care? https://pixabay.com/en/baby-boy-child-childhood-computer-84626/
  • 59. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bob
  • 60. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customers AWS cloud Identity Federation Active Directory Microsoft Technologies on AWS AWS Tools for Windows PowerShell MSFT SCVMM Plug-in 2008 Today Innovation CustomerAdoption WS 2008 & SQL Server 2008 WS 2003 .NET SDK WS 2008 R2 SQL Server 2008 R2 Visual Studio Toolkit EC2 Dedicated Instances (BYOL) MSFT SCOM plug-in release Amazon RDS adds SQL Server WS 2012 & SQL Server 2012 EC2 Run Command EC2 Dedicated Hosts (BYOL) MSFT SharePoint 2016 (Marketplace) AWS Directory Service WS & SQL 2016 EC2 Systems Manager .NET on Lambda Buy license included instances Bring your own licenses Licensing
  • 63. Windows Instance Example m4.4xlarge -> $1.736/hr (SIN) m4.xlarge -> $0.434/hr (SIN) CPU Utilization ~ 15% Change Instance Type CPU Utilization ~60% Still has ~40% head room 75% Savings
  • 64. Bring Your Own License (BYOL) – Windows Server Running two m4.4xlarge instances ~2500 USD On Demand ~1600 USD 3 Year Reservation 36% Savings ~1600 USD 3 Year Reservation ~800 USD Dedicated Host Reserved Instance 50% Savings
  • 65. m4.4xlarge 25% Utilization m4.large 50% Utilization ~1200 USD ~800 USD m4.large 50% Utilization m4.large 50% Utilization m4.large 50% Utilization 33% Savings m4.4xlarge 75% Utilization How can I isolate?
  • 66. So far what we found Reserved instances Bigger instances Right sizing Easy deployment Easy Patching Isolation Increase Utilization Savings Headache Free IT
  • 68. Slicing & Isolating Resources 12am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am Job 1 Job 2 Job 3
  • 69. Slicing & Isolating Resources docker run -d --cpu-percent 10 mycompany/myapp c:AppBatch.exe 12am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am Job 1 Job 2 Job 3
  • 70. Demo
  • 71. Docker Images & Layers Application 1 Application 2 Layer 110GB Layer 22GB Layer 350MB Layer 410MB Layer 320MB Layer 45MB Shared Layers
  • 72. Patching and Maintenance My application 1 layer version 10 version 200 My application 2 layer ASP.NET:latest Windows Server:latest
  • 73. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 74. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CC https://pixabay.com/en/container-port-loading-stacked-3118783/
  • 76. Set of containers E.g. SQL server, Web sites instance instance instance instance Cluster Constrains E.g. HR, Finance, Instance Size Resource Demand E.g. Memory, CPU Task
  • 77. instance instance instance instance Cluster Task Service How many task? Deployment Strategy? Auto scaling Strategy?
  • 78. Amazon ECS Amazon ECS Example Deployment Bin Packing Balance Spread
  • 79. instance instance instance instance Cluster Service 1 Service 2 Service 3 Service N
  • 80. Efficiency | Agility | Automation I want…
  • 81. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CI/CD Pipeline Microsoft Visual Studio Application Load Balancer v 1 v 1 container container Microsoft TFS Build Agent Amazon ECR Amazon ECS container container v 2 v 2 Security Checks Unit Test
  • 82. Demo
  • 83. What we learnt 1/3 Containers CC https://pixabay.com/en/container-port-loading-stacked-3118783/
  • 84. What we learnt 2/3 Isolation CC https://pixabay.com/en/horse-barn-the-horses-are-stallion-2649609/
  • 85. What we learnt 3/3 Automation https://commons.wikimedia.org/wiki/File:KUKA_Industrial_Robots_IR.jpg