loading...
Cover image for What is Microservice?

What is Microservice?

educostadev profile image @educostadev Originally published at educosta.dev on ・2 min read

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 ?

The post What is Microservice? appeared first on Be Cloud Native. If you have any doubts or questions feel free to drop a comment here or reach me out on Twitter @educostadev.

Posted on by:

educostadev profile

@educostadev

@educostadev

I help Java Developers to build and deploy, secure, scalable and resilient cloud-native applications so they grow in their careers by having fun with innovative technologies

Discussion

markdown guide