title: Sticky session load balancer with nginx open source
body: <p>What the main difference between the sticky session available in <strong>nginx plus</strong> and hashing cookie in open source version?</p>
  
  <p>According to the <a href="https://www.nginx.com/resources/admin-guide/load-balancer/" rel="noreferrer">docs</a> nginx open source allows session persistence based on hashing different global variables available within nginx, including <code>$cookie_</code></p>
  
  <p>With the following configuration:</p>
  
  <pre><code>    upstream myserver {
          hash $cookie_sessionID;
          server localhost:8092;
          server localhost:8093;
          server localhost:8094 weight=3;
      }
  
      location / {
         proxy_pass http://myserver;
      }
  </code></pre>
  
  <p>Assuming, there will be centralized mechanism across backends for generating unique sessionID cookie for all new requests, so what the main disadvantages of such method compared to the nginx plus sticky session approach?</p>