Instead of writing one, look at the LVS project.
VJ wrote:
> I want to build a load balancer, which does the following:
>
> I have servers (a number of them) runing on different machines...
> There is a well defined service to which the clients connect to,
> once the request is received, the service (load balancer) chooses to
> which servers it needs to forward. This has to be done transparently,
> to the client; all the client does is it connects
> to this well defined service.
>
> I want to do this by writing the service in c/C++, also, using
> TCP/IP sockets..
>
> Can anyone suggest a way of doing this...
>
> Regards,
> VJ
>
|