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.

Debugging AWS Lambda Performance Issues

One of the most common performance issues in serverless architectures is elevated latencies from external services, such as DynamoDB, ElasticSearch or Stripe. In this webinar, we will focus on how to monitor, detect and fix latency issues that arise when our Lambda functions need to talk to other services.

  • Be the first to comment

  • Be the first to like this

Debugging AWS Lambda Performance Issues

  1. 1. Debugging AWS Lambda Performance Issues
  2. 2. Yan Cui http://theburningmonk.com @theburningmonk Developer Advocate @ Independent Consultant AWS user since 2009 since 2018 yan@lumigo.io
  3. 3. Aviad Mor @aviadmor Co-Founder & CTO @ aviad@lumigo.io
  4. 4. observation majority of performance problems originates from a function’s integration points
  5. 5. macro how well is this service performing in general? micro why did this transaction perform poorly?
  6. 6. macro how well is this service performing in general? micro why did this transaction perform poorly? identify systemic issues
  7. 7. macro how well is this service performing in general? micro why did this transaction perform poorly? why did this user get a bad exp?
  8. 8. In control theory, observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs.
  9. 9. In control theory, observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs. what do we need to collect?
  10. 10. API Gateway Lambda DynamoDB
  11. 11. API Gateway Lambda DynamoDBhow long did this req take?
  12. 12. what is the state of the world?
  13. 13. In control theory, observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs. what are the most important outputs to collect?
  14. 14. macro how well is this service performing in general? micro why did this transaction perform poorly?
  15. 15. API Gateway API GatewayLambda Lambda DynamoDB Service A Service B
  16. 16. API Gateway API GatewayLambda Lambda DynamoDB Service A Service B how long did service B took to respond?
  17. 17. API Gateway API GatewayLambda Lambda DynamoDB Service A Service B how long did service B took to respond? was DynamoDB slow? was it a cold start? could it be API Gateway?
  18. 18. How do we collect these external output to help us infer the application’s internal state to debug performance issues?
  19. 19. log them manually
  20. 20. log them manually turn these into metrics using Metric Filter
  21. 21. Embedded Metric Format (EMF)
  22. 22. intercept all HTTP requests
  23. 23. X-Ray
  24. 24. Lumigo
  25. 25. DEMO!
  26. 26. API Gateway Lambda GET / Lambda POST /restaurants/search API Gateway Lambda GET / get-index get-restaurants search-restaurants DynamoDB EventBridge Lambda notify-restaurant Lambda place-order POST /order SNS
  27. 27. github.com/theburningmonk/debugging-lambda-perf-issues-demo
  28. 28. get 15% off
  29. 29. @theburningmonk theburningmonk.com github.com/theburningmonk yan@lumigo.io

×