strava-wind-analysis
strava-wind-analysis copied to clipboard
Move session persistance from application layer to Redis
Migrating the session data from the application layer to an in-memory store like Redis-cluster would provide the following benefits:
- Ability to easily scale, eliminating the need of sticky load balancers
- Should any Node.js instance crash, the user doesn't lose their session
An alternative would also be to store them in cookies.
Back in #73, the EC2 issue resulted in StackOverFlow in the Node.js resulted in the server restarting via PM2, further propagating into users losing their sessions. If the session data was instead stored in Redis, it wouldn't have been lost.