TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Debugging serverless systems?

14 点作者 hackerews将近 7 年前
We switched a number of core processes to AWS Lambda and my team is now spending WAY more time debugging.<p>Our strategy has been to add more logging and metrics to better find root causes of issues - but that&#x27;s getting unruly.<p>How are you debugging? What dev tools are you using understand what&#x27;s happening within your distributed system? If you&#x27;re logging...<p>- Where does your state go?<p>- Are you tracking startup latency?<p>- Are you tracking limits in memory, concurrency, execution duration?<p>Super interested in what others are doing for this, as well as other problems like testing, deployment, discovery.

6 条评论

laurentl将近 7 年前
A few pointers from our own experience:<p>- centralized logs (we tried an ELK stack and have moved to Datadog since they added logging). Using a correlation ID helps tracking the flow as it crosses Lambda &#x2F; services boundaries<p>- using datadog also gives us metrics and dashboards for free, although there’s not always the data you’d want<p>- we started to experiment with X-Ray to track start-up time and how much time is spent where. I’d definitely advise you to try it if you’re tracking down performance issues. It’s a bit of a pain to get working though<p>- testing : as described in Yubl’s road to serverless (link in another comment), we have a switch to call the code locally or remotely through whichever service triggers the Lambda. This usually insures that the logic is sound before deploying and that remote bugs are mostly linked to integration or rights issues<p>- deployment : we rolled our own with Ansible and CloudFormation &#x2F; SAM but if you fit in the Serverless use cases you should probably try that first<p>- discovery : we use SSM parameter store as a distributed key&#x2F;value DB and a poor’s man discovery service: if we want to reach a given lambda or service we look up it’s name or arn in SSM PS.<p>I’m in the process of writing a post (or more likely a series) on our experience and will post to HN when ready<p>Edit: also, decoupling. If your Lambdas are calling each other directly, consider putting a queue or SNS topic in between. Makes it easier to test each unit independently, can manage timeout &#x2F; retry issues on your behalf, and gives you a convenient observation point for inter-service traffic
评论 #17318217 未加载
jrowley将近 7 年前
I use SAM CLI so I can run my code locally in a realistic environment. So you can skip the build&#x2F;zip&#x2F;upload&#x2F;deploy process.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;awslabs&#x2F;aws-sam-cli" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;awslabs&#x2F;aws-sam-cli</a>
评论 #17304027 未加载
shoo将近 7 年前
Yubl&#x27;s road to serverless has a section on testing:<p><a href="https:&#x2F;&#x2F;hackernoon.com&#x2F;yubls-road-to-serverless-part-2-testing-and-ci-cd-72b2e583fe64" rel="nofollow">https:&#x2F;&#x2F;hackernoon.com&#x2F;yubls-road-to-serverless-part-2-testi...</a>
itielshwartz将近 7 年前
Hi feel free to check this product (like you debug lambda in production easily and fast): <a href="https:&#x2F;&#x2F;techcrunch.com&#x2F;2018&#x2F;06&#x2F;04&#x2F;rookout-releases-serveless-debugging-tool-for-aws-lambda&#x2F;" rel="nofollow">https:&#x2F;&#x2F;techcrunch.com&#x2F;2018&#x2F;06&#x2F;04&#x2F;rookout-releases-serveless...</a><p>full disclosure I work for Rookout - feel free to ask questions
jppope将近 7 年前
We have a similar problem, and I&#x27;m really interested in the answer to this question... our solutions so far are Testing and monitoring (doesn&#x27;t make it any easier)
shoo将近 7 年前
Out of curiosity, what was the driver for switching to serverless in the first place?