SlideShare a Scribd company logo
1 of 38
Download to read offline
Microservice Architecture
on Amazon Web Services
Alex Sinner
Solutions Architect,
Amazon Web Services
@alexsinner
Why Microservices?
http://en.wikipedia.org/wiki/Multitier_architecture
As a Project scales Complexity arises
How to design
smaller services?
Monolithic application vs Microservices
http://martinfowler.com/articles/microservices.html
Business Domain!
+
Loosely Coupled
+
Bounded Context
Microservices
Independent Deployment!
Microservices
Choose the Right Tools!
Microservices
Adopt New Technologies!
Microservices
Culture of Automation!
How small is small?
“something that could be
rewritten in two weeks”
Two Pizza Teams!
Architecture
DevOps
Containers & event-driven computing
Virtual Machine! Container!
Docker on AWS!
Amazon!
Linux!
!
!
A supported and
maintained Linux
image provided by
Amazon Web Services!
!
Amazon EC2
Container
Service!
!
Highly scalable, high
performance container
management service!
!
!
AWS!
Elastic
Beanstalk!
!
For deploying and
scaling web
applications and
services!
!
Amazon EC2 Container Service!
Key Components
Clusters!
Container Instances!
Tasks
Task Definitions
Task Scheduler
Regional
Resource pool
Grouping of Container Instances
Start empty, dynamically scalable
Amazon EC2 Container Service!
Key Components
Clusters
Container Instances!
Tasks
Task Definitions
Task Scheduler
Amazon EC2 instances
Docker daemon
Amazon ECS agent
https://github.com/aws/amazon-ecs-agent
Amazon EC2 Container Service!
Key Components
Container Instances
Clusters
Tasks
Task Definitions
Task Scheduler
Unit of work
Grouping of related Containers
Run on Container Instances
Amazon EC2 Container Service!
Key Components
Container Instances
Clusters
Tasks
Task Definitions!
Task Scheduler!
[
{
"image": "mysql",
"name": "db",
"cpu": 10,
"memory": 500,
…
Tasks are defined via Task Definitions
[!
{!
"image": "tutum/wordpress-stackable",!
"name": "wordpress",!
"cpu": 10,!
"memory": 500,!
"essential": true,!
"links": [!
"db"!
],!
"entryPoint": [!
"/bin/sh",!
"-c"!
],!
"environment": [!
…!
],!
"portMappings": [!
{!
"containerPort": 80,!
"hostPort": 80!
}!
]!
},!
!
!
{!
"image": "mysql",!
"name": "db",!
"cpu": 10,!
"memory": 500,!
"essential": true,!
"entryPoint": [!
"/entrypoint.sh"!
],!
"environment": [!
{!
"name": "MYSQL_ROOT_PASSWORD",!
"value": "pass"!
}!
],!
"portMappings": []!
}!
]!
[!
{!
"image": "tutum/wordpress-stackable",!
"name": "wordpress",!
"cpu": 10,!
"memory": 500,!
"essential": true,!
"links": [!
"db"!
],!
"entryPoint": [!
"/bin/sh",!
"-c"!
],!
"environment": [!
…!
],!
"portMappings": [!
{!
"containerPort": 80,!
"hostPort": 80!
}!
]!
},!
]!
!
{!
"image": "mysql",!
"name": "db",!
"cpu": 10,!
"memory": 500,!
"essential": true,!
"entryPoint": [!
"/entrypoint.sh"!
],!
"environment": [!
{!
"name": "MYSQL_ROOT_PASSWORD",!
"value": "pass"!
}!
],!
"portMappings": []!
}!
]!
From Docker Hub
10 CPU Units (1024 is full CPU),
500 Megabytes of Memory
Environment Variables
No external ports exposed
Tasks are defined via Task Definitions
[!
{!
"image": "tutum/wordpress-stackable",!
"name": "wordpress",!
"cpu": 10,!
"memory": 500,!
"essential": true,!
"links": [!
"db"!
],!
"entryPoint": [!
"/bin/sh",!
"-c"!
],!
"environment": [!
…!
],!
"portMappings": [!
{!
"containerPort": 80,!
"hostPort": 80!
}!
]!
},!
!
[!
{!
"image": "mysql",!
"name": "db",!
"cpu": 10,!
"memory": 500,!
"essential": true,!
"entryPoint": [!
"/entrypoint.sh"!
],!
"environment": [!
{!
"name": "MYSQL_ROOT_PASSWORD",!
"value": "pass"!
}!
],!
"portMappings": []!
}!
]!
Essential to our Task
Docker link to mysql container
Expose port 80 in container
to port 80 on host
Tasks are defined via Task Definitions
Amazon EC2 Container Service!
Key Components
Container Instances
Clusters
Tasks
Task Definitions
Task Scheduler
Long-running services
RunTask for batch jobs
Integrate with 3rd party schedulers
AWS Lambda!
!
Zero Admin!
Event-driven 

Compute Platform!
AWS Lambda!
!
Focus on business logic,!
not infrastructure!
Customer uploads code,
AWS Lambda handles:
Capacity
Scaling
Deployment
Fault tolerance
Monitoring
Logging
. . .
AWS Lambda
Automatic scaling
Customers pay only
for what they use,
no over/under provisioning
AWS Lambda
Fine-grained pricing
Price compute time by 100ms,
even short jobs make sense
Low request charge
No hourly, daily, or monthly minimums
Free tier
Events come in many different shapes & sizes
S3 event
notifications
DynamoDB
Streams
Kinesis events Custom
events
AWS Lambda
Asynchronous Invocation Synchronous Invocation
AWS Lambda
Event RequestResponse
Response
Response
CloudWatch
Logs
vs
Mobile & IoT
AWS Lambda Backends!
Amazon EC2
 Containers
 AWS Lambda
On-Premises
Weeks Minutes Seconds Milliseconds
Infrastructure Scaling
Amazon EC2
 Containers
 AWS Lambda
On-Premises
Low High Higher Highest
Infrastructure Utilization
Thank You!
@alexsinner

More Related Content

What's hot

What's hot (20)

A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
Amazon ECS – Production Docker at Scale
Amazon ECS – Production Docker at ScaleAmazon ECS – Production Docker at Scale
Amazon ECS – Production Docker at Scale
 
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
 
AWS APAC Webinar Week - Introduction to Cloud Computing With Amazon Web Services
AWS APAC Webinar Week - Introduction to Cloud Computing With Amazon Web ServicesAWS APAC Webinar Week - Introduction to Cloud Computing With Amazon Web Services
AWS APAC Webinar Week - Introduction to Cloud Computing With Amazon Web Services
 
Building End to end IoT solutions
Building End to end IoT solutionsBuilding End to end IoT solutions
Building End to end IoT solutions
 
Microservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Web Applications using Amazon AWS CloudMicroservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Web Applications using Amazon AWS Cloud
 
DevOps with Amazon Web Services (November 2016)
DevOps with Amazon Web Services (November 2016)DevOps with Amazon Web Services (November 2016)
DevOps with Amazon Web Services (November 2016)
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 
Mobile Web and App Development with AWS
Mobile Web and App Development with AWSMobile Web and App Development with AWS
Mobile Web and App Development with AWS
 
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
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
 
應用程式迅速開發與串連廣大用戶要素
應用程式迅速開發與串連廣大用戶要素應用程式迅速開發與串連廣大用戶要素
應用程式迅速開發與串連廣大用戶要素
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
From Monolith to Microservices
From Monolith to MicroservicesFrom Monolith to Microservices
From Monolith to Microservices
 
Grow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsGrow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push Notifications
 
"How to optimize the architecture of your platform" by Julien Simon
"How to optimize the architecture of your platform" by Julien Simon"How to optimize the architecture of your platform" by Julien Simon
"How to optimize the architecture of your platform" by Julien Simon
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiectures
 
Getting Started with AWS
Getting Started with AWSGetting Started with AWS
Getting Started with AWS
 

Viewers also liked

Viewers also liked (20)

Effective code reviews
Effective code reviewsEffective code reviews
Effective code reviews
 
Cucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next levelCucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next level
 
A first taste of integration with Apache Camel
A first taste of integration with Apache CamelA first taste of integration with Apache Camel
A first taste of integration with Apache Camel
 
Microservices Architecture: Labs
Microservices Architecture: LabsMicroservices Architecture: Labs
Microservices Architecture: Labs
 
Aws Lambda Cart Microservice Server Less
Aws Lambda Cart Microservice Server LessAws Lambda Cart Microservice Server Less
Aws Lambda Cart Microservice Server Less
 
Are you new to Apache Camel
Are you new to Apache CamelAre you new to Apache Camel
Are you new to Apache Camel
 
Microservices at NewStore
Microservices at NewStoreMicroservices at NewStore
Microservices at NewStore
 
Scaling micro-services Architecture on AWS
Scaling micro-services Architecture on AWSScaling micro-services Architecture on AWS
Scaling micro-services Architecture on AWS
 
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
AWS re:Invent 2016: Microservices, Macro Security Needs: How Nike Uses a Mult...
 
Micro-Service Architectures in E-Commerce environments with SPHERE.IO / comme...
Micro-Service Architectures in E-Commerce environments with SPHERE.IO / comme...Micro-Service Architectures in E-Commerce environments with SPHERE.IO / comme...
Micro-Service Architectures in E-Commerce environments with SPHERE.IO / comme...
 
Enterprise summit – architecting microservices on aws final v2
Enterprise summit – architecting microservices on aws   final v2Enterprise summit – architecting microservices on aws   final v2
Enterprise summit – architecting microservices on aws final v2
 
Microservices with Apache Camel
Microservices with Apache CamelMicroservices with Apache Camel
Microservices with Apache Camel
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
Apache Camel - The integration library
Apache Camel - The integration libraryApache Camel - The integration library
Apache Camel - The integration library
 
Patterns for building resilient and scalable microservices platform on AWS
Patterns for building resilient and scalable microservices platform on AWSPatterns for building resilient and scalable microservices platform on AWS
Patterns for building resilient and scalable microservices platform on AWS
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns
 
Convert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS LambdaConvert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS Lambda
 
Dockercon State of the Art in Microservices
Dockercon State of the Art in MicroservicesDockercon State of the Art in Microservices
Dockercon State of the Art in Microservices
 
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 

Similar to Aws microservice keynote

Similar to Aws microservice keynote (20)

EC2 Container Service
EC2 Container ServiceEC2 Container Service
EC2 Container Service
 
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
 
Tech connect aws
Tech connect  awsTech connect  aws
Tech connect aws
 
Deep Dive:EC2 Container Service
Deep Dive:EC2 Container ServiceDeep Dive:EC2 Container Service
Deep Dive:EC2 Container Service
 
Docker on AWS
Docker on AWSDocker on AWS
Docker on AWS
 
Getting Started with Amazon ECS
Getting Started with Amazon ECSGetting Started with Amazon ECS
Getting Started with Amazon ECS
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
 
Containers and the Evolution of Computing
Containers and the Evolution of ComputingContainers and the Evolution of Computing
Containers and the Evolution of Computing
 
Amazon ECS
Amazon ECSAmazon ECS
Amazon ECS
 
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel AvivEC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in Action
 
Amazon EC2 Container Service
Amazon EC2 Container ServiceAmazon EC2 Container Service
Amazon EC2 Container Service
 
AWS September Webinar Series - Running Microservices with Amazon EC2 Contain...
AWS September Webinar Series -  Running Microservices with Amazon EC2 Contain...AWS September Webinar Series -  Running Microservices with Amazon EC2 Contain...
AWS September Webinar Series - Running Microservices with Amazon EC2 Contain...
 
AWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and Docker
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with Git
 
無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門 無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
 
Making Sense out of Amazon ECS
Making Sense out of Amazon ECSMaking Sense out of Amazon ECS
Making Sense out of Amazon ECS
 
Making Sense Out of Amazon EC2 Container Service
Making Sense Out of Amazon EC2 Container ServiceMaking Sense Out of Amazon EC2 Container Service
Making Sense Out of Amazon EC2 Container Service
 

More from nextbuild (10)

How invariants help writing loops
How invariants help writing loopsHow invariants help writing loops
How invariants help writing loops
 
Microservices in the real world
Microservices in the real worldMicroservices in the real world
Microservices in the real world
 
Asp.net in a new world
Asp.net in a new worldAsp.net in a new world
Asp.net in a new world
 
Meteor - building an email client
Meteor - building an email clientMeteor - building an email client
Meteor - building an email client
 
Swimming upstream in the container revolution
Swimming upstream in the container revolutionSwimming upstream in the container revolution
Swimming upstream in the container revolution
 
Event sourcing your AngularJS applications
Event sourcing your AngularJS applicationsEvent sourcing your AngularJS applications
Event sourcing your AngularJS applications
 
Make color schemes a no brainer with sass
Make color schemes a no brainer with sassMake color schemes a no brainer with sass
Make color schemes a no brainer with sass
 
Cqrs from the trenches
Cqrs from the trenchesCqrs from the trenches
Cqrs from the trenches
 
Architecting for the cloud
Architecting for the cloudArchitecting for the cloud
Architecting for the cloud
 
Finally… reliable software!
Finally… reliable software!Finally… reliable software!
Finally… reliable software!
 

Aws microservice keynote