DZone
Integration Zone
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
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Integration Zone > 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 · Integration Zone · Opinion
Like (12)
Save
Tweet
10.40K 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.

Popular on DZone

  • SQL CTE: How to Master It in One Sitting With Easy Examples
  • Creating an Event-Driven Architecture in a Microservices Setting
  • The Developer's Guide to SaaS Compliance
  • MACH Architecture Explained

Comments

Integration Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • 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
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo