SlideShare a Scribd company logo
1 of 53
WIFI: awsDevDay | PASS: CodeHappy
U P N E X T :
Distributed Serverless Stack
Tracing and Monitoring
T H A N K S T O O U R F R I E N D S A T :
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kashif Imran, Sr. Solutions Architect AWS
10/10/2017
Distributed Serverless Stack
Tracing and Monitoring
What to expect from the session
• Overview
• Use cases
• API
• Getting started
• Demo
AWS Lambda Concepts
Serverless means…
No servers to provision
or manage
Scales with usage
Never pay for idle Availability and fault
tolerance built in
Never pay for Idle
EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE
Amazon S3 Amazon
DynamoDB
Amazon
Kinesis
AWS
CloudFormation
AWS
CloudTrail
Amazon
CloudWatch
Amazon SNSAmazon
SES
Amazon
API Gateway
Amazon
Cognito
AWS
IoT
Amazon
Alexa
Cron events
DATA STORES ENDPOINTS
REPOSITORIES EVENT/MESSAGE SERVICES
Event Sources that integrate with AWS Lambda
… and the list will continue to grow!
Amazon RDS
Aurora
Common Serverless Use Cases
Web
Applications
• Static websites
• Complex web
apps
• Packages for
Flask and
Express
Data
Processing
• Real time
• MapReduce
• Batch
Chatbots
• Powering
chatbot logic
Backends
• Apps &
services
• Mobile
• IoT
</></>
Amazon
Alexa
• Powering
voice-enabled
apps
• Alexa Skills
Kit
Autonomous
IT
• Policy engines
• Extending
AWS services
• Infrastructure
management
Monolithic
Monolithic vs. Service Oriented Architecture
Service Oriented Architecture
Drawbacks of Monolithic Architecture
Hard to Iterate Fast CI/CD Time ConsumingHard to scale Efficiently
Reliability Challenges
Benefits of Service Oriented Architecture
Increased Agility Easy to Scale Improved Innovation
Reduced Human Errors
Debugging applications
Traditional Debugging
Developer Local Test
Developer
Add
Breakpoints
Add Log
Statements
The traditional process of debugging doesn’t scale well for
production applications or those built using a service-
oriented, microservice, or serverless architecture
It’s tedious, repetitive, and time consuming.
Debug Lambda with CloudWatch
Debug Lambda with CloudWatch…
Debug Lambda with CloudWatch…
Debugging applications with X-Ray
Identify Performance
Bottlenecks
How does AWS X-Ray help?
Pinpoint Specific
Service Issues
Identify Errors Identify Impact to
Users
How X-Ray works
Use cases
Visualize service call graph
Lambda on the AWS X-Ray Service Map
Identify impact
Identify performance bottlenecks
Identify performance bottlenecks
Identify performance bottlenecks
Pinpoint issues
Pinpoint issues
Pinpoint issues
AWS X-Ray Concepts
X-Ray Key Concepts
Trace End-to-end data related a single request across services
Segments Portions of the trace that correspond to a single service
Sub-segments Remote call or local compute sections within a service
Annotations Business data that can be used to filter traces
Metadata Business data that can be added to the trace but not used
for filtering traces
Errors Normalized error message and stack trace
Sampling Percentage of requests to your application to capture as
traces
X-Ray SDK
Available for Java, .NET, and Node.js
Adds filters to automatically captures metadata for calls to:
• AWS services using the AWS SDK
• Non-AWS services over HTTP and HTTPS
• Databases (MySQL, PostgreSQL, and Amazon DynamoDB)
• Queues (Amazon SQS)
Enables you to get started quickly without having to manually
instrument your application code to log metadata about requests
X-Ray Daemon
Receives data from the SDK over UDP and acts as a local buffer.
Data is flushed to the backend every second or when the local
buffer fills.
Available for Amazon Linux AMI, RHEL, Ubuntu, OS X, and
Windows.
Can be run anywhere as long as AWS credentials are provided
(e.g.: EC2, ECS, on premise, developer machine, etc.)
Sampling configuration
{
"rules": {
"move": {
"id": 1,
"service_name": "*",
"http_method": "*",
"url_path": "/api/move/*",
"fixed_target": 0,
"rate": 0.05
},
"base": {
"id": 2,
"service_name": "*",
"http_method": "*",
"url_path": "*",
"fixed_target": 1,
"rate": 0.1
}
}
}
This example defines two rules.
The first rule applies a five-percent sampling rate
with no minimum number of requests to trace to
requests with paths under /api/move
The second overrides the default sampling rule
with a rule that traces the first request each
second and 10 percent of additional requests.
AWS X-Ray API
X-Ray API
Raw trace data is available using batch get APIs.
X-Ray provides a set of APIs to enable you to send, filter, and retrieve
trace data.
You can send trace data directly to the service without having to use
our SDKs. (e.g. you can write your own SDKs for languages/frameworks not currently supported)
You can build your own data analysis applications on top of the data
collected by X-Ray.
X-Ray API
PutTraceSegments Uploads segment documents to AWS X-Ray
BatchGetTraces Retrieves a list of traces specified by ID
GetServiceGraph Retrieves a document that describes services in your
application and their connections
GetTraceSummaries Retrieves IDs and metadata for traces available for a
specified time frame using an optional filter
Segment document
Minimal example
{
"name" : "example.com",
"id" : "70de5b6f19ff9a0a",
"start_time" : 1.478293361271E9,
"trace_id" : "1-581cf771-a006649127e371903a2de979",
"end_time" : 1.478293361449E9
}
Example showing an in-progress segment
{
"name" : "example.com",
"id" : "70de5b6f19ff9a0b",
"start_time" : 1.478293361271E9,
"trace_id" : "1-581cf771-a006649127e371903a2de979",
“in_progress”: true
}
Getting started
Agent installation (Amazon Linux)
#!/bin/bash
curl https://s3.dualstack.us-east-1.amazonaws.com/aws-xray-assets.us-east-1/xray-daemon/aws-xray-
daemon-1.x.rpm -o /home/ec2-user/xray.rpm
yum install -y /home/ec2-user/xray.rpm
Agent Installation (Windows)
Agent installation (Amazon ECS)
Enable X-Ray in AWS Lambda
Application instrumentation (Node.js)
Example pseudo code:
Demo
Pricing
X-Ray pricing
Free during the preview. After that:
Free tier
• The first 100,000 traces recorded per month are free
• The first 1,000,000 traces retrieved or scanned per month are free
Additional charges
• Beyond the free tier, traces recorded cost $5.00 per million per month
• Beyond the free tier, traces retrieved or scanned cost $0.50 per million per
month
Available Today!
The AWS X-Ray service is available today.
Go to https://aws.amazon.com/xray to get started.
Documentation: http://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html
.NET Sample: https://github.com/awslabs/aws-xray-dotnet-webapp
Java Sample: https://github.com/awslabs/eb-java-scorekeep/tree/xray
Node.js Sample: https://github.com/awslabs/eb-node-express-sample/tree/xray
Thank You!
Don’t Forget Evaluations!

More Related Content

What's hot

Intro to Batch Processing on AWS - DevDay Los Angeles 2017
Intro to Batch Processing on AWS - DevDay Los Angeles 2017Intro to Batch Processing on AWS - DevDay Los Angeles 2017
Intro to Batch Processing on AWS - DevDay Los Angeles 2017Amazon Web Services
 
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesWorkshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesAmazon Web Services
 
Building and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesBuilding and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesAmazon Web Services
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesAmazon Web Services
 
Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017Amazon Web Services
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...Amazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...Amazon Web Services
 
AWS January 2016 Webinar Series - Getting Started with Big Data on AWS
AWS January 2016 Webinar Series - Getting Started with Big Data on AWSAWS January 2016 Webinar Series - Getting Started with Big Data on AWS
AWS January 2016 Webinar Series - Getting Started with Big Data on AWSAmazon Web Services
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理Amazon Web Services
 
Serverless Big Data Architectures: Serverless Data Analytics
Serverless Big Data Architectures: Serverless Data AnalyticsServerless Big Data Architectures: Serverless Data Analytics
Serverless Big Data Architectures: Serverless Data AnalyticsKristana Kane
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
HSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessHSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessAmazon Web Services
 
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)Amazon Web Services
 
Wild Rydes - Serverless DevOps to the Rescue
Wild Rydes - Serverless DevOps to the RescueWild Rydes - Serverless DevOps to the Rescue
Wild Rydes - Serverless DevOps to the RescueAmazon Web Services
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...Amazon Web Services
 
SRV407 Deep Dive on Amazon Aurora
SRV407 Deep Dive on Amazon AuroraSRV407 Deep Dive on Amazon Aurora
SRV407 Deep Dive on Amazon AuroraAmazon Web Services
 
Deep Dive into Apache MXNet on AWS
Deep Dive into Apache MXNet on AWSDeep Dive into Apache MXNet on AWS
Deep Dive into Apache MXNet on AWSKristana Kane
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWSAmazon Web Services
 
使用 Blox 實現容器任務調度與資源編排
使用 Blox 實現容器任務調度與資源編排使用 Blox 實現容器任務調度與資源編排
使用 Blox 實現容器任務調度與資源編排Amazon Web Services
 

What's hot (20)

Intro to Batch Processing on AWS - DevDay Los Angeles 2017
Intro to Batch Processing on AWS - DevDay Los Angeles 2017Intro to Batch Processing on AWS - DevDay Los Angeles 2017
Intro to Batch Processing on AWS - DevDay Los Angeles 2017
 
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesWorkshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
 
Building and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesBuilding and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized Microservices
 
AWSome Day Intro
AWSome Day IntroAWSome Day Intro
AWSome Day Intro
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
 
Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 
AWS January 2016 Webinar Series - Getting Started with Big Data on AWS
AWS January 2016 Webinar Series - Getting Started with Big Data on AWSAWS January 2016 Webinar Series - Getting Started with Big Data on AWS
AWS January 2016 Webinar Series - Getting Started with Big Data on AWS
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理
 
Serverless Big Data Architectures: Serverless Data Analytics
Serverless Big Data Architectures: Serverless Data AnalyticsServerless Big Data Architectures: Serverless Data Analytics
Serverless Big Data Architectures: Serverless Data Analytics
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
 
HSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessHSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and Serverless
 
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
 
Wild Rydes - Serverless DevOps to the Rescue
Wild Rydes - Serverless DevOps to the RescueWild Rydes - Serverless DevOps to the Rescue
Wild Rydes - Serverless DevOps to the Rescue
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
 
SRV407 Deep Dive on Amazon Aurora
SRV407 Deep Dive on Amazon AuroraSRV407 Deep Dive on Amazon Aurora
SRV407 Deep Dive on Amazon Aurora
 
Deep Dive into Apache MXNet on AWS
Deep Dive into Apache MXNet on AWSDeep Dive into Apache MXNet on AWS
Deep Dive into Apache MXNet on AWS
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
使用 Blox 實現容器任務調度與資源編排
使用 Blox 實現容器任務調度與資源編排使用 Blox 實現容器任務調度與資源編排
使用 Blox 實現容器任務調度與資源編排
 

Similar to Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017

Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017Amazon Web Services
 
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoring
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoringRaleigh DevDay 2017: Distributed serverless stack tracing and monitoring
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoringAmazon Web Services
 
Distributed Serverless Stack Tracing and Monitoring
Distributed Serverless Stack Tracing and MonitoringDistributed Serverless Stack Tracing and Monitoring
Distributed Serverless Stack Tracing and MonitoringAmazon Web Services
 
Microservices insights with X-Ray
Microservices insights with X-RayMicroservices insights with X-Ray
Microservices insights with X-RayAmazon Web Services
 
NEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-RayNEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-RayAmazon Web Services
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018Amazon Web Services
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsAmazon Web Services
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingAmazon Web Services
 
Serverless Generative AI on AWS, AWS User Groups of Florida
Serverless Generative AI on AWS, AWS User Groups of FloridaServerless Generative AI on AWS, AWS User Groups of Florida
Serverless Generative AI on AWS, AWS User Groups of FloridaCloudHesive
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessjavier ramirez
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingKristana Kane
 
Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018Amazon Web Services
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless ArchitecturesAmazon Web Services
 
Overview of .Net Development on AWS
Overview of .Net Development on AWSOverview of .Net Development on AWS
Overview of .Net Development on AWSAmazon Web Services
 

Similar to Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017 (20)

Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
 
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoring
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoringRaleigh DevDay 2017: Distributed serverless stack tracing and monitoring
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoring
 
Distributed Serverless Stack Tracing and Monitoring
Distributed Serverless Stack Tracing and MonitoringDistributed Serverless Stack Tracing and Monitoring
Distributed Serverless Stack Tracing and Monitoring
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
Microservices insights with X-Ray
Microservices insights with X-RayMicroservices insights with X-Ray
Microservices insights with X-Ray
 
NEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-RayNEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-Ray
 
Aws X-Ray
Aws X-RayAws X-Ray
Aws X-Ray
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applications
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Serverless Generative AI on AWS, AWS User Groups of Florida
Serverless Generative AI on AWS, AWS User Groups of FloridaServerless Generative AI on AWS, AWS User Groups of Florida
Serverless Generative AI on AWS, AWS User Groups of Florida
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverless
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
 
Overview of .Net Development on AWS
Overview of .Net Development on AWSOverview of .Net Development on AWS
Overview of .Net Development on AWS
 

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
 

Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017

  • 1.
  • 2. WIFI: awsDevDay | PASS: CodeHappy U P N E X T : Distributed Serverless Stack Tracing and Monitoring
  • 3. T H A N K S T O O U R F R I E N D S A T :
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kashif Imran, Sr. Solutions Architect AWS 10/10/2017 Distributed Serverless Stack Tracing and Monitoring
  • 5. What to expect from the session • Overview • Use cases • API • Getting started • Demo
  • 7. Serverless means… No servers to provision or manage Scales with usage Never pay for idle Availability and fault tolerance built in
  • 8. Never pay for Idle EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE
  • 9. Amazon S3 Amazon DynamoDB Amazon Kinesis AWS CloudFormation AWS CloudTrail Amazon CloudWatch Amazon SNSAmazon SES Amazon API Gateway Amazon Cognito AWS IoT Amazon Alexa Cron events DATA STORES ENDPOINTS REPOSITORIES EVENT/MESSAGE SERVICES Event Sources that integrate with AWS Lambda … and the list will continue to grow! Amazon RDS Aurora
  • 10. Common Serverless Use Cases Web Applications • Static websites • Complex web apps • Packages for Flask and Express Data Processing • Real time • MapReduce • Batch Chatbots • Powering chatbot logic Backends • Apps & services • Mobile • IoT </></> Amazon Alexa • Powering voice-enabled apps • Alexa Skills Kit Autonomous IT • Policy engines • Extending AWS services • Infrastructure management
  • 11. Monolithic Monolithic vs. Service Oriented Architecture Service Oriented Architecture
  • 12. Drawbacks of Monolithic Architecture Hard to Iterate Fast CI/CD Time ConsumingHard to scale Efficiently Reliability Challenges
  • 13. Benefits of Service Oriented Architecture Increased Agility Easy to Scale Improved Innovation Reduced Human Errors
  • 15. Traditional Debugging Developer Local Test Developer Add Breakpoints Add Log Statements
  • 16. The traditional process of debugging doesn’t scale well for production applications or those built using a service- oriented, microservice, or serverless architecture It’s tedious, repetitive, and time consuming.
  • 17. Debug Lambda with CloudWatch
  • 18. Debug Lambda with CloudWatch…
  • 19. Debug Lambda with CloudWatch…
  • 21. Identify Performance Bottlenecks How does AWS X-Ray help? Pinpoint Specific Service Issues Identify Errors Identify Impact to Users
  • 25. Lambda on the AWS X-Ray Service Map
  • 34. X-Ray Key Concepts Trace End-to-end data related a single request across services Segments Portions of the trace that correspond to a single service Sub-segments Remote call or local compute sections within a service Annotations Business data that can be used to filter traces Metadata Business data that can be added to the trace but not used for filtering traces Errors Normalized error message and stack trace Sampling Percentage of requests to your application to capture as traces
  • 35. X-Ray SDK Available for Java, .NET, and Node.js Adds filters to automatically captures metadata for calls to: • AWS services using the AWS SDK • Non-AWS services over HTTP and HTTPS • Databases (MySQL, PostgreSQL, and Amazon DynamoDB) • Queues (Amazon SQS) Enables you to get started quickly without having to manually instrument your application code to log metadata about requests
  • 36. X-Ray Daemon Receives data from the SDK over UDP and acts as a local buffer. Data is flushed to the backend every second or when the local buffer fills. Available for Amazon Linux AMI, RHEL, Ubuntu, OS X, and Windows. Can be run anywhere as long as AWS credentials are provided (e.g.: EC2, ECS, on premise, developer machine, etc.)
  • 37. Sampling configuration { "rules": { "move": { "id": 1, "service_name": "*", "http_method": "*", "url_path": "/api/move/*", "fixed_target": 0, "rate": 0.05 }, "base": { "id": 2, "service_name": "*", "http_method": "*", "url_path": "*", "fixed_target": 1, "rate": 0.1 } } } This example defines two rules. The first rule applies a five-percent sampling rate with no minimum number of requests to trace to requests with paths under /api/move The second overrides the default sampling rule with a rule that traces the first request each second and 10 percent of additional requests.
  • 39. X-Ray API Raw trace data is available using batch get APIs. X-Ray provides a set of APIs to enable you to send, filter, and retrieve trace data. You can send trace data directly to the service without having to use our SDKs. (e.g. you can write your own SDKs for languages/frameworks not currently supported) You can build your own data analysis applications on top of the data collected by X-Ray.
  • 40. X-Ray API PutTraceSegments Uploads segment documents to AWS X-Ray BatchGetTraces Retrieves a list of traces specified by ID GetServiceGraph Retrieves a document that describes services in your application and their connections GetTraceSummaries Retrieves IDs and metadata for traces available for a specified time frame using an optional filter
  • 41. Segment document Minimal example { "name" : "example.com", "id" : "70de5b6f19ff9a0a", "start_time" : 1.478293361271E9, "trace_id" : "1-581cf771-a006649127e371903a2de979", "end_time" : 1.478293361449E9 } Example showing an in-progress segment { "name" : "example.com", "id" : "70de5b6f19ff9a0b", "start_time" : 1.478293361271E9, "trace_id" : "1-581cf771-a006649127e371903a2de979", “in_progress”: true }
  • 43. Agent installation (Amazon Linux) #!/bin/bash curl https://s3.dualstack.us-east-1.amazonaws.com/aws-xray-assets.us-east-1/xray-daemon/aws-xray- daemon-1.x.rpm -o /home/ec2-user/xray.rpm yum install -y /home/ec2-user/xray.rpm
  • 46. Enable X-Ray in AWS Lambda
  • 48. Demo
  • 50. X-Ray pricing Free during the preview. After that: Free tier • The first 100,000 traces recorded per month are free • The first 1,000,000 traces retrieved or scanned per month are free Additional charges • Beyond the free tier, traces recorded cost $5.00 per million per month • Beyond the free tier, traces retrieved or scanned cost $0.50 per million per month
  • 51. Available Today! The AWS X-Ray service is available today. Go to https://aws.amazon.com/xray to get started. Documentation: http://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html .NET Sample: https://github.com/awslabs/aws-xray-dotnet-webapp Java Sample: https://github.com/awslabs/eb-java-scorekeep/tree/xray Node.js Sample: https://github.com/awslabs/eb-node-express-sample/tree/xray