8

What is the advantage of using Redis for session storage over simply storing all data in variables inside your app?

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367
Tiddo
  • 6,331
  • 6
  • 52
  • 85

1 Answers1

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