What is the advantage of using Redis for session storage over simply storing all data in variables inside your app?
Asked
Active
Viewed 667 times
8
-
1So that sessions can survive crash of your app. And be accessible from multiple app instances. – Sergio Tulentsev Dec 27 '12 at 12:35
-
1@SergioTulentsev - Thanks! Could you post this as an answer so I can accept it? – Tiddo Dec 27 '12 at 12:38
1 Answers
7
From the top of my head:
Pros of storing sessions in external storage (redis) vs in-process
- sessions survive crash of app server
- sessions are shared between all app servers (if you have more than one).
Cons:
- slower than storing in-process (because of network latency)
- requires setting up and managing the storage

Sergio Tulentsev
- 226,338
- 43
- 373
- 367