AnsweredAssumed Answered

AWS Load Balancer Stickiness issues with JSAPI

Question asked by philojuan on Mar 31, 2015

I have a load balancer running on AWS with two instances of ArcGIS Server behind it. For the most part it works really great and I dont have tow worry about sticky sessions on the servers because the application does not require it.

I started running into issues in two scenarios

1. A print service that generates PDFs on the server and returns a URL

2. DynamicLayers with rendering, i.e. changing the rendering of a layer and having it rendered using the dynamicLayers on the server

 

In both these cases the problem comes from the fact that the JSAPI handles this as two requests, one request that returns a JSON with a URL an the second request that gets the content of the URL. I thought that enabled Load Balancer Sticky Sessions would solve this problem http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html

 

Essentially this generates a cookie and by checking the requests I can see that there is a cooking coming in and that the subsequent requests are passing cookies but the problem I am having is that I am not getting consistent results, I am getting new cookies with some requests that generate URLs but then the subsequent request that's retrieving the image through the URL is still using the old cookie and not the new one that was just received. I am wondering if anyone else has experienced these types of issues and if anyone has any suggestions regarding this.

 

I have tried increasing the timeout of the cookies to a pretty significant period ( 2 hours ) and am still experiencing the same problems.

 

Any help would be greatly appreciated.

Outcomes