We’re running a Jmix 2.7.4 application horizontally scaled behind Nginx with sticky sessions (ip_hash):
User → Nginx (sticky session) → Server A / Server B
The problem:
- User is working on Server A
- Server A crashes or goes down for maintenance
- Nginx redirects user to Server B → session doesn’t exist → forced re-login
- Server A comes back healthy → Nginx routes user back to Server A → session doesn’t exist here either → forced re-login again
This creates a very poor user experience — users lose their work context and have to re-login multiple times during a single failover event.
What we want:
When Server A goes down, the user should seamlessly continue working on Server B without re-login. We understand that Vaadin’s server-side UI state (component trees, view state) cannot be replicated between nodes. That’s acceptable — we’re fine with the page reloading. But at
minimum, the authentication and authorization state (user principal, security context, roles/permissions) must survive failover so the user doesn’t have to re-login.
Our stack:
- Jmix 2.7.4 / Spring Boot
- Vaadin 24.9
- Hazelcast 5.5 (already in the project for caching)
- PostgreSQL
- Nginx as load balancer
Questions:
- Has anyone successfully implemented session replication (at least for authentication state) with Hazelcast or Redis in a Jmix + Vaadin application?
- Is there a recommended approach for Jmix apps specifically?
Any guidance or experience would be greatly appreciated.