Mais conteúdo relacionado Semelhante a GPSTEC309-SaaS Monitoring Creating a Unified View of Multitenant Health featuring New Relic (20) Mais de Amazon Web Services (20) GPSTEC309-SaaS Monitoring Creating a Unified View of Multitenant Health featuring New Relic1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:Invent
SaaS Moni tori ng: Creati ng a Uni fi ed Vi ew of
Mul ti tenant Heal th featuri ng New Rel i c
J u d a h B e r n s t e i n - P a r t n e r S o l u t i o n s A r c h i t e c t - A W S
K e v i n D o w n s - S e n i o r C l o u d A r c h i t e c t – N e w R e l i c
G P S T E C 3 0 9
N o v e m b e r 2 8 , 2 0 1 7
2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A Day in the Life of the SaaS Operator
• Support Multiple customers on an agile platform
• Troubleshoot Customer issues across various features
• Evaluate Tenant centric infrastructure bottlenecks.
• Document Tenant specific SLA’s and runbooks
• Orchestrate Customer centric, and cross-system alerts.
• Align Tenant consumption, to resource allocation.
I m p o r t a n c e o f M a n a g e m e n t & M o n i t o r i n g T e n a n t h e a l t h
3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Importance of Monitoring Tenant Health
Simplify the role of the SaaS Operator
Analyze
Alert
MonitorEvaluate
Correlate
Adapt
Tenant
4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Importance of Managing Tenant Health
Simplify the role of the SaaS Operator
Tena
nt
Unify
Develop
Visualize
Measure
Assess
Evolve
Tenant
5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
An example reference architecture of how an ISV can develop a SaaS on
AWS
AWS SaaS Reference Architecture
AWS
Lambda
Authorizer
Amazon API
Gateway*
Amazon S3
Website
Application
Load Balancer
(ALB)
ECS
hosts
ECS
hosts
Auto Scaling group
Amazon S3
Objects
Amazon
Dynamo DB
Amazon
Cognito
Tenant
Tier
Role
Sub
decodeToken
verifySignature
aassumeRole
scopeTenant
Tenant1
Tenant2
Tenant3
SaaS (Host)
6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
System Overview
Tenant
Service
Tier
Filtered View
Session
Transaction
Request
Sub-Filtered View
Infrastructure Code Browser Synthetic
Concept of a Tenant Centric Dashboard
Simplify the view of the SaaS Operator
7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Website(s) Infrastructure Log(s)
Where to Collect Tenant Level Metrics?
Service(s)
Expose Tenant Level Metrics throughout the stack.
8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tenant Metrics to Consider
Operate
• Transactions
• Page Views
• Infrastructure
Associate
• Cookie
• Session
• Transaction
• Metadata
• Product
• Order
Integrate
• AWS
infrastructure
• Third-party
plugins
• External calls
Correlate
• Tenant ID
• Company
• Role
• Tier
• Sub
An example of how an AWS SaaS ISV Partner can configure a dashboard
to centrally visualize metrics obtained from various AWS resources.
9. Capturing Tenant Level Metrics
Application Flows
Service Activity
Storage Activity
Tenant Activity
Scaling Activity
Tenant Level Metrics
Order Service Cart Service
Tenant Centric Dashboard
• Use system and tenant level metrics to drive optimization
• Must attribute resource consumption to individual tenants
Tenant1: Catalog search
Tenant4: Ship order
Tenant2: Cart update IOPS
Tenant7: Ship order
CloudWatch
10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ADD MODULE TO NODE.JS
var AWSXRay = require('aws-xray-sdk');
var key = ‘tenant_id'; //Initialize Key
var params =
{
"tenant_id":’5678',
"sub":'0b619154-6fa8-4053-a582-749ab6a9b087',
"role":'TenantAdmin',
"tier":’Standard Tier’,
“status”: “new”
“date”: date.time
}
ADD SUBSEGEMENT
var subsegment = new Subsegment(name);
ADD ANNOTATIONS
subsegment.addAnnotation(key, params.tenant_id);
ADD METADATA
subsegment.addMetadata(key, params.tenant_id, ’Registered Tenant');
Capture Tenant Level Metrics on AWS
A W S X - R A Y
Capture Distributed Application traces with AWS X-RAY
var params =
{
"tenant_id":’5678',
"sub":'0b619154-6fa8-4053-a582-749ab6a9b087',
"role":'TenantAdmin',
"tier":’Standard Tier’,
“status”: “new”
“date”: date.time
}
subsegment.addAnnotation(key, params.tenant_id);
11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ADD MODULE TO NODE.JS
var params =
{
"tenant_id":’5678',
"sub":'0b619154-6fa8-4053-a582-749ab6ddb087',
"role":'TenantAdmin',
"tier":'Professional Tier’,
“orders”: “2012344, 57409822”
“orderPrice”:”56.30”
“date”:date.time
}
ADD METRIC
cloudwatch.putMetricData(params = {}, callback);
ADD DASHBOARD
cloudwatch.putDashboard(params = {}, callback);
ADD METRIC ALARM
putMetricAlarm(params = {}, callback);
SET ALARM
setAlarmState(params = {}, callback);
Capture Tenant Level Metrics on AWS
A m a z o n C l o u d W a t c h
Capture Logs, Events, and Alarms with Amazon CloudWatch
var params =
{
"tenant_id":’5678',
"sub":'0b619154-6fa8-4053-a582-749ab6a9b087',
"role":'TenantAdmin',
"tier":’Standard Tier’,
“status”: “new”
“date”: date.time
}
cloudwatch.putMetricData(params, callback);
setAlarmState(params, callback);
12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Capture Process Store Action
Architect for Multi-Tenant Health on AWS
Visualize
A reference example how to architect for Multi-Tenant Management &
Monitoring
13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Capture Metrics on AWS
AWS
Lambda
Amazon API
Gateway*
AWS X-Ray
Amazon
CloudWatch
Logs
Events
Metrics
Traces
Segments
Annotations
Metadata
Node.js
Java
Lambda
trigger
Amazon
Kinesis
Streams
Amazon
Kinesis
Analytics
Amazon
Kinesis
Firehose
CaptureHost
An example of how an ISV can capture tenant level metrics.
14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Process & Store Metrics on AWS
Amazon
Kinesis
Streams
Amazon
Kinesis
Analytics
Amazon
Kinesis
Firehose
Amazon
EMR
Amazon
Kinesis–
enabled app
Amazon
Redshift* Amazon
S3
Amazon
Dynamo DB
Amazon Machine
Learning
Amazon
Athena
Process Store
An example of how an ISV can analyze and store tenant level metrics.
15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Trigger Alerts & Events on AWS
Amazon
Kinesis
Streams
Amazon
Kinesis
Analytics
Amazon
Kinesis–
enabled app
Amazon Machine
Learning
Amazon
CloudWatch
Logs
Events
Metrics
Traces
Segments
Annotations
Metadata
Amazon
SNS
AWS X-Ray
Process Monitor Action
An example of how an ISV can trigger actions based on tenant level metrics.
16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
APN Technology Partner Solutions
AWS Partner Network Management & Monitoring Partner Solutions
17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
New Relic Platform
Customer Experience Applications Infrastructure
Multi-Tenant On-Demand Scale Enterprise Security
Metrics Dashboards Alerts
18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer/Tenant
Ticket
Tenant Issue
Triage
Tenant Specific
Alerting
1 Day in the life of a SaaS Operator
Featuring New Relic
19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tenant
Diagnose
Centralize
Prevent
Visualize
Support
Focus
Use Cases with New Relic
A few example use cases with New Relic
20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze Tenant Centric Issues
Select Tenant
21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze Tenant Centric Issues
View Tenant Centric Dashboard
22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze Tenant Centric Issues
Select Problem Service
23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze Tenant Centric Issues
Select Slow Transaction
24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze Tenant Centric Issues
Filter by Errors
25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze Tenant Centric Issues
Identify Tenant Centric Issue
26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Diagnose Root Cause of Tenant Issue
Select Transaction
27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Diagnose Root Cause of Tenant Issue
Select Trace
28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Diagnose Root Cause of Tenant Issue
Evaluate Transaction Summary
29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze & Diagnose Tenant Centric Issues
Evaluate Tenant Context
30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyze & Diagnose Tenant Centric Issues
Investigate Bottleneck
31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Prevent Tenant Issues from Recurring
Navigate to Alert Policies
32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Prevent Tenant Centric Issues from Recurring
Create New Alert Policy
2
1
3
2
33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Prevent Tenant Centric Issues from Recurring
Create Query for Alert Policy
1
2
3
34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tier Based Alerts Tenant Based
Alerts
Alerts on
Business KPI
Alert API
Alert Notifications that Suit Multi-Tenancy
Configure Alerts based on SaaS critical KPI
35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Oversee Multi-Tenant Infrastructure
Evaluate Cross Tenant Impact from an Infrastructure Perspective
36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Oversee Tenant Health through a Transaction
Correlate the business metrics to an issue with tenant health.
37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
INCLUDE NEW RELIC APM IN NODE
var newrelic = require(“newrelic”);
-------------------------------------------------------
-------------------------------------------------------
-------------------------------------------------------
-------------------------------------------------------
INJECT TENANT CONTEXT USING NEW RELIC
var tenant_id = ’1234';
var tenant_context =
{
"tenant_id":’5678',
"sub":'0b619154-6fa8-4053-a582-749ab6a9b087',
"role":'TenantAdmin',
"tier":'Professional Tier’
}
newrelic.addCustomerParameter('tenant_id', tenant_id)
newrelic.addCustomerParameters(tenant_context)
Capture Tenant Level Metrics with New Relic
N e w R e l i c A P M
Capturing Tenant Level Metrics with New Relic APM
var tenant_context =
{
"tenant_id":’5678',
"sub":'0b619154-6fa8-4053-a582-749ab6a9b087',
"role":'TenantAdmin',
"tier":'Professional Tier’
}
newrelic.addCustomerParameter('tenant_id', tenant_context.tenant_id)
newrelic.addCustomerParameters(tenant_context
38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CALL NEW RELIC INSIGHTS API
cat example_events.json | curl -d @- -X POST -H "Content-Type:
application/json" -H "X-Insert-Key: [YOUR_KEY_HERE]" https://insights-
collector.newrelic.com/v1/accounts/[NR Account]/events
INJECT TENANT CONTEXT USING NEW RELIC INSIGHTS API
JSON Example:
[
{
"eventType":"Purchase",
"tenant_id":’1234',
"account":3,
"amount":259.54
}
]
Capture Tenant Level Metrics with New Relic
N e w R e l i c I n s i g h t s
Capturing Tenant Level Metrics with New Relic Insights
{
"eventType":"Purchase",
"tenant_id":’1234',
"account":3,
"amount":259.54
}
cat example_events.json | curl -d @- -X POST -H "Content-Type:
application/json" -H "X-Insert-Key: [YOUR_KEY_HERE]"
https://insights-collector.newrelic.com/v1/accounts/[NR
Account]/events
39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SaaS Providers using New Relic
Software as a Service (SaaS) Providers using New Relic
Support DevOps culture by
providing developers with visibility
into application performance in
production
Succeeded in realizing continuous
improvement of scalability with
New Relic APM and successfully
raising awareness of developers'
performance
40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Getting Started…
Visit Booth #2412
newrelic.com
Visit GitHub
github.com/newrelic
View Docs
docs.newrelic.com
41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Identify &
resolve Tenant
Centric Issues
Analyze through
view of Multi-
Tenant Health
Focus on
business value
not triage
Proactively
identify and
resolve issues
Tenant Health is Critical
Start Agile, Stay Agile
42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Next Steps
• Visit SaaS on AWS
• tiny.cc/saas-aws
• Visit AWS Partner Network (APN)
• tiny.cc/aws-apn
• Sign up for SaaS on AWS Interest List
• tiny.cc/apn-saas
T e l l m e m o r e a b o u t S a a S o n A W S
43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
THANK YOU!
V i s i t u s a f t e r t h e s e s s i o n
G P S T E C 3 0 9