Question

I am using Jetty 8 and currently have two instances set up and running behind a round robin load balancer. I have configured it use session replication via MongoDB. It is working great with two exceptions. I will include one here, and the other in another question.

  1. It is possible to for a session on one of the nodes to be kept alive while the same session on the other node times out. As soon as you hit the timed out node, the behavior is as if the session has expired, even though there as activity from the user on the other node.

Does anyone have any suggestions? I'm about to start digging into the implementation of jetty-nosql, but would love it if someone could save me some time.

Was it helpful?

Solution

It turns out the behavior indicated above is due to a bug in the nosqlSession manager. It does not update the last accessed time when reading the session from the database. As such, if a node isn't accessed within the session timeout period, it will invalidate the session, regardless whether any other node was accessed. I have filed this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397193

We fixed it by making custom modifications to the files indicated in the bug so that the access time for the session was updated with the access time stored in the database when the session was refreshed from the database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top