Its really a pain to handle the performance issue of SAP instance. We all keep fighting with this issue every now and then. Hell lot of Research and Development has to go through to make things stable and get hold of the load and performance problems. Even I faced the same and then realized how important is the concept of load balancing which greatly affects the performance of your SAP instance.
I will try to through some light on How to do load balancing using Java Dispatcher through a blog. This will have Two Parts:
Part 1: Will discuss about the basic definitions of few SAP terms which we will use and the need of Load Balancing.
Part 2: Will be based on the load balancing using Java Dispatcher (Heterogeneous Method).
Before proceeding let us get familiar with the terminologies which we will be using.Java Dispatcher: Lets go back to our simplest definition that Java dispatcher is just a request handler. But we can use this to perform load balancing for various types of client requests.
Use of Load Balancing: To distribute requests to resources within the SAP cluster. When a client application requests a resource of a server process, the Load Balancing System chooses the most appropriate server within the cluster to dispatch the request to. This system is implemented in the J2EE Engine by means of the Round Robin algorithm. The J2EE Engine HTTP Provider Service running on the dispatcher performs heterogeneous load balancing for Web applications.

Homogeneous Load Balancing: When the HTTP Provider Service is not configured for heterogeneous load balancing, it uses the homogeneous load balancing algorithm to determine the appropriate server process to dispatch the request to. When an HTTP request reaches the Java dispatcher and it is not part of a user session, the load balancing chooses a server process randomly from all the server processes within the Java instance that have an HTTP Provider Service running on them. When using homogeneous load balancing, all your Web applications must be running on each server process in the cluster. By default, the J2EE Engine Deploy Service starts a Web application on each server process once the application is successfully deployed. However, you have the option of stopping the application on a random server process. If you do this, you must consider switching on the heterogeneous load balancing functions of HTTP Provider Service.
The Heterogeneous Load Balancing: Web applications are identified and invoked using their unique application aliases. The HTTP Provider Service running on the dispatcher keeps a table of records about the Web application alias, and the server IDs of the servers in the cluster where the corresponding application is started. In this way, the Java dispatcher can direct a client request to the appropriate server process where the requested Web application is running. The heterogeneous load balancing mechanism also uses cookies or URL rewriting as an underlying mechanism to transmit session-related information. The J2EE Engine has defined a load balancing cookie type that defines the format of the information that the HTTP Provider Service needs in order to perform such load balancing.
Configurations for Heterogeneous Load Balancing: Keep watching this space as told I will let you know the configurations details in PART 2.