Crain
JCHJava Community | Help. Code. Learn.
•Created by Crain on 5/9/2023 in #java-help
Dangling Execution Issue
Been having a weird prod issue, so I want to see if anyone has some bright ideas.
We run a load balanced cluster (3/3) for a Spring app, and recently if we change Traffic from A -> B, then we get a random spike in DB query times, even if there are no DB changes in the B Cluster's Code.
Does Spring have any issues where a connection isn't closed if the HTTP Session/Request is suddenly killed? For example a Load Balancer changing traffic? Since the normal fix is to Cycle the servers.
73 replies
JCHJava Community | Help. Code. Learn.
•Created by Crain on 5/4/2023 in #java-help
Hashing Cookies in Redis (Spring)
Hello! I'm looking into Spring Session /w Redis for Persistent HTTP Sessions, however when testing locally I'm seeing that the HTTP Session ID is stored in the Redis Cache, and Spring Default Cookie appears to be a base64 encoded string of that Session ID.
Is there a way for me to Hash the ID before it's put in? That way if our Redis Cache leaks, we don't allow hackers to steal cookies? (We could IP check, but I'd rather do both tbh, instead of just one)
Ideally with a Spring Property, or a simple Spring bean would be best.
11 replies