Top three considerations when documenting a microservice
1. Make documentation comprehensive
In a microservice environment, each team may be using different programming languages, data storage, and conventions. This means a shared understand of a service not an accident. A shared understanding only occurs due to comprehensive documentation. Comprehensive documentation includes the following:- Description - identify the microservice’s purpose and role.
- Architecture diagram - summarize the complexity of the microservice in a picture.
- Endpoints - document the public interface.
- Dependencies - detail services the microservice relies on and their SLAs.
- Runbooks - detail how to handle each possible alert the microservice can generate.
- Contact information - who to contact and how to contact them.
- Onboarding guide - get new developers introducing changes without hand-holding.
- FAQ - common questions and their answers.
2. Update documentation as part of the development cycle
To be useful, software documentation needs to be up-to-date. When exposing a new API, document it. When making a new alert, create a runbook to remedy the alert. When adding a dependency, add it to the list. To keep software up-to-date, elevate it to the same level as code. Update it alongside the code and review it in a pull request with the code. To simplify this, consider keeping a /docs folder in the code with Markdown or reStructuredText documentation. As part of the build process this documentation can be transformed and published to the documentation repository.3. Use a central location for all microservice documentation
When troubleshooting an issue or trying to determine how a service works, the last thing you want to be doing is looking through code repositories or finding out you don’t have the permissions to view the documentation. Publish all microservice documentation to a shared, centralized location. This ensures the documentation is readily-available. And enables developers to find answers to their own questions and problems. An internal website or wiki is a common place to publish this documentation. Keeping everything in one spot does two things. One, people use the documentation. And, two, it encourages teams to keep their documentation up to the standards of the rest of the teams. Microservices enable rapid change, but without a shared understanding the whole ecosystem suffers. Useful documentation prevents this. The above guideline will help you get there. And set the stage for increased productivity and faster issue resolution. Want to know more about building microservices? Let’s chat, Pythian can help.On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Going from monolith to microservices: deciding when and how

Going from monolith to microservices: deciding when and how
Feb 5, 2019 12:00:00 AM
3
min read
Istio: the new standard in making microservices behave

Istio: the new standard in making microservices behave
Dec 17, 2018 12:00:00 AM
2
min read
How to move or clone a Microsoft Azure virtual machine?

How to move or clone a Microsoft Azure virtual machine?
Dec 19, 2017 12:00:00 AM
3
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.