Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

Serverless observability - a hero's perspective Slide 1 Serverless observability - a hero's perspective Slide 2 Serverless observability - a hero's perspective Slide 3 Serverless observability - a hero's perspective Slide 4 Serverless observability - a hero's perspective Slide 5 Serverless observability - a hero's perspective Slide 6 Serverless observability - a hero's perspective Slide 7 Serverless observability - a hero's perspective Slide 8 Serverless observability - a hero's perspective Slide 9 Serverless observability - a hero's perspective Slide 10 Serverless observability - a hero's perspective Slide 11 Serverless observability - a hero's perspective Slide 12 Serverless observability - a hero's perspective Slide 13 Serverless observability - a hero's perspective Slide 14 Serverless observability - a hero's perspective Slide 15 Serverless observability - a hero's perspective Slide 16 Serverless observability - a hero's perspective Slide 17 Serverless observability - a hero's perspective Slide 18 Serverless observability - a hero's perspective Slide 19 Serverless observability - a hero's perspective Slide 20 Serverless observability - a hero's perspective Slide 21 Serverless observability - a hero's perspective Slide 22 Serverless observability - a hero's perspective Slide 23 Serverless observability - a hero's perspective Slide 24 Serverless observability - a hero's perspective Slide 25 Serverless observability - a hero's perspective Slide 26 Serverless observability - a hero's perspective Slide 27 Serverless observability - a hero's perspective Slide 28 Serverless observability - a hero's perspective Slide 29 Serverless observability - a hero's perspective Slide 30 Serverless observability - a hero's perspective Slide 31 Serverless observability - a hero's perspective Slide 32 Serverless observability - a hero's perspective Slide 33 Serverless observability - a hero's perspective Slide 34 Serverless observability - a hero's perspective Slide 35 Serverless observability - a hero's perspective Slide 36 Serverless observability - a hero's perspective Slide 37 Serverless observability - a hero's perspective Slide 38 Serverless observability - a hero's perspective Slide 39 Serverless observability - a hero's perspective Slide 40 Serverless observability - a hero's perspective Slide 41 Serverless observability - a hero's perspective Slide 42 Serverless observability - a hero's perspective Slide 43 Serverless observability - a hero's perspective Slide 44 Serverless observability - a hero's perspective Slide 45 Serverless observability - a hero's perspective Slide 46 Serverless observability - a hero's perspective Slide 47 Serverless observability - a hero's perspective Slide 48 Serverless observability - a hero's perspective Slide 49 Serverless observability - a hero's perspective Slide 50 Serverless observability - a hero's perspective Slide 51 Serverless observability - a hero's perspective Slide 52 Serverless observability - a hero's perspective Slide 53 Serverless observability - a hero's perspective Slide 54 Serverless observability - a hero's perspective Slide 55 Serverless observability - a hero's perspective Slide 56 Serverless observability - a hero's perspective Slide 57 Serverless observability - a hero's perspective Slide 58 Serverless observability - a hero's perspective Slide 59 Serverless observability - a hero's perspective Slide 60 Serverless observability - a hero's perspective Slide 61 Serverless observability - a hero's perspective Slide 62 Serverless observability - a hero's perspective Slide 63 Serverless observability - a hero's perspective Slide 64 Serverless observability - a hero's perspective Slide 65 Serverless observability - a hero's perspective Slide 66 Serverless observability - a hero's perspective Slide 67 Serverless observability - a hero's perspective Slide 68 Serverless observability - a hero's perspective Slide 69 Serverless observability - a hero's perspective Slide 70 Serverless observability - a hero's perspective Slide 71 Serverless observability - a hero's perspective Slide 72 Serverless observability - a hero's perspective Slide 73 Serverless observability - a hero's perspective Slide 74 Serverless observability - a hero's perspective Slide 75 Serverless observability - a hero's perspective Slide 76 Serverless observability - a hero's perspective Slide 77 Serverless observability - a hero's perspective Slide 78 Serverless observability - a hero's perspective Slide 79 Serverless observability - a hero's perspective Slide 80 Serverless observability - a hero's perspective Slide 81 Serverless observability - a hero's perspective Slide 82 Serverless observability - a hero's perspective Slide 83 Serverless observability - a hero's perspective Slide 84 Serverless observability - a hero's perspective Slide 85 Serverless observability - a hero's perspective Slide 86 Serverless observability - a hero's perspective Slide 87 Serverless observability - a hero's perspective Slide 88 Serverless observability - a hero's perspective Slide 89 Serverless observability - a hero's perspective Slide 90 Serverless observability - a hero's perspective Slide 91 Serverless observability - a hero's perspective Slide 92 Serverless observability - a hero's perspective Slide 93 Serverless observability - a hero's perspective Slide 94 Serverless observability - a hero's perspective Slide 95 Serverless observability - a hero's perspective Slide 96 Serverless observability - a hero's perspective Slide 97 Serverless observability - a hero's perspective Slide 98 Serverless observability - a hero's perspective Slide 99 Serverless observability - a hero's perspective Slide 100 Serverless observability - a hero's perspective Slide 101 Serverless observability - a hero's perspective Slide 102 Serverless observability - a hero's perspective Slide 103 Serverless observability - a hero's perspective Slide 104 Serverless observability - a hero's perspective Slide 105 Serverless observability - a hero's perspective Slide 106 Serverless observability - a hero's perspective Slide 107 Serverless observability - a hero's perspective Slide 108 Serverless observability - a hero's perspective Slide 109 Serverless observability - a hero's perspective Slide 110 Serverless observability - a hero's perspective Slide 111 Serverless observability - a hero's perspective Slide 112 Serverless observability - a hero's perspective Slide 113 Serverless observability - a hero's perspective Slide 114 Serverless observability - a hero's perspective Slide 115 Serverless observability - a hero's perspective Slide 116 Serverless observability - a hero's perspective Slide 117 Serverless observability - a hero's perspective Slide 118
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Serverless observability - a hero's perspective

Download to read offline

Yan Cui, an AWS Serverless Hero, will talk about the learnings from using serverless at scale.

He will cover the challenges for observability in serverless asynchronous workloads and the patterns to address those challenges, like using centralized logging, correlation IDs, tracing, lambda extensions.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Serverless observability - a hero's perspective

  1. 1. Serverless OBSERVABILITY A hero’s perspective
  2. 2. @theburningmonk theburningmonk.com What do I mean by “observability”?
  3. 3. Monitoring watching out for known failure modes in the system, e.g. network I/O, CPU, memory usage, …
  4. 4. @theburningmonk theburningmonk.com Observability being able to debug the system, and gain insights into the system’s behaviour
  5. 5. @theburningmonk theburningmonk.com In control theory, observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs. https://en.wikipedia.org/wiki/Observability
  6. 6. @theburningmonk theburningmonk.com In control theory, observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs. https://en.wikipedia.org/wiki/Observability including non- functional outputs
  7. 7. @theburningmonk theburningmonk.com These are the four pillars of the Observability Engineering team’s charter: • Monitoring • Alerting/Visualization • Distributed systems tracing infrastructure • Log aggregation/analytics “ ” http://bit.ly/2DnjyuW - Observability Engineering at Twitter
  8. 8. @theburningmonk theburningmonk.com microservices death stars circa 2015
  9. 9. @theburningmonk theburningmonk.com microservices death stars circa 2015 mm… I wonder what’s going on here…
  10. 10. @theburningmonk theburningmonk.com microservices death stars circa 2015 I got this!
  11. 11. @theburningmonk theburningmonk.com
  12. 12. Yan Cui http://theburningmonk.com @theburningmonk AWS user for 10 years
  13. 13. http://bit.ly/yubl-serverless
  14. 14. Yan Cui http://theburningmonk.com @theburningmonk Developer Advocate @
  15. 15. Yan Cui http://theburningmonk.com @theburningmonk Independent Consultant advise training delivery
  16. 16. theburningmonk.com/courses
  17. 17. Learn GraphQL and AppSync by building a Twitter clone with these technologies appsyncmasterclass.com
  18. 18. realworldserverless.com
  19. 19. @theburningmonk theburningmonk.com
  20. 20. @theburningmonk theburningmonk.com Concurrency is in your application
  21. 21. @theburningmonk theburningmonk.com Concurrency is in your application Agent
  22. 22. @theburningmonk theburningmonk.com Concurrency is in your application Agent
  23. 23. @theburningmonk theburningmonk.com Concurrency is in your application Agent Shares the same CPU, memory and bandwidth as application
  24. 24. @theburningmonk theburningmonk.com API Gateway
  25. 25. @theburningmonk theburningmonk.com API Gateway Lambda
  26. 26. @theburningmonk theburningmonk.com API Gateway Lambda Worker Worker Worker Worker Worker Worker Worker Worker Worker
  27. 27. @theburningmonk theburningmonk.com API Gateway Lambda Worker Worker Worker Worker Worker Worker Worker Worker Worker Busy Busy Busy Busy Busy Busy
  28. 28. @theburningmonk theburningmonk.com API Gateway Lambda Worker Worker Worker Worker Worker Worker Worker Worker Worker Busy Busy Busy Busy Busy Busy
  29. 29. @theburningmonk theburningmonk.com API Gateway Lambda Worker Worker Worker Worker Worker Worker Worker Worker Worker Busy Busy Busy Busy Busy Busy Only processes one request at a time
  30. 30. @theburningmonk theburningmonk.com API Gateway Lambda Worker Worker Worker Worker Worker Worker Worker Worker Worker Busy Busy Busy Busy Busy Busy Only processes one request at a time Runs in an AWS-managed baremetal EC2 instance
  31. 31. @theburningmonk theburningmonk.com Resource overhead is irrelevant. Think latency overhead instead.
  32. 32. @theburningmonk theburningmonk.com Resource overhead is irrelevant. Think latency overhead instead.
  33. 33. @theburningmonk theburningmonk.com https://www.youtube.com/watch?v=xmacMfbrG28
  34. 34. @theburningmonk theburningmonk.com Built-in collection of: Metrics Logs Traces CloudWatch Metrics CloudWatch Logs X-Ray
  35. 35. challenges
  36. 36. Background Processing Time
  37. 37. @theburningmonk theburningmonk.com user request user request user request user request user request user request user request critical paths: minimise user-facing latency handler handler handler handler handler handler handler
  38. 38. @theburningmonk theburningmonk.com user request user request user request user request user request user request user request critical paths: minimise user-facing latency StatsD handler handler handler handler handler handler handler rsyslog background processing: batched, asynchronous, low overhead
  39. 39. @theburningmonk theburningmonk.com No background processing*.
  40. 40. @theburningmonk theburningmonk.com No background processing*. * you can work around this with Lambda extensions
  41. 41. (potential) Data Loss When workers are garbage collected
  42. 42. @theburningmonk theburningmonk.com Lambda cold start
  43. 43. @theburningmonk theburningmonk.com Lambda data is batched between invocations
  44. 44. @theburningmonk theburningmonk.com Lambda idle data is batched between invocations
  45. 45. @theburningmonk theburningmonk.com Lambda idle garbage collection data is batched between invocations
  46. 46. @theburningmonk theburningmonk.com Lambda
  47. 47. @theburningmonk theburningmonk.com my code send metrics
  48. 48. @theburningmonk theburningmonk.com my code send metrics
  49. 49. @theburningmonk theburningmonk.com my code send metrics internet internet press button something happens
  50. 50. Lambda Extension to the rescue!
  51. 51. Lambda Extension to the rescue! Think “sidecar” but for Lambda ;-)
  52. 52. @theburningmonk theburningmonk.com Your code Time Invoke Idle Shutdown Runtime shutdown
  53. 53. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Runtime shutdown Shutdown
  54. 54. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Runtime shutdown Shutdown
  55. 55. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown
  56. 56. @theburningmonk theburningmonk.com Lambda idle garbage collection data is batched between invocations
  57. 57. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown Flush buffered telemetry data
  58. 58. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown 5-10 mins on average
  59. 59. @theburningmonk theburningmonk.com my code send metrics
  60. 60. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown
  61. 61. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown You pay for this time too
  62. 62. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown Return function response
  63. 63. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown Return function response Send telemetry data
  64. 64. Lots of async invocations
  65. 65. @theburningmonk theburningmonk.com http://bit.ly/2Dpidje
  66. 66. @theburningmonk theburningmonk.com ? functions are often chained together via asynchronous invocations
  67. 67. @theburningmonk theburningmonk.com ? SNS Kinesis EventBridge CloudWatch Logs IoT DynamoDB S3 SES
  68. 68. @theburningmonk theburningmonk.com S3 Lambda
  69. 69. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda
  70. 70. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda
  71. 71. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda
  72. 72. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda
  73. 73. @theburningmonk theburningmonk.com Tracing through asynchronous invocations can be difficult
  74. 74. @theburningmonk theburningmonk.com Use correlation IDs to find related logs
  75. 75. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda How to inject correlation IDs?
  76. 76. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda How to inject correlation IDs? How to inject correlation IDs? How to inject correlation IDs?
  77. 77. @theburningmonk theburningmonk.com https://github.com/getndazn/dazn-lambda-powertools
  78. 78. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda
  79. 79. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda Microservice 1 Microservice 2 Microservice 3
  80. 80. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda Microservice 1 Microservice 2 Microservice 3 AWS account 1 AWS account 2 AWS account 3
  81. 81. Log Aggregation
  82. 82. @theburningmonk theburningmonk.com
  83. 83. @theburningmonk theburningmonk.com
  84. 84. @theburningmonk theburningmonk.com
  85. 85. @theburningmonk theburningmonk.com CloudWatch Logs is an async event source for Lambda
  86. 86. @theburningmonk theburningmonk.com Concurrent Executions Time regional max concurrency functions that are delivering business value
  87. 87. @theburningmonk theburningmonk.com Concurrent Executions Time regional max concurrency functions that are delivering business value ship logs
  88. 88. @theburningmonk theburningmonk.com either set concurrency limit on the log shipping function (and potentially lose logs due to throttling) or…
  89. 89. @theburningmonk theburningmonk.com
  90. 90. @theburningmonk theburningmonk.com 1 shard = 1 concurrent execution i.e. control the no. of concurrent executions with no. of shards
  91. 91. @theburningmonk theburningmonk.com or consider using Lambda Extensions
  92. 92. @theburningmonk theburningmonk.com or consider using Lambda Extensions Optionally disable CloudWatch Logs to save on cost
  93. 93. @theburningmonk theburningmonk.com Your code Time Extension Invoke Idle Shutdown 2s Extension shutdown Runtime shutdown Return function response Send logs
  94. 94. Distributed Tracing
  95. 95. @theburningmonk theburningmonk.com S3 Lambda DynamoDB Lambda API Gateway Lambda EventBridge Lambda Lambda
  96. 96. X-Ray
  97. 97. @theburningmonk theburningmonk.com Some services are not supported e.g. Kinesis, DynamoDB
  98. 98. @theburningmonk theburningmonk.com HTTP/HTTPs traffic only
  99. 99. @theburningmonk theburningmonk.com Requires manual instructation of AWS SDK and HTTP module
  100. 100. AWS offers a lot of built-in tools, but…
  101. 101. @theburningmonk theburningmonk.com assembly are required
  102. 102. @theburningmonk theburningmonk.com assembly are required lots of decisions for you to make
  103. 103. @theburningmonk theburningmonk.com assembly are required
  104. 104. @theburningmonk theburningmonk.com Have to use (and learn) multiple services
  105. 105. @theburningmonk theburningmonk.com Not one complete package
  106. 106. Many vendors cater for serverless workloads, but…
  107. 107. @theburningmonk theburningmonk.com Their focus is still on serverful applications, and has shallow support for serverless architectures (e.g. poor support for async workloads)
  108. 108. @theburningmonk theburningmonk.com
  109. 109. @theburningmonk theburningmonk.com github.com/theburningmonk

Yan Cui, an AWS Serverless Hero, will talk about the learnings from using serverless at scale. He will cover the challenges for observability in serverless asynchronous workloads and the patterns to address those challenges, like using centralized logging, correlation IDs, tracing, lambda extensions.

Views

Total views

266

On Slideshare

0

From embeds

0

Number of embeds

2

Actions

Downloads

2

Shares

0

Comments

0

Likes

0

×