One of the best practices to develop a containerized application is using stateless containers, meaning that data generated in one request to the application in the container is not recorded for use in other requests. However, real world applications do require stateful behavior for some of their containers: data generated in one request should be recorded somewhere in the container to be available for use in other requests.
Classic 3-tier Applications
For simple applications, the decision over which containers are stateless and which are stateful can be easily made. For example, a simple 3-tier web application may have three containers:
- 1st container is for the presentation tier (a web server), stateless
- 2nd container is for the application logic tier, stateless
- 3rd container is for the persistent tier (database), stateful
Read more at Stratoscale