Web Dev

Microservices Best Practices

As more and more development teams are becoming aware of the benefits of microservices and service-oriented architecture, we need to make sure we’re not just barreling ahead with little to no plan. It’s essential to think about the consumers of these services; we need to craft good developer experience in order to make working with microservices easy and maintainable.

In this article, we’ll look at some microservices best practices suggested by Michele Titolo (Capital One) from her talk at DockerCon 2016.

What Is a Microservice?

Let’s start off with a clear definition of what a microservice is:

  • A small service that does one thing well
  • Independent
  • Owner of its own data

Microservices exist in a larger ecosystem. It’s important to not just think about the one microservice. We need to make sure we think about how it connects to the larger system of the network.

Make Microservices Easy to Use

The needs of consumers of microservices all overlap. How can we ensure we’re making a great microservice for everyone?

There are a few things that are essential to creating a good developer experience with a microservice, and you should put enough effort into them to make sure you’re doing a good job with them:

  • Documentation: Be clear and concise.
  • Version and revision history: Provide historical records of when things changed and why.
  • Live documentation: If possible, offer live responses (for example: APIs —> JSON response).

Other initiatives that can help make a big difference are:

  • creating a dependency graph
  • auto-generating documentation
  • integration monitoring tools
  • logging

We need to be able to surface errors before our service goes down.

Make Sure Your Microservices Can Coexist

In the end, it all comes down to two things:

  • consistency
  • conventions

Here are a few good questions you can ask yourself in order to check that you’re developing your microservice in a sustainable way:

  • How does my microservice fit in with the others?
  • Are my services capable of working together? Think date formats and so on.
  • Am I taking single responsibility too far? Don’t try to force yourself into breaking up your monolithic apps. Sometimes it makes sense to not break everything up.

Your Best Practices for Microservices Checklist

Finally, if you want to build friendly, sustainable microservices, here’s a good checklist:

  • Helpful documentation
  • Built with monitoring and troubleshooting in mind
  • Easily deployable and scalable
  • Easy to consume
  • Coexists with established conventions

Always be sure to make your service easy to deploy and scale. Provide consistent error messaging and make sure your microservice consumers can hit the API directly in a nonproduction environment.

Reference: Microservices Best Practices from our WCG partner Manue Weiss at the Codeship Blog blog.

Do you want to know how to develop your skillset to become a Web Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!


1. Building web apps with Node.js

2. HTML5 Programming Cookbook

3. CSS Programming Cookbook

4. AngularJS Programming Cookbook

5. jQuery Programming Cookbook

6. Bootstrap Programming Cookbook


and many more ....


I have read and agree to the terms & conditions


Manuel Weiss

Proud Co-Founder of Codeship. He likes Liverpool FC, learning instruments and reading philosophy and history books.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button