Consider the below scenario:
I have two publish servers to serve the requests behind the dispatcher which is performing some load-balancing mechanism distributing requests between the two servers in a round-robin fashion.
Use Case:
The user enters the login credentials from the login page and clicks 'Submit'. The dispatcher directs the request to 'Publish Server 1'. After successful authentication a session ID is provided to the client and the corresponding session information is stored on the 'Publish 1'.
The user hits another protected page but the dispatcher redirects the request to 'Publish Server 2' which doesn't have the session information corresponding to the session ID.
Plausible result: The session is reset and the user is prompted to login again.
How to handle such a requirement?
Note: My users do not reside in AEM, the authenticity of the users is being validated from a database.
P.S.: I have already been to a few blogs which say that Http Session clustering is not supported by AEM but none of them provides the correct solution to the problem.