server is a stateful application. User data is associated with it, and servers in a topology must be able to communicate bidirectionally with each other. The deployment of stateful applications is generally more challenging to automate than the deployment of stateless applications. However, by following certain industry-wide best practices, the deployment of stateful applications becomes easier to manage.

For stateful applications, we recommend maintaining a well-known network identifier for a server that does not change over its lifetime. Without this guarantee, the deployment automation workflows for the server software does not work as expected. On infrastructure platforms like , servers are generally assigned cattle-like internal host names. This strategy is acceptable if a well-defined external name is registered in a service discovery or lookup service, such as DNS.

Another important recommendation for stateful applications is the use of external, redundant persistent storage that is always available, and that functions independently of the server itself. Servers might come and go, but they are always guaranteed to be attached to the same persistent storage when they are resurrected. Although the server software does not require this guarantee, we recommend it for simpler, less error-prone deployment automation and for easier disaster recovery. For more information, see Deployment automation.