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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How do you document your microservices?

5 点作者 _samjarman超过 3 年前
One thing that I always wondered about the many companies moving to microservices is how they keep track of all the services that are created and how they all relate. Is it a manual process or automated in some way? Or is it a "probably accurate" diagram that gets up dated when remembered about?

2 条评论

jka超过 3 年前
An imaginary diagram of interactions between a large number of microservices isn&#x27;t too different to a low-code representation of a software program.<p>The ways in which endpoints interact and receive webhooks are like function calls with arguments and callbacks.<p>Documentation for programs is tricky, but often it makes sense to embed the documentation alongside the code (docstrings, comments, etc).<p>And where possible, it&#x27;s nice for programs to be self-explanatory (minimizing the amount of documentation required in the first place). That can often require careful choice (and rectification) of variable, function, file and directory names and structure.<p>I&#x27;m not sure if that&#x27;ll help much in practice - perhaps it&#x27;s an unrealistic comparison to make between microservice architectures and programs. But maybe it&#x27;ll provide a few ideas.
thorin超过 3 年前
We like to use swagger to document the endpoints &#x2F; payloads etc for REST APIs<p>For other stuff we tend to just provide diagrams of servers&#x2F;cloud services etc. Really the only way to understand it fully is to look at the code, but at least it&#x27;s nice to have an entry point to the correct place. Unfortunately there are lots of non technical architects in my organization who tend to depend on documentation (which we have in confluence). It&#x27;s not ideal really!