O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Microservice state 

While we should indeed thrive on making services as stateless as possible, there are some instances where we do need stateful services. A state is simply any condition or quality at any specific point in time. A stateful service is one that is dependent on the state of the system. Being stateful means to rely on these moments in time, whereas statelessness means to be independent of any sort of state.

Stateful service is essential in instances where we have a workflow that calls some REST services, we need to support retries on failures, we need to track progress, store intermediate results, and so on. We need to keep state somewhere outside of our service instances boundaries. This is where databases come into the picture. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required