Stateful Applications
Those applications that maintain some form of persistent state or data are called stateful applications. The key characteristic that differentiate them from stateless applications is that these applications don’t rely on storing data locally and they don’t treat each request as independent. They manage data between interactions. Sometimes stateless applications connect to the stateful application to forward the requests to a database.
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.