NOTE

1.12 Distributed-System Service State

1. What Is State - State refers to a program's contextual information or data. - Stateful: a user's previous request and next request are associated, and the request must reach a particular node to be processed normally. - Stateless: a user's previous request and next request are associated, and the request can reach any node and still be processed normally. 2. Stateful Services vs Stateless Services.

Distributed SystemsCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

1. What Is State?

  • State refers to a program’s contextual information or data.
  • Stateful: a user’s previous request and next request are associated, and the request must reach a particular node to be processed normally.
  • Stateless: a user’s previous request and next request are associated, and the request can reach any node and still be processed normally.

2. Stateful Services vs Stateless Services

Stateful service Stateless service
Advantage State does not need to be stored in third-party storage; local access has higher availability and performance Good scalability; nodes can be added or removed freely
Disadvantage Poor scalability; nodes cannot be added or removed freely State needs to be stored in third-party storage; availability and performance are poorer

3. References

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub