title: Storing progress information in session bean
body: <p>We are running 4 instances of tomcat server in 2 geo-locations with DNS-based load balancer. We are providing some export services which tasks require a lot of time to complete. So the user typically submits a request to one of our servers and that is responsible for whole processing. </p>
  
  <p><a href="https://i.stack.imgur.com/Rrxv6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rrxv6.png" alt="enter image description here"></a></p>
  
  <p>The problem shows up when the user is later requesting for progress information on a randomly chosen instance. </p>
  
  <p>I was thinking about sharing progress information across all instances such as a spring authentication is shared using Redis. I've tried to use spring session bean with aop proxy for sharing progress information, but it seems to be a bad idea. I did some research and debugging that shows the bean is stored in Redis and can be accessed by all instances, but the state is no longer updated. I believe that's because the thread is not able update session information after the original request is return to caller.</p>
  
  <p>Another solution I could think of, is to use our MySQL database for storing such information, but i'm afraid of huge overload caused by continual updating of progress information.  </p>
  
  <p>Any ideas to solve my issue?</p>
  
  <p>Thanks in advance, </p>
  
  <p>Michal</p>