How do I handle Redis DB down scenario, while using Spring Session with Redis store for session management ? What if Redis DB is down and user tries to access his/her session ?
Asked
Active
Viewed 512 times
0
-
Possible duplicate of [How to disable Redis Caching at run time if redis connection failed](https://stackoverflow.com/questions/29003786/how-to-disable-redis-caching-at-run-time-if-redis-connection-failed) – pkoli Oct 28 '19 at 14:27
2 Answers
0
when redis down, you can store session in you container. such as apache, Sticky sessions.
Do a filter extends DelegatingFilterProxy , add a switch to control session don't store in redis.

Edmon
- 1
- 1
0
If Redis is down during startup of your application. Then your application will fail to start.
If Redis goes down once your application is up and running. Then spring tries reconnecting to Redis after specific intervals.
I guess what you're looking for has an answer here.
How to disable Redis Caching at run time if redis connection failed

pkoli
- 646
- 8
- 21