Usługi bezstanowe nie przechowują stanu klienta między żądaniami (każde żądanie jest niezależne), podczas gdy usługi stanowe utrzymują stan. Bezstanowość jest ważna dla skalowalności — usługi bezstanowe są znacznie łatwiejsze do skalowania w poziomie.
Bezstanowość vs stanowość
STATELESS → the service keeps NO client state between requests:
→ each request contains all needed info; any server can handle any request
→ state lives ELSEWHERE (database, cache, client, token) if needed
STATEFUL → the service MAINTAINS state across requests:
→ a specific server holds a client's state (session in memory, etc.)
→ requests must go to the SAME server (or state must be shared/synchronized)
