Types of Microservices


Types of Microservices

Fabric Service provides sophisticated, lightweight work that supports seamless and high-quality microservices. The main difference of Service Fabric is its strong support for building high-quality resources, which can be models of built-in Service Fabric programs or high-quality resources.

There are two types of Microservices known as:-

  1. Stateless microservices
  2. Stateful microservices

Stateless Microservices

Non-national services are as good candidates as the building blocks of a distributed system. As the name suggests, baseless microservices do not maintain the session status between applications, for example, if any service model is removed, it does not affect the whole process of processing the service. Distributed systems prefer non-standard microservices.

ORDER drawing

Looking at the previous drawing, the customer makes a product request with the ORDER service, and internally, the ORDER service checks the product status with the INVENTORY service. Stateless means that each request takes place without previous or future requests. One call to get product information can return the same result regardless of previous context or applications. If one call to the ORDER service fails, then it should not stop processing the whole business. There should be other conditions for using microservices to perform the task.

Stateful microservices

Stateful microservices store session information in the code. When two or more microservices are connected, they maintain the status of the service request.

In the real world, lumbering elephants are exposed to the aggression of speeding midgets. If we consider a simple example, then transactions that require multiple roundtrips on a website require maintenance of status.