Token-Based State:?
Short answer: Use JWT (JSON Web Tokens) to carry state information in an encrypted, stateless manner, allowing the service to authenticate and authorize without retaining session information. Example: The Order Service could store order details in a database and use JWT tokens to pass authentication and authorization information between services, thus maintaining statelessness.
Real-world example (ShopNest)
ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png