My team has been using springboot + redis for securing microservices, by storing the spring-security session in Redis instance allowing single session per user(means a user can login only once at a time, if the user login two times simultaneously, the former session will be invalidated). Everything works perfect most of the time but always.
In some times it has been noted that if a user login two times within a span of 1 mins without logging-out the previous session, the jsessionid - or X-auth-token is duplicated, which means the second session-id is same as the previous one, which is weird, ideally it should invalidates the old one and create a new session, also this does not happens always, only in some cases.
Also note that there are 3 instance of the microservice is running in parallel and points to the same Redis server.
Any one has any idea how to fix this?