I have a VMSS with multiple instances that have a java application deployed in it. The VMSS is connected to an application gateway. The gateway have session affinity enabled.
Is it possible to override or tell gateway to use cookie created by java application?
The reason why I need that is because, when a request comes to application gateway with multiple params, the processing is done by java application. This processing creates a unique ID record where the user is redirected to.
When this redirection request reaches to application gateway, the gateway sends the request to another server where unique ID is not present, as a result, error is thrown.
My Idea: When the request comes to gateway and reaches to java program, I create a cookie with some information. The cookie is sent back and when the request is redirected, I use the same cookie to identify the server.
Is this possible?
Can I use an application cookie and tell application gateway to use that cookie to identify the server?