Q4Distributed Systems
Question
2 marks
What is the difference between a stateful and stateless server?
Answer
A stateful server mathematically remembers historical client data between requests (maintaining session state), whereas a stateless server violently forgets the client immediately after executing a single request.
Stateful servers (like old FTP) crash catastrophically because they lose memory of what file the client had open. Stateless servers (like REST APIs) are architecturally invincible to crashes because every single incoming request strictly contains all the mathematical metadata required to execute it independently.