Microservices Explained

Microservices are architectural paradigms that address the limitations and drawbacks of legacy applications.

To understand microservices we need to under the history of software architecture design.

Monolithic Software Architecture

Monolithic software architecture is a single codebase encapsulating data storage and access, business logic and user interfaces.

Monolithic architecture has a drawback of poor scalability. At scale monolithic architecture is difficult to maintain and evolve.

Multitier Software Architecture

Multitier architecture is the solution to monolithic architecture. Multitier architecture application components are separated into layers based on technical function. Common model has three tiers.

Three tiers of Multitier software architecture are:

  • Presentation layer
  • Logic layer
  • Data layer

Challenges of Applications and Systems

Application complexity has constantly been growing.

Complex apps are extremely hard to maintain, evolve, and scale. A software like Amazon or Google Search requires microservices.

The best way to tackle complexity is deconstructing it into manageable chunks.

A mobile or web application that requires data from multiple APIs is using microservice architecture.

An app can use a user profile microservice, a payment processing microservice, a products microservice and many more microservices to make a complex application.

For cost reduction, efficiency improvement, operational optimization most organizations limit team choices to a set of approved tools infrastructure providers and programming languages.

As applications continue evolving and growing the number of microservices inside an organization could expand to hundreds or even thousands.

Complexity creep happens with thousands of microservices. A failed microservice can generate a cascade of outages.

Highly distributed microservice based systems require maintenance tools like containerization.

Microservice Tools

Docker containers are self contained runtimes.

Containerization deploys microservices in minimalist self contained runtimes.

Kubernetes pipelines is a container orchestration system that manages container life cycles.

Pipeline automation is a CI/CD (continuous integration & deployment).

Asynchronous messaging further couples microservices.

Kafka provides message Brokers and queues applications performance monitoring tools to track microservice.

Prometheus monitoring tool alerting. Operates a pull model scraping HTTP metrics.

Datadog correlates metrics, traces, and logs.