Stateless Services

The definition of stateless is that something is truly stateless where the data is only stored in memory; a calculator is a good example of a stateless application. Stateless can also mean that the data is persisted in an external storage solution, such as SQL DB or Azure Tables. This is the standard model for distributed systems today, with tiered architectures being the most popular. To be able to enable our service to scale out by adding more instances, we avoid storing any state on our service itself. To make stateless services resilient, we need to implement lots of patterns when accessing state in the backend, starting with proper queuing patterns to pass messages between the tiers, through caching patterns to improve performance, and ending with sophisticated retry patterns to make sure we can retrieve the data from external systems.

Stateless services in Service Fabric are pretty much the same as any other types of stateless services such as Azure Cloud Services or web apps. We can make those services highly available and scalable by starting more instance of the service. A typical scenario for a stateless service is a gateway service, which accepts the incoming traffic and routes the requests to the stateful services. Another example is a simple web front end that provides a UI for any type of user interaction.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.12.3