Stateless Applications
Those applications that do not maintain any form of persistent state or data locally are called stateless applications. In stateless applications, each request or interaction is treated independently. These applications are designed to be highly scalable, easy to manage and fault-tolerant because unlike Stateful applications, they don’t have to track past interactions or requests.
Stateless applications are deployed using deployment component. Deployment is an abstraction of pods and allows you to replicate the application meaning it allows you to run to 1, 5, 10 or n identical pods of the same stateless application.
Kubernetes StatefulSets: Running Stateful Applications in Containers
StatefulSets are Kubernetes components that are used specifically for deploying stateful applications. In Kubernetes on the basis on methods of deploying. There are two types of applications – Stateful applications and stateless applications. Therefore, There are two ways for deploying an application on Kubernetes – through Deployment (for deploying stateless applications) and through StatefulSets (for deploying stateful applications).
Applications that maintain any form of persistent state or data are called stateful applications. Most of the database applications that we build like MySQL and MongoDB are stateful applications. The basic point of difference between a stateful and a stateless application is the need of persistent storage. Stateful applications requires a persistent storage while stateless applications do not have a need to store data, therefore they don’t require any persistent storage.