title: Varnish - cache when cookies / sessions are supplied in round robin director
body: <p>I am configuring varnish for the first time, and I have come across an issue which I haven't been able to find a complete answer for so far.</p>
  
  <p>My config in a nutshell:</p>
  
  <p>server0 - varnish,
  be1 - apache,
  be2 - apache</p>
  
  <p>varnish pulls from the 2 backends in a round robin.</p>
  
  <p>I need to deal with sessions, so I have configured a simple php script which sets the current time in a session variable, then redirects to a 2nd page which displays that session variable and the ip of the backend that was used.</p>
  
  <p>I have managed to get this half working. It is passing the session info from what i can see, but here is the problem - the info returned from the backend is specific to the backend it was generated on. So, the time returned will depend on whether be1 or be2 was called for the last cache.</p>
  
  <p>Is there a way that I can get this working so that the session variable is the same regardless of the backend that processes it?</p>