diff options
author | Nathan Lasseter <nathan.je.lasseter@googlemail.com> | 2011-01-27 22:35:34 +0000 |
---|---|---|
committer | Nathan Lasseter <nathan.je.lasseter@googlemail.com> | 2011-01-27 22:35:34 +0000 |
commit | 7dfbde316104d06f8585e86c7fea284ad136a566 (patch) | |
tree | 4c3cadf49ce67225227fee03ae811c827b95fff9 /README | |
parent | d3dd0ee7cce770cc7b5089943d043a9b3da0af50 (diff) |
Wrote simple readme
Diffstat (limited to 'README')
-rw-r--r-- | README | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +erlbal is an erlang load balancer. + + +start_bal/0 spawns a balancer. +stop_bal/1 takes a balancer and kills all of its servers and then kills the balancer. +list_servers/1 takes a balancer and returns a list of the servers it balances over. + +start_server/2 takes a balancer and a function and spawns a server to serve the function. +stop_server/2 takes a balancer and a server PID and stops the server and removes it from the balancer. + +make_request/2 takes a balancer and an argument and returns the response from the server. + + +The balancer round robins requests between erlang processes. +When it receives a request, it forwards it on to the next server in the round robin. +The server then runs the function with the argument passed to it and returns a response to the balancer. +The balancer forwards the response back to the requestor. + +The function arg could be anything, so you can pass multiple args in a tuple or list, etc. |