Kubeflow for Poets · Part 3 of 8

Microservices Architecture

27 March 2019Updated 14 October 20261 min read

This part explains how the microservices architecture splits an application into small services that run and scale on their own. It also lists the advantages and challenges of the approach.

The microservices architecture is an approach to developing and deploying cloud-native applications. It separates the core business capabilities of an application into decoupled components. Each business capability is a function that the application provides to the end user as a service. The monolithic architecture, by comparison, builds the application as a single unit that contains all of its capabilities.

Two diagrams side by side. On the left, one monolithic application holds order, catalog and payment modules, reads from one database and serves users. On the right, separate order, catalog and payment microservices each have their own database, call one another and serve users.
A monolithic application and the same application built as microservices.

Microservices communicate with each other over the network through well-defined APIs. Common choices are HTTP APIs that follow the Representational State Transfer (REST) style, gRPC, and asynchronous message queues. REST APIs are stateless. In a stateless design, the server does not store state about the client session. Each request carries everything the server needs to handle it. Because the services are loosely coupled, one microservice can keep responding to requests when another fails.

Advantages of Microservices

  • Loosely coupled components make the application fault tolerant.
  • Each component can scale out on its own to stay highly available.
  • Modular components make it easier to extend existing capabilities.

Challenges with Microservices

  • The software architecture becomes more complex.
  • Managing and orchestrating many microservices adds overhead. The next parts show how Docker and Kubernetes reduce this overhead.

Ekaba Bisong is a Ph.D. researcher at the University of Victoria and the founder of SiliconBlast. More about me