Monoliths versus microservices

It is a common practice to begin a software application as a monolith, and then break it down into microservices in the long run. This actually helps to focus on the application delivery, instead of blindly following the microservice pattern. Once the product is stabilized, then developers should find a way to break down product features. Take a look at the following diagram for the difference between a monolith and microservices:

This diagram depicts the structure of monolithic and microservices architectures. A monolith has everything wrapped in a single system. It is called a tightly coupled architecture. In contrast, microservices are individual entities that are easy to replace and modifiable. Each microservice can talk to one another through various transport mechanisms, such as HTTP, REST, or RPC. The data format exchanged between services could be either JSON or Protocol buffers. Microservices can also handle various request entry points, such as UI and API clients.

Microservices can be implemented in any technology (Java, Go, Python, and so on), and can be replaced with any technology because of their loosely coupled nature.

In the next section, we explore how to create microservices in Go using a lightweight framework called Go Micro. There, we see how to develop mini services that can talk to each other.