SlideShare a Scribd company logo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Performance
Management (APM) on AWS
Mar c os Or tiz , Solutions Ar c hitec t
N ovember 2017
A R C 3 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to expect from this session
Look at industry
trends impacting
monitoring
How to use Amazon CloudWatch
custom metrics, logs, and AWS
X-Ray to get custom insights
about your application.
Understand some APM
on AWS best practices
See some of those
scenarios in action
Why APM is important
Every application is unique
Libraries
Programming
language
External
Dependencies
Performance
Requirements
Frameworks
Architecture
Synchronous
Asynchronous
Serverless
Containers
Monolithic
Protocols
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Do you really know your application?
Infrastructure
impacts
Bottlenecks
When/how to
scale
New versions
Traffic
volumes
Error rates
How can you manage what you don’t know?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Trends in monitoring
Applications are more dynamic
Complexity is increasing
Increasing business impact
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How to perform APM on AWS
Custom
metrics
Logs
Measurement of
an event
Human-readable
events Amazon CloudWatch Logs
Amazon CloudWatch
Examples
Throughput, error
count, request rate,
request calculations,
queue sizes
Process output,
event correlation,
root cause analysis
AWS service
AWS X-Ray
Traces
Cross-service
view of requests
Review request
behavior, improve
app performance,
service mapping
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The challenge
PutMetricData is a
synchronous HTTP
request. It introduces
latency in your code.
The solution
Use an UDP agent like
collectd or logstash.* **
Amazon CloudWatch custom metrics
*CloudWatch plugin for collectd: https://aws.amazon.com/blogs/aws/new-cloudwatch-plugin-for-collectd/
**CloudWatch output for logstash: https://github.com/logstash-plugins/logstash-output-cloudwatch
Custom metrics architecture
Your app
EC2 instance
UDP
daemon
localhost
UDP
CloudWatch
API
HTTPS
HTTPS
AWS Management Console
EC2 role
DevOps team
HTTPS
Your app
UDP
daemon
localhost
UDP
AWS
credentials
Server
Fire and forget
Decouples metrics
aggregation and
API calls
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The challenge
1. Log centralization
2. Log archive
3. Source code access
and instrumentation
The solution
Use CloudWatch Logs agent.*
CloudWatch custom metrics from logs
*CloudWatch Logs agent reference: http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html
CloudWatch Logs architecture
Your app
EC2 instance
CloudWatch
Logs agent
logs
CloudWatch
API
HTTPS
HTTPS
AWS Management Console
EC2 role
DevOps team
HTTPS
Your app
CloudWatch
Logs agent
AWS
credentials
Server
No need to
change your code
logs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
From CloudWatch Logs to custom metrics
CloudWatch
Logs
Metric filters Custom metric
Works with space-delimited or
JSON log formats.
1
2
3
Filter pattern – Space delimited logs
2017-09-08T22:33:06.877762 INFO 30223 0.001940809
2017-09-08T22:33:07.882269 INFO 73123 0.004267585
2017-09-08T22:33:08.882543 ERROR Random Error
2017-09-08T22:33:09.882809 ERROR Random Error
2017-09-08T22:33:10.887246 INFO 72689 0.004165085
2017-09-08T22:33:11.893134 INFO 98254 0.005619234
2017-09-08T22:33:12.896820 INFO 59771 0.003355367
[recorded_at, severity=INFO, item_count, elapsed_time]
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Filters pattern – Space delimited logs
2017-09-08T22:33:06.877762 INFO 30223 0.001940809
2017-09-08T22:33:07.882269 INFO 73123 0.004267585
2017-09-08T22:33:08.882543 ERROR Random Error
2017-09-08T22:33:09.882809 ERROR Random Error
2017-09-08T22:33:10.887246 INFO 72689 0.004165085
2017-09-08T22:33:11.893134 INFO 98254 0.005619234
2017-09-08T22:33:12.896820 INFO 59771 0.003355367
[recorded_at, severity=ERROR, msg]
Filter pattern – JSON Logs
{"recorded_at":"2017-09-08T22:33:06","severity":"INFO","key1":30223, "key2”:809}
{"recorded_at":"2017-09-08T22:33:07","severity":"INFO","key1":73123, "key2":585}
{"recorded_at":"2017-09-08T22:33:08","severity":"ERROR",”msg":"Random Error"}
{"recorded_at":"2017-09-08T22:33:09","severity":"ERROR",”msg":"Random Error"}
{"recorded_at":"2017-09-08T22:33:10","severity":"INFO","key1":72689, "key2":85}
{"recorded_at":"2017-09-08T22:33:11","severity":"INFO","key1":98254, "key2":234}
{"recorded_at":"2017-09-08T22:33:12","severity":"INFO","key1":59771,"key2":367}
{ $.severity = "INFO" }
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CloudWatch Logs subscriptions
CloudWatch
Logs
Lambda
function
Amazon ESSubscription Implement complex
parsing logic
Interact with other AWS
services
Anything you can code
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CloudWatch dashboards
Monitor multiple
resources in a
single view
Even those
resources that
spread across
multiple regions
Logging and UDP latency
EC2: t2.micro; EBS: 8GB, GP2
EC2: m4.large; EBS: 8GB, GP2
https://github.com/awslabs/cloudwatch-xray-apm-demo/blob/master/samples/latency/latency.rb
AWS X-Ray components
User
Amazon API
gateway
AWS Lambda
Amazon
DynamoDB
Amazon
SQS queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS X-Ray graph
AWS X-Ray diagram
Your app
EC2 instance
X-Ray
daemon
localhost
UDP
X-Ray
API
HTTPS
HTTPS
AWS Management Console
EC2 role
DevOps team
HTTPS
Your app
X-Ray
daemon
localhost
UDP
AWS
credentials
Server
Fire and forget
Decouples trace
aggregation and
API calls
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
//demo: putting-it-all-together
MyApp
collectd
Logs
X-Ray daemon
CloudWatch
Logs agent
CloudWatch
API
X-Ray
API
UDP
UDP
HTTPS
HTTPS
EC2 Instance
HTTPS
while true
factorial(n)
fibonacci(n)
log_metrics
udp_send_metrics
udp_send_xray_traces
sleep 1
end
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
https://github.com/awslabs/cloudwatch-xray-apm-demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
APM on AWS best practices
•Design your apps to report custom metrics.
•Use an UDP daemon to avoid adding latency.
•Plan carefully your logging and metric strategy.
•Use X-Ray for distributed tracing and
troubleshooting.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
APM on AWS best practices
•Deliver CloudWatch dashboards, alarms, and
self-healing automation as part of your app.
•Be aware of service limits such as
PutLogsEvents, PutMetricData,
PutTraceSegment, PutTelemetryRecords.
•Leverage AWS service’s metrics together with
your own custom metrics.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Remember
Everything fails
all the time.
Werner Vogels, Amazon CTO
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Resources
https://aws.amazon.com/answers/logging/centralized-logging/
https://github.com/awslabs/cloudwatch-logs-centralize-logs
https://github.com/awslabs/cloudwatch-logs-customize-alarms
https://github.com/awslabs/cloudwatch-logs-analyze-data
https://github.com/awslabs/cloudwatch-dashboards-cloudformation-sample
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Complete your evaluations
Remember to complete
your evaluations in the
mobile app!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
M a r c o s O r t i z
`

More Related Content

What's hot

Metering the Hybrid Cloud - ARC404 - re:Invent 2017
Metering the Hybrid Cloud - ARC404 - re:Invent 2017Metering the Hybrid Cloud - ARC404 - re:Invent 2017
Metering the Hybrid Cloud - ARC404 - re:Invent 2017
Amazon Web Services
 
DVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational TransformationDVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational Transformation
Amazon Web Services
 
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesCMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
Amazon Web Services
 
Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)
Amazon Web Services
 
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon KinesisABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
Amazon Web Services
 
GPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital MarketsGPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital Markets
Amazon Web Services
 
Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017
Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017
Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017
Amazon Web Services
 
ARC207_Monitoring Performance of Enterprise Applications on AWS
ARC207_Monitoring Performance of Enterprise Applications on AWSARC207_Monitoring Performance of Enterprise Applications on AWS
ARC207_Monitoring Performance of Enterprise Applications on AWS
Amazon Web Services
 
Optimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWSOptimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWS
Amazon Web Services
 
NET309_Best Practices for Securing an Amazon Virtual Private Cloud
NET309_Best Practices for Securing an Amazon Virtual Private CloudNET309_Best Practices for Securing an Amazon Virtual Private Cloud
NET309_Best Practices for Securing an Amazon Virtual Private Cloud
Amazon Web Services
 
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot FleetCMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
Amazon Web Services
 
STG203_Get Rid of Tape and Modernize Backup with AWS
STG203_Get Rid of Tape and Modernize Backup with AWSSTG203_Get Rid of Tape and Modernize Backup with AWS
STG203_Get Rid of Tape and Modernize Backup with AWS
Amazon Web Services
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
Amazon Web Services
 
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
Amazon Web Services
 
AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017
Amazon Web Services
 
MBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real WorldMBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real World
Amazon Web Services
 
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
Amazon Web Services
 
Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017
Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017
Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017
Amazon Web Services
 
Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...
Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...
Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...
Amazon Web Services
 
How to Determine If You Are Well Architected for Resiliency (or How I Learned...
How to Determine If You Are Well Architected for Resiliency (or How I Learned...How to Determine If You Are Well Architected for Resiliency (or How I Learned...
How to Determine If You Are Well Architected for Resiliency (or How I Learned...
Amazon Web Services
 

What's hot (20)

Metering the Hybrid Cloud - ARC404 - re:Invent 2017
Metering the Hybrid Cloud - ARC404 - re:Invent 2017Metering the Hybrid Cloud - ARC404 - re:Invent 2017
Metering the Hybrid Cloud - ARC404 - re:Invent 2017
 
DVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational TransformationDVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational Transformation
 
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesCMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
 
Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)
 
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon KinesisABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
 
GPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital MarketsGPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital Markets
 
Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017
Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017
Reinforcement Learning – The Ultimate AI - ARC320 - re:Invent 2017
 
ARC207_Monitoring Performance of Enterprise Applications on AWS
ARC207_Monitoring Performance of Enterprise Applications on AWSARC207_Monitoring Performance of Enterprise Applications on AWS
ARC207_Monitoring Performance of Enterprise Applications on AWS
 
Optimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWSOptimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWS
 
NET309_Best Practices for Securing an Amazon Virtual Private Cloud
NET309_Best Practices for Securing an Amazon Virtual Private CloudNET309_Best Practices for Securing an Amazon Virtual Private Cloud
NET309_Best Practices for Securing an Amazon Virtual Private Cloud
 
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot FleetCMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
 
STG203_Get Rid of Tape and Modernize Backup with AWS
STG203_Get Rid of Tape and Modernize Backup with AWSSTG203_Get Rid of Tape and Modernize Backup with AWS
STG203_Get Rid of Tape and Modernize Backup with AWS
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
 
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
 
AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017
 
MBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real WorldMBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real World
 
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
 
Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017
Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017
Deep-Dive for AWS X-Ray - DEV402 - re:Invent 2017
 
Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...
Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...
Building a Photorealistic Real-Time 3D Configurator with Server-Side Renderin...
 
How to Determine If You Are Well Architected for Resiliency (or How I Learned...
How to Determine If You Are Well Architected for Resiliency (or How I Learned...How to Determine If You Are Well Architected for Resiliency (or How I Learned...
How to Determine If You Are Well Architected for Resiliency (or How I Learned...
 

Similar to Application Performance Management on AWS - ARC317 - re:Invent 2017

Application Performance Management on AWS
Application Performance Management on AWSApplication Performance Management on AWS
Application Performance Management on AWS
Amazon Web Services
 
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
Amazon Web Services
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
Amazon Web Services
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018
Brendan Bouffler
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018
AWS Germany
 
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
Amazon Web Services Korea
 
Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda
Boaz Ziniman
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
AWS Germany
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
Amazon Web Services
 
Accelerating Life Sciences with HPC on AWS - AWS Online Tech Talks
Accelerating Life Sciences with HPC on AWS - AWS Online Tech TalksAccelerating Life Sciences with HPC on AWS - AWS Online Tech Talks
Accelerating Life Sciences with HPC on AWS - AWS Online Tech Talks
Amazon Web Services
 
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Amazon Web Services
 
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-RayDEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
Amazon Web Services
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
Amazon Web Services
 
AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless
Roman Plessl
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
Amazon Web Services
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
Amazon Web Services
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Web Services
 
Building CICD Pipelines for Serverless Applications
Building CICD Pipelines for Serverless ApplicationsBuilding CICD Pipelines for Serverless Applications
Building CICD Pipelines for Serverless Applications
Amazon Web Services
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
Amazon Web Services
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
Adrian Hornsby
 

Similar to Application Performance Management on AWS - ARC317 - re:Invent 2017 (20)

Application Performance Management on AWS
Application Performance Management on AWSApplication Performance Management on AWS
Application Performance Management on AWS
 
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018
 
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
 
Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
Accelerating Life Sciences with HPC on AWS - AWS Online Tech Talks
Accelerating Life Sciences with HPC on AWS - AWS Online Tech TalksAccelerating Life Sciences with HPC on AWS - AWS Online Tech Talks
Accelerating Life Sciences with HPC on AWS - AWS Online Tech Talks
 
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
 
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-RayDEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
 
AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
 
Building CICD Pipelines for Serverless Applications
Building CICD Pipelines for Serverless ApplicationsBuilding CICD Pipelines for Serverless Applications
Building CICD Pipelines for Serverless Applications
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 

More from Amazon Web Services

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...
Amazon Web Services
 
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...
Amazon Web Services
 
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
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon Web Services
 
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
Amazon Web Services
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
Amazon Web Services
 
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...
Amazon Web Services
 
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...
Amazon Web Services
 
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
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon Web Services
 
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
Amazon Web Services
 
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
Amazon Web Services
 
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
Amazon Web Services
 
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
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
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 

More from 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
 

Application Performance Management on AWS - ARC317 - re:Invent 2017

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application Performance Management (APM) on AWS Mar c os Or tiz , Solutions Ar c hitec t N ovember 2017 A R C 3 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What to expect from this session Look at industry trends impacting monitoring How to use Amazon CloudWatch custom metrics, logs, and AWS X-Ray to get custom insights about your application. Understand some APM on AWS best practices See some of those scenarios in action
  • 3. Why APM is important Every application is unique Libraries Programming language External Dependencies Performance Requirements Frameworks Architecture Synchronous Asynchronous Serverless Containers Monolithic Protocols
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Do you really know your application? Infrastructure impacts Bottlenecks When/how to scale New versions Traffic volumes Error rates How can you manage what you don’t know?
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Trends in monitoring Applications are more dynamic Complexity is increasing Increasing business impact
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How to perform APM on AWS Custom metrics Logs Measurement of an event Human-readable events Amazon CloudWatch Logs Amazon CloudWatch Examples Throughput, error count, request rate, request calculations, queue sizes Process output, event correlation, root cause analysis AWS service AWS X-Ray Traces Cross-service view of requests Review request behavior, improve app performance, service mapping
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The challenge PutMetricData is a synchronous HTTP request. It introduces latency in your code. The solution Use an UDP agent like collectd or logstash.* ** Amazon CloudWatch custom metrics *CloudWatch plugin for collectd: https://aws.amazon.com/blogs/aws/new-cloudwatch-plugin-for-collectd/ **CloudWatch output for logstash: https://github.com/logstash-plugins/logstash-output-cloudwatch
  • 8. Custom metrics architecture Your app EC2 instance UDP daemon localhost UDP CloudWatch API HTTPS HTTPS AWS Management Console EC2 role DevOps team HTTPS Your app UDP daemon localhost UDP AWS credentials Server Fire and forget Decouples metrics aggregation and API calls
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The challenge 1. Log centralization 2. Log archive 3. Source code access and instrumentation The solution Use CloudWatch Logs agent.* CloudWatch custom metrics from logs *CloudWatch Logs agent reference: http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html
  • 10. CloudWatch Logs architecture Your app EC2 instance CloudWatch Logs agent logs CloudWatch API HTTPS HTTPS AWS Management Console EC2 role DevOps team HTTPS Your app CloudWatch Logs agent AWS credentials Server No need to change your code logs
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. From CloudWatch Logs to custom metrics CloudWatch Logs Metric filters Custom metric Works with space-delimited or JSON log formats.
  • 12. 1 2 3
  • 13. Filter pattern – Space delimited logs 2017-09-08T22:33:06.877762 INFO 30223 0.001940809 2017-09-08T22:33:07.882269 INFO 73123 0.004267585 2017-09-08T22:33:08.882543 ERROR Random Error 2017-09-08T22:33:09.882809 ERROR Random Error 2017-09-08T22:33:10.887246 INFO 72689 0.004165085 2017-09-08T22:33:11.893134 INFO 98254 0.005619234 2017-09-08T22:33:12.896820 INFO 59771 0.003355367 [recorded_at, severity=INFO, item_count, elapsed_time]
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Filters pattern – Space delimited logs 2017-09-08T22:33:06.877762 INFO 30223 0.001940809 2017-09-08T22:33:07.882269 INFO 73123 0.004267585 2017-09-08T22:33:08.882543 ERROR Random Error 2017-09-08T22:33:09.882809 ERROR Random Error 2017-09-08T22:33:10.887246 INFO 72689 0.004165085 2017-09-08T22:33:11.893134 INFO 98254 0.005619234 2017-09-08T22:33:12.896820 INFO 59771 0.003355367 [recorded_at, severity=ERROR, msg]
  • 15. Filter pattern – JSON Logs {"recorded_at":"2017-09-08T22:33:06","severity":"INFO","key1":30223, "key2”:809} {"recorded_at":"2017-09-08T22:33:07","severity":"INFO","key1":73123, "key2":585} {"recorded_at":"2017-09-08T22:33:08","severity":"ERROR",”msg":"Random Error"} {"recorded_at":"2017-09-08T22:33:09","severity":"ERROR",”msg":"Random Error"} {"recorded_at":"2017-09-08T22:33:10","severity":"INFO","key1":72689, "key2":85} {"recorded_at":"2017-09-08T22:33:11","severity":"INFO","key1":98254, "key2":234} {"recorded_at":"2017-09-08T22:33:12","severity":"INFO","key1":59771,"key2":367} { $.severity = "INFO" }
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CloudWatch Logs subscriptions CloudWatch Logs Lambda function Amazon ESSubscription Implement complex parsing logic Interact with other AWS services Anything you can code
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CloudWatch dashboards Monitor multiple resources in a single view Even those resources that spread across multiple regions
  • 18. Logging and UDP latency EC2: t2.micro; EBS: 8GB, GP2 EC2: m4.large; EBS: 8GB, GP2 https://github.com/awslabs/cloudwatch-xray-apm-demo/blob/master/samples/latency/latency.rb
  • 19. AWS X-Ray components User Amazon API gateway AWS Lambda Amazon DynamoDB Amazon SQS queue
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS X-Ray graph
  • 21. AWS X-Ray diagram Your app EC2 instance X-Ray daemon localhost UDP X-Ray API HTTPS HTTPS AWS Management Console EC2 role DevOps team HTTPS Your app X-Ray daemon localhost UDP AWS credentials Server Fire and forget Decouples trace aggregation and API calls
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. //demo: putting-it-all-together MyApp collectd Logs X-Ray daemon CloudWatch Logs agent CloudWatch API X-Ray API UDP UDP HTTPS HTTPS EC2 Instance HTTPS while true factorial(n) fibonacci(n) log_metrics udp_send_metrics udp_send_xray_traces sleep 1 end
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo https://github.com/awslabs/cloudwatch-xray-apm-demo
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. APM on AWS best practices •Design your apps to report custom metrics. •Use an UDP daemon to avoid adding latency. •Plan carefully your logging and metric strategy. •Use X-Ray for distributed tracing and troubleshooting.
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. APM on AWS best practices •Deliver CloudWatch dashboards, alarms, and self-healing automation as part of your app. •Be aware of service limits such as PutLogsEvents, PutMetricData, PutTraceSegment, PutTelemetryRecords. •Leverage AWS service’s metrics together with your own custom metrics.
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Remember Everything fails all the time. Werner Vogels, Amazon CTO
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Resources https://aws.amazon.com/answers/logging/centralized-logging/ https://github.com/awslabs/cloudwatch-logs-centralize-logs https://github.com/awslabs/cloudwatch-logs-customize-alarms https://github.com/awslabs/cloudwatch-logs-analyze-data https://github.com/awslabs/cloudwatch-dashboards-cloudformation-sample
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Complete your evaluations Remember to complete your evaluations in the mobile app!
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! M a r c o s O r t i z `