It is needed for my project...... I am doing the project programmable packet scheduling in load balanced network.
Posts: 6,843
Threads: 4
Joined: Mar 2015
ns2 source code for load balancing free download
Introduction
The example demonstrates a communication scenario where the capacity of one running service is not enough and you want to increase the performance by distributing the workload across multiple services. To simulate the scenario, the example below implements a client application using a service to calculate π (PI) number. The calculation is split into many small intervals (400 in our example). Therefore, the service gets overloaded and the performance drops down.
The solution for such scenarios could be using of load balancer. The load balancer is a component maintaining a farm of services (typically same services but running on different machines) and is exposed to receive messages instead of the real service. The client does not know about this setup and thinks it communicates directly with the service. When the client sends a request, the load balancer receives this message and forwards it to the service picked from the farm. The service processes the message and sends back the response that is routed via the load balancer back to the client.
To run the example bellow you must execute applications in the following order:
1. PiCalculator up to 3 instances.
2. LoadBalancer
3. Client