DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • Operator Overloading in Java
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • How To Scan and Validate Image Uploads in Java
  • Microservices With Apache Camel and Quarkus

Trending

  • Operator Overloading in Java
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • How To Scan and Validate Image Uploads in Java
  • Microservices With Apache Camel and Quarkus
  1. DZone
  2. Data Engineering
  3. Data
  4. Microservices Best Practices

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.

Manuel Weiss user avatar by
Manuel Weiss
·
Jun. 23, 16 · Opinion
Like (12)
Save
Tweet
Share
10.92K Views

Join the DZone community and get the full member experience.

Join For Free

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:

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.

microservice

Published at DZone with permission of Manuel Weiss, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Operator Overloading in Java
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • How To Scan and Validate Image Uploads in Java
  • Microservices With Apache Camel and Quarkus

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: