SlideShare a Scribd company logo
1 of 28
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Performance Management
(APM) on AWS
Ramesh Dwarakanath, Solutions Architect
November 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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why APM is important?
Every application is unique
Libraries
Programing
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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1
2
3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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]
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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
spreads across
multiple regions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Logging vs UDP Latency
EC2: t2.micro; EBS: 8GB, GP2
EC2: m4.large; EBS: 8GB, GP2
Source code:PUT LINK HERE
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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: PutLogsEvents,
PutMetricData, PutTraceSegment,
PutTelemetryRecords, etc.
•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.
Thank you!
R a m e s h D w a r a k a n a t h
`

More Related Content

What's hot

Serverless DevOps to the Rescue - SRV330 - re:Invent 2017
Serverless DevOps to the Rescue - SRV330 - re:Invent 2017Serverless DevOps to the Rescue - SRV330 - re:Invent 2017
Serverless DevOps to the Rescue - SRV330 - re:Invent 2017Amazon Web Services
 
GPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital MarketsGPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital MarketsAmazon Web Services
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSAmazon Web Services
 
Getting Started with AWS for Developers
Getting Started with AWS for DevelopersGetting Started with AWS for Developers
Getting Started with AWS for DevelopersAmazon Web Services
 
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...Amazon Web Services
 
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSCON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSAmazon Web Services
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupAmazon Web Services
 
SID301_Using AWS Lambda as a Security Team
SID301_Using AWS Lambda as a Security TeamSID301_Using AWS Lambda as a Security Team
SID301_Using AWS Lambda as a Security TeamAmazon Web Services
 
CON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesCON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesAmazon Web Services
 
GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...
GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...
GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...Amazon Web Services
 
Build your case for the cloud and engage your business stakeholders
Build your case for the cloud and engage your business stakeholdersBuild your case for the cloud and engage your business stakeholders
Build your case for the cloud and engage your business stakeholdersAmazon Web Services
 
SID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and AlexaSID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and AlexaAmazon Web Services
 
SRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the EdgeSRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the EdgeAmazon Web Services
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Amazon Web Services
 
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)Amazon Web Services
 
ARC214_Addressing Your Business Needs with AWS
ARC214_Addressing Your Business Needs with AWSARC214_Addressing Your Business Needs with AWS
ARC214_Addressing Your Business Needs with AWSAmazon Web Services
 
規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐Amazon Web Services
 
IOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTIOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTAmazon 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 ServicesAmazon Web Services
 

What's hot (20)

Serverless DevOps to the Rescue - SRV330 - re:Invent 2017
Serverless DevOps to the Rescue - SRV330 - re:Invent 2017Serverless DevOps to the Rescue - SRV330 - re:Invent 2017
Serverless DevOps to the Rescue - SRV330 - re:Invent 2017
 
GPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital MarketsGPSTEC305-Machine Learning in Capital Markets
GPSTEC305-Machine Learning in Capital Markets
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWS
 
Getting Started with AWS for Developers
Getting Started with AWS for DevelopersGetting Started with AWS for Developers
Getting Started with AWS for Developers
 
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
 
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSCON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
SID301_Using AWS Lambda as a Security Team
SID301_Using AWS Lambda as a Security TeamSID301_Using AWS Lambda as a Security Team
SID301_Using AWS Lambda as a Security Team
 
CON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesCON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized Services
 
GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...
GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...
GPSTEC321_VMware on AWS Cloud Technical Deep Dive & Native AWS Services Integ...
 
Build your case for the cloud and engage your business stakeholders
Build your case for the cloud and engage your business stakeholdersBuild your case for the cloud and engage your business stakeholders
Build your case for the cloud and engage your business stakeholders
 
SID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and AlexaSID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and Alexa
 
SRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the EdgeSRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the Edge
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
 
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
 
ARC214_Addressing Your Business Needs with AWS
ARC214_Addressing Your Business Needs with AWSARC214_Addressing Your Business Needs with AWS
ARC214_Addressing Your Business Needs with AWS
 
規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐
 
IOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTIOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoT
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
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
 

Similar to Application Performance Management on AWS

Application Performance Management on AWS - ARC317 - re:Invent 2017
Application Performance Management on AWS - ARC317 - re:Invent 2017Application Performance Management on AWS - ARC317 - re:Invent 2017
Application Performance Management on AWS - ARC317 - re:Invent 2017Amazon 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-RayAmazon 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 TalksAmazon Web Services
 
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
 
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 2017Amazon 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.pdfAmazon Web Services
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Brendan Bouffler
 
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
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWSDonnie Prakoso
 
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...Amazon Web Services
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural PatternsAmazon Web Services
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural PatternsAdrian Hornsby
 
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 TalksAmazon Web Services
 
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 2018AWS Germany
 
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...Amazon Web Services
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveAmazon Web Services
 
What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017Amazon Web Services
 
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...Amazon Web Services
 

Similar to Application Performance Management on AWS (20)

Application Performance Management on AWS - ARC317 - re:Invent 2017
Application Performance Management on AWS - ARC317 - re:Invent 2017Application Performance Management on AWS - ARC317 - re:Invent 2017
Application Performance Management on AWS - ARC317 - re:Invent 2017
 
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
 
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...
 
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
 
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...
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWS
 
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
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
 
Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
 
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
 
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
 
What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017
 
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 

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 FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon 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
 
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 WorkloadsAmazon 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 sfatareAmazon 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 NodeJSAmazon 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 webAmazon 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 sfatareAmazon 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 AWSAmazon 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 DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon 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 ServiceAmazon 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

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application Performance Management (APM) on AWS Ramesh Dwarakanath, Solutions Architect November 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. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why APM is important? Every application is unique Libraries Programing 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. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1 2 3
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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 spreads across multiple regions
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Logging vs UDP Latency EC2: t2.micro; EBS: 8GB, GP2 EC2: m4.large; EBS: 8GB, GP2 Source code:PUT LINK HERE
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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: PutLogsEvents, PutMetricData, PutTraceSegment, PutTelemetryRecords, etc. •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. Thank you! R a m e s h D w a r a k a n a t h `