0% found this document useful (0 votes)
28 views66 pages

Building Modern Applications On AWS

The document discusses key principles for building modern, cloud native applications on AWS. It outlines five principles: 1) build and ship features faster through containerization and microservices, 2) pay for resources on demand through the cloud rather than provisioning for peak usage, 3) implement self-service APIs and automation rather than requesting access to resources, 4) dynamically scale resources up and down for high utilization and cost savings, and 5) design loosely coupled microservices to reduce the impact of failures. The document also discusses how containers, cloud infrastructure, and culture enable these principles.

Uploaded by

Vivek Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views66 pages

Building Modern Applications On AWS

The document discusses key principles for building modern, cloud native applications on AWS. It outlines five principles: 1) build and ship features faster through containerization and microservices, 2) pay for resources on demand through the cloud rather than provisioning for peak usage, 3) implement self-service APIs and automation rather than requesting access to resources, 4) dynamically scale resources up and down for high utilization and cost savings, and 5) design loosely coupled microservices to reduce the impact of failures. The document also discusses how containers, cloud infrastructure, and culture enable these principles.

Uploaded by

Vivek Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 66

SRV 205

Architectures and Strategies for


Building Modern Applications on AWS

Nathan Peck
Developer Advocate, Container Services
@nathankpeck

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“…application is container-based”

Key Primitives
of a Modern “…dynamically managed…”
Application?

…microservice oriented…”

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“…application is container-based”

Key Primitives
of a Modern “…dynamically managed…”
Cloud Native
Application?

…microservice oriented…”

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why Building Cloud Native Matters

Speed Scale Resiliency

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Key Building Blocks for Success

Containers + Cloud Culture


Functions
Key Building Blocks for Success

Containers + Cloud Culture


Functions
Time to Value

The fast faster than


companies are 440x the slow
We found that, compared to low
performers, high performers have:
46x more frequent code deployments
440x faster lead time from commit to deploy
96x faster mean time to recover from downtime
5.0x lower change failure rate (changes are 1/5 as likely to fail)

https://puppet.com/resources/whitepaper/state-of-devops-report
Ship features, not just code
Containers Enable Fast Deployments
Deploy frequency (# of deploys per year)

1,600

1,200

800

400

0
2014 2015 2016 2017
High performers Low performers

https://puppet.com/resources/whitepaper/state-of-devops-report
Containers Enable Immutable
Changes/Rollback

Mean time to recover (hours) Change failure rate (percentage)

100 60
80 50
40
60
30
40
20
20 10
0 0

2014 2015 2016 2017 2014 2015 2016 2017


High performers Low performers

https://puppet.com/resources/whitepaper/state-of-devops-report
Cloud Native Principle #1
Cloud Native Applications enable
high functioning organizations to
build and
ship features faster!
Key Building Blocks for Success

Containers + Cloud Culture


Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cloud Native Architecture

Pay as Self- Elastic


you go Service
Data Center Native
Architecture

DATA CENTER
Data Center Native
Infrastructure
Architecture
Lives for years

DATA CENTER
Cloud Migration
Pay as you go

Pay up front and Pay a month later for


depreciate over the number of seconds
three years used
d at a
an d
ns
t io
p l i ca
Ap

DATACENTER
Cloud Native Principle #2
Pay for what you used last month, not what
you guess you will need next year.
Enable teams to experiment and fail fast,
without significant investment.
File tickets and wait Self service,
for every step on-demand, no delays

! !

VS
File tickets and wait Self service,
for every step on-demand, no delays

! !
Deploy by filing a Deploy by making an
ticket and waiting VS API call self service
days or weeks within minutes
Cloud Native Principle #3
Self service, API driven, automated.
Move from request tickets at every step to
self-service APIs and tools that empower
teams.
Elasticity

DATA CENTER CLOUD


Hard to get over 10% utilization— need Target over 40% utilization—
extra capacity in case of peak. and scale on demand for any size
workload.
Cloud Native Principle #4
Turn it off when it’s idle.
Scale for workloads of any size.
Many times higher utilization.
Huge cost savings.
Resiliency

Blast Loosely Geographically


Radius Coupled Distributed
Microservices limit “blast radius”
for software incidents
Build and deploy loosely coupled services.
Enable teams to move fast independently.
Reduce blast radius via service and deployment
isolation.
Cloud Native Principle #5
Microservices reduce blast radius, can
improve MTTR, and support globally
distributed deployment models.
Key Building Blocks for Success

Containers + Cloud Culture


Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“You don’t add innovation to a
culture, you get out of its way.”
—Adrian Cockcroft, VP Cloud Architecture Strategy, AWS

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Organization Transformation
“…teams build software that patterns
their organizational structure…”
—Conway’s Law
“You build it, you run it.”
—Werner Vogels, VP & CTO Amazon.com
“Not what happens IF it fails,
but what happens WHEN it fails.”
—Nora Jones, Author, and Sr. Chaos Engineer at Netflix
Principals of Modern, Cloud Native Apps

Containers + Cloud Culture


Functions
So What Does A Modern App Look Like?

How you run and How it How you


interact with it integrates monitor it

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda

Bring your own code Simple resource model


• Node.js, Java, Python, • Select power rating
C#, Go from 128 MB to 3 GB
• Bring your own libraries • CPU and network allocated
(even native ones) proportionately

Flexible use Flexible authorization


• Synchronous or • Securely grant access to
asynchronous resources and VPCs
• Integrated with other AWS • Fine-grained control for
services invoking your functions

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda

Authoring functions Monitoring and logging


• WYSIWYG editor or upload • Metrics for requests,
packaged .zip errors, and throttles
• Third-party plugins (Eclipse, • Built-in logs to Amazon
Visual Studio) CloudWatch Logs

Programming model Stateless


• Use processes, threads, /tmp, • Persist data using external
sockets normally storage
• AWS SDK built in • No affinity or access to
(Python and Node.js) underlying infrastructure

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“Using AWS Lambda, we’ve
increased cost efficiency
by a factor of two”
—Tim Griesbach, Senior Director of Technology, FINRA
FINRA performs
500 Billion validations daily
using AWS Lambda

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda preforms
Amazon SQS record validations

Contr
Controller on EC2 olle
Amazon Lamb r manages
da pro
cess
RDS
Amazon
SQS
Amazon
SQS

Logs to
CloudWatch
Logs

Consumers Amazon
S3 Co
p y
fil
es
t oS
3

Incoming files to NAS


be audited FTP

On-premises data center

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Elastic Container Service (ECS)

Container-Level Global footprint


Networking

Powerful
Advanced task scheduling engines
placement

Auto scaling
Deep integration
with AWS platform
CloudWatch metrics

{…} ECS CLI


Load balancers

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
McDelivery

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Critical Business Requirements

Speed to market

Scalability and reliability

Multi-country support and integration

Cost sensitivity

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Key Architecture Principles

Microservices

Containers and orchestration

PaaS

Synchronous and event based

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Menu and
Restaurant Amazon Amazon ElastiCache Amazon
Master SQS RDS (Redis) S3

Restaurant

Microservice 1 Microservice 2

Auto Scaling Group Auto Scaling Group


Multi-AZ Multi-AZ

Amazon ECS
Third-party
Delivery Platforms
Application Load Balancer

McD API Middleware

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Built entire system in months, all on AWS

Out of the box integration and deployment models with


ECS simplified DevOps pipeline

Open platform that integrates with any restaurant and


global delivery partners

Over 20K transactions per second, sub


100 millisecond latency

Cost effective, even with extremely low transaction


values

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Enable Focus on Applications
Introducing
AWS Fargate!
Simple,
easy to use,
powerful
consumption
model
No instances Container Resource
to manage native API based pricing

Fargate
Running a Container
Running Containers

EC2 Instance EC2 Instance EC2 Instance EC2 Instance EC2 Instance

Task Task Task Task Task Task Task Task Task Task

Task Task Task Task Task Task Task Task Task Task
EC2 Instance

ECSTask ECSTask

ECSTask ECSTask

ECS Docker ECS


agent agent AMI
Running Containers at Scale with ECS

Scheduling and Orchestration

Amazon Cluster Manager Placement Engine


E C S

Availability Zone #1 Availability Zone #2 Availability Zone #3


Scheduling and Orchestration

Amazon Cluster Manager Placement Engine


E C S

EC2 Instance EC2 Instance EC2 Instance

ECS Docker ECS ECS Docker ECS ECS Docker ECS


agent agent AMI agent agent AMI agent agent AMI
Get Started in Minutes
Entire website runs as microservices. Ruby &
GraphQL backend with node.js frontend

Needed ability to scale quickly, schedule multi-container


workloads, network layer control

All in on AWS—Moved entire infrastructure to AWS and


Fargate in Jan 2018

Fargate scales quickly with traffic spikes, running


~25 tasks at baseline in production

Ship by Product Hunt


Marketing toolkit for makers to ship products | http://producthunt.com/ship/in/aws-summit
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Public Private
Subnet Subnet

Backend Web External


API External

CDN
Internal
External Background Web
ALB
ALB Frontend Web Internal
External

Card/Scraper
Service
Background Background
Job Queues Workers

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“We moved to Fargate because we need the
ability to scale quickly up from baseline,
run multi-container workloads, and get
fine-grained network control, without
having to manage our own infrastructure.”

Ship by Product Hunt


Marketing toolkit for makers to ship products | http://producthunt.com/ship/in/aws-summit
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Elastic Container Service
for Kubernetes (EKS)
Managed Kubernetes Global footprint
Control Plane

Upstream and certified


Highly available
conformant

Native AWS Integrations On-demand upgrades

Built with the


community Generally available
in 2018

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EKS

Kubectl mycluster.eks.amazonaws.com

AZ 1 AZ 2 AZ 3

EKS Worker Nodes

Your AWS account

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Elastic Container Service
for Kubernetes (EKS)
Managed Kubernetes Global footprint
Control Plane

Upstream and certified


Highly available
conformant

Native AWS Integrations On-demand upgrades

Built with the


community Generally available
in 2018

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Integration: Orchestration

AWS Step Functions


Coordinate the
components of
distributed apps using
visual workflows

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring: Amazon Cloudwatch

Monitor Act Analyze


• Get metrics on • SNS notifications • Visualize through
key resources Dashboards
• Automated alarm
• Observe actions • 1-sec granularity
application and
• Event-driven • Unified
operational health
corrective actions operational view
• Monitor custom
• 15-months of
metrics and log files
data retention

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed
Tracing

AWS X-Ray
• Analyze and debug performance of • Identify specific user impact across • Ready to use in
distributed applications an application production with low
latency in real-time
• View latency distribution and identify • Works across AWS and
performance bottlenecks non-AWS services

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Key Building Blocks for Success

Containers + Cloud Culture


Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Please complete the session survey in the
summit mobile app.

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Submit Session Feedback
1. Tap the Schedule icon. 2. Select the session you 3. Tap Session Evaluation to
attended. submit your feedback.

You might also like