Some network services need to track ongoing communication state (sequence numbers, buffers, connection status) across multiple packets. Stateless protocols can’t provide reliable, ordered delivery or flow control.
A protocol where endpoints maintain persistent information about the connection or session across multiple packet exchanges.
- Both sender and receiver store state variables (sequence numbers, acknowledgment numbers, window sizes, buffers)
- State is established during connection setup
- State is updated with each packet exchange
- State is destroyed during connection teardown
- State enables features like reliable delivery, ordering, and flow control
- Maintains connection context across packet exchanges
- Enables reliable, ordered delivery and flow control
- Consumes memory resources for state storage
- State must be recovered or reset after failures
- Built from: Connection-Oriented Service — inherently stateful
- Contrasts with: Stateless Protocol — no persistent state
- Related: TCP — stateful transport protocol
- Related: Session — another form of protocol state
- Server memory exhaustion from too many concurrent connections (DoS risk)
- State loss during crash requires connection reset
- State synchronization in load-balanced environments is challenging