title: How to be sticky on REST lifecycle in haproxy
body: <p>I want to route all requests for a given resource to the same server. If a resource is created on a server, all following requests should be routed to the same server. </p>
  
  <p>To be sticky on the url is not the problem, but how can I fill the stick-table from the first response?</p>
  
  <p>Example:</p>
  
  <p>Request:
  POST /resources</p>
  
  <pre><code>{
    "value": "bla"
  }
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>{
    "id": "1234",
    "value": "bla"
  }
  </code></pre>
  
  <p>GET /resources/1234</p>
  
  <pre><code>{
    "id": "1234",
    "value": "bla"
  }
  </code></pre>
  
  <p>The second request should be routed to the same server, that handled the first request. Is there a way to get this done with haproxy?</p>