Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Latest commit

 

History

History
22 lines (17 loc) · 805 Bytes

balancing.md

File metadata and controls

22 lines (17 loc) · 805 Bytes

Load balancing

This simple load balancing server is written for Node.js. It acts as a reverse http proxy.

  1. Start NuCompRes-Servers on port 9000 and 9001.

  2. Start the load balancing proxy.

  3. Now issue (for example with the html5 sample client) several sleep requests

    sleep(1); response.x = 'Done'

The proxy will then log

Listening on 8080
Dispatching to [ { port: 9000 }, { port: 9001 } ]
Thu, 30 Jan 2014 21:03:07 GMT POST /eval -> 9000
Thu, 30 Jan 2014 21:03:08 GMT POST /eval -> 9001
Thu, 30 Jan 2014 21:03:08 GMT POST /eval -> 9000
Thu, 30 Jan 2014 21:03:08 GMT POST /eval -> 9000
Thu, 30 Jan 2014 21:03:09 GMT POST /eval -> 9001
Thu, 30 Jan 2014 21:03:11 GMT POST /eval -> 9000