Overview

Stateful applications maintain information about the current state of a user's interaction. This state is often stored on the server's local disk or in memory. Managing stateful applications in the cloud is more complex than stateless ones because the state must be preserved even if the underlying infrastructure fails or scales.

Key Challenges

  • Scaling: Requires complex mechanisms like session affinity (sticky sessions) or distributed state management.
  • High Availability: Requires data replication and failover strategies to ensure state is not lost.
  • Storage: Often requires persistent storage that can be re-attached to new instances.

Use Cases

  • Databases (SQL and NoSQL).
  • Legacy applications designed for single-server environments.
  • Real-time collaborative tools (e.g., online editors).

Related Terms