Wednesday, February 03, 2016

“Microservices” – What,Why,How and Challenges

Microservices” is the new hot thing and certainly at the peak of the hype cycle. This post is my summary after going through various articles, blogs, courses, videos , books and very brief hands on experience with Microservices. So let’s get started…

What are Microservices ?

“Microservices is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.”

(Martin Fowler :

Microservices are simply an architecture style to design an application in a certain way. Some also refer to it as Fine-grained SOA or based on a subset of SOA Principles.Here are some of the characteristics/tenents of Microservices:

  • Services as Loosely coupled Components.
  • Autonomous Services which can be Scaled, Deployed and Updated independently.
  • Uses HTTP or lightweight protocol.
  • Technology, Language and Platform agnostic.
  • Decentralized Data Management.
  • Organized around business capabilities.

Why Microservices ?

Microservices is the the next evolution in Software Decomposition. It enables separation of concerns and reuse which are quite essential in today’s cloud oriented world. Here are my 3 reasons why you should choose a Microservices approach from a Technology point of view:

  1. Faster delivery of features   (State of art in Microservices)
  2. Better utilization of Infrastructure to reduce costs

Does this mean every application should use Microservices approach ? Not necessarily…

One argument is to start with a traditional monolith, and split the application into Microservices once the monolith becomes a problem. Although there are others who say not to start with monolith, since it is very hard to split a monolith.

I think Microservices approach has its own challenges and not every application needs to deal with it (at least initially). But every application should keep this decomposition mindset at the forefront of the architecture so that it’s easier to split in future if we need to.

Here is an great article explaining the four main benefits of Microservices from a Business point of view : Innovate or Die : The Rise of Microservices.

How to create Microservices ?

Here are some of the resources that can guide you in building Microservices:




Distributed systems are inherently complex and Microservices approach takes this to the next level.

Here are some of the challenges that Microservices bring to the table:

  • Organization
    • Service Ownership (from dev to support).
    • Service Contracts
    • Health Metrics
    • Handling Failures, Throttling and Backwards compatibility
  • Discovery
    • Service Registry
  • Data Management
    • Transactional integrity with Decentralized Data Stores.
  • Deployment and Testing
    • Building Continuous Delivery pipeline
  • Monitoring
    • Publishing Internal and External Metrics (Latency, Request Per second, Error rate etc..)
    • Log Aggregation
    • Correlating Requests


Hope this gives a good summary of the Microservices world as of today.

Enjoy Microservices…



No comments: