I wanted others to explain to me, which approach is better: using a session or designing it sessionless. We are starting development of a new web application and have not yet decided on what path to follow.
Session-less design IMO is more preferable:
Pros:
- Scalability. We can have as many servers as we want without having to share a user session. Each of them can process requests (e.g. load balancing via round robin).
- Saves server resources. We do not need to allocate memory on the server side (again - scalability).
- No need to recover after a server restart.
Cons:
- Having to keep some user related information in cookies (not critical).
- Requires more coding (but not really much of coding).
Are there any topics we need to mind before taking the final decision?