Open OlgaMaciaszek opened 3 years ago
Hi @OlgaMaciaszek,
I used the RestTemplate based on your answer from SO, and it's perfectly working. However, when I enable the servlet http session from the server side application in which the JSESSIONID will be added to the next succeeding client request header cookie the solution will not work. And the RestTemplate will default to round-robin load balancing. Do I need to have another alternative for http session such that only the cookie key with sc-lb-instance-id and cookie value with instance id will be sent?
Your help is very much appreciated!
Best regards,
James
Hi @jamesjallorina, this issue has been added, but so far not assigned in the backlog. At this point, I'm not sure it will be included in backlog, but I will look into it and update here.
Hi @OlgaMaciaszek,
Thank you for the update!
I am new using spring framework, is it possible to provide me with some information on how long would it take for this to be available in the next release?
In the meantime, I am thinking of using the URL encoded JSESSIONID.
Best regards,
James
Hi @OlgaMaciaszek ,
Just an update!
I am able to make it work with URL-encoded JSESSIONID. The RestTemplate cookie management also needs to be disabled such that it will not re-send the same JSESSIONID cookie into the next new client request.
For example: return builder.requestFactory(SimpleClientHttpRequestFactory::new).build();
See https://stackoverflow.com/questions/68026243/request-based-sticky-session-configuration-with-spring-cloud-loadbalancer