To understand persistent volumes, first we need to understand the following stateless and stateful applications:
- Stateless: With stateless applications, the application does some calculations based on one or more input and sends its results to one or more output. When the application is run on such data, it will do the same job. Usually these types of applications scale very well and are easier to write and maintain.
- Stateful: The stateful application is one that needs to store data, so databases are the best example of stateful applications. A database is a special type of application in which we store the data of our system, which is then stored on disk. In Mesos, on the completion or failure of tasks, all data created by these tasks could be deleted. For example, if one of the applications storing the customer information in the database...