Fahim Farook
Fahim Farook

Reputation: 1483

Spring session for microservices

  1. Does spring distributed session only provides a uniform way to manage session stickiness when multiple instances of a single application is running? Or can it be used to share the session between multiple microservices?

  2. Is spring distributed session require Redis? Can be used without Redis?

Upvotes: 2

Views: 2237

Answers (1)

rocky
rocky

Reputation: 5004

  1. Spring session project uses cookie named 'SESSION' to keep track of it, so in fact if your microservices are on the same domain ( its often a case that zuul proxy is used to direct paths to correct services ), then they will share the same session. It may be ok for you, or you want to tweak it so specific microservices uses different session, take a look how to change this cookie name as its not so trivial:

How to change spring session (redis) cookie name?

  1. Yes, at the moment its only redis.

Upvotes: 2

Related Questions