title: Software Load Balancing in C#. Public IP: diverting requests to different servers
body: <p>I have to implement a load balancer (software) which will divert requests to different servers using a round robin algorithm.</p>
  
  <p><strong>Requirements:</strong><br>
  Two machines are configured.</p>
  
  <ol>
  <li>Machine has two IPs configured
  <ul>
  <li>Public IP (x.x.x.10)</li>
  <li>Server1 (x.x.x.11)</li>
  </ul></li>
  <li>Server2 (x.x.x.12).</li>
  </ol>
  
  <p>User will always request <code>http://x.x.x.10/WebApp/home.html</code></p>
  
  <p>Every request/refresh of page in a browser should be allocated to a server in round robin fashion:</p>
  
  <pre><code>x.x.x.10/WebApp/home.html    
  x.x.x.11/WebApp/home.html
  x.x.x.12/WebApp/home.html
  x.x.x.10/WebApp/home.html
  x.x.x.11/WebApp/home.html
  </code></pre>
  
  <p>As I have to develop in C#, the load balancer should be a library, so in future I can re-use it for other purposes.</p>
  
  <p>As x.x.x.10 is a public IP, shall I have to work on HttpHandler on x.x.x.11 hosted app to divert the call.</p>