Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

session not shared between two server

i have big trouble with my application that web-application(jsp,java,servlet) landed between two server cause there is load-sharing between server but unfortunately session not maintaining between server now i am checking checking after login if session is there than ok otherwise i am taking all credential from url (visible encoded url with same key if somebody remember url then big mess ) obviously its not secure at all ,SO how we can resolve this problame at application level please guide me.......

like image 317
tulsi Avatar asked Oct 16 '25 03:10

tulsi


1 Answers

You have two options:

  • sticky session - once some user hits one server, load balancer makes sure she will always use the exact same server.

  • session replication - every change in HTTP session is migrated to another nodde in the cluster. Load balancer remains unaffected.

Both approaches are configuration only, no changes to your application are required.

like image 128
Tomasz Nurkiewicz Avatar answered Oct 17 '25 18:10

Tomasz Nurkiewicz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!