What is Microservice?

Posted on Leave a comment
microservices
Reading Time: 2 minutes

Microservice is an architecture style where you create or deposed a system into components. Despite the name, does not mean that the service has to be small in size. The most important thing is that each service has the following characteristics:

Single-responsibility

Each microservice should have only one responsibility, also known as bounded domain context.

Lightweight

Microservices have to be lightweight. This allows for smaller memory consumption and fast startup times.

Stateless

Not all microservices are stateless. But this is an important characteristic. As there is no state to be backed up on shutdown or activated on startup, they scale better and start faster.

Reactive

This is applicable for microservices with concurrent loads or longer response times. Using the Asynchronous communication model allows the optimal use of the resources. This results in better availability.

Externalized configuration

Externalizes the configurations in a config server. So it can be maintained per environment.

Resilient

Services should handle exceptions arising and not crash. Runtime errors, technical issues, lost of connectivity, wrong input values can and so on.

Observability

Microservices should report their usage. Statistics, the number of times they are accessed, their average response time, and so on through the HTTP API.

Versioned

Microservices may need to support versions for different clients until all clients migrate to higher versions.

Independent deployment

Each of the microservices should be deployable, without compromising the integrity of the application. It tested and deployed independently.

Bounded

A service should access the resources from its bounded context. It should not access the resources of other modules through databases. If a service needs data from others context it should do so through an internal API or service layer.

Question mark In your opinion, what other important characteristic a Microservice must have ?

Leave a Reply

Your email address will not be published. Required fields are marked *