In this blog i will introduce the concepts of load balancing and its implementation in SAP.To understand load balancing it will be useful to reason what happens when an SAP System receives a request.If a SAP System (eg ECC) receives a request and it has only one Application server then its directly processed by the server but what happens if it has more than one Application Server ? It has to then decide which of these servers is most eligible to receive it. This decision making is performed based on a concept called Load Balancing.
The Load Balancing Concept
Load Balancing as the term suggests essentially means balancing the workload/requests among the servers so that the SAP system with the ability to provide the lowest possible turnaround time for requests is chosen.But what if you want exclude some application servers from processing the users requests how do you do it ? This can be done by using Logon Groups in SAP.
SMLG and Logon Groups
Logon Groups are ideally collection of Application servers and can be used by the user to inform the message server that it needs to balance the load only among the servers in the logon group.This whole activity can be done in SMLG and is explained in the help link (http://help.sap.com/saphelp_nw70/helpdata/en/c4/3a64b4505211d189550000e829fbbd/content.htm).It prevents the user from logging on to individual servers and thereby overloading any particular server.Also it provides a layer of abstraction to the user and prevents him from being affected even if particular servers in the group are changed or removed from the group.
The ideal recommendation for assigning logon groups is to assign specific work groups(Eg FI ,Sd ..etc) to specific logon groups as it helps in optimizing buffer usage for specific work group/applications thereby increases performance. More information about configuring logon groups is available at http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a64c1505211d189550000e829fbbd/content.htm
Message Server and Load Balancing
In an SAP system the Message server is the component that performs load balancing.Any request to a SAP server first reaches the message server ,it then redirects the request to one of the servers chosen based on the Workload data with the message server.So how does message server gets this data and how does it use the data for calculating the work load of the servers ? The message server procures the data with the help of a background job which runs every five minutes (as defined by the parameter rdisp/autoabaptime) or every fifth logon which ever is earlier.The background job runs a report named RSRZLLG0 and this report in turn populates the two tables which provide message server with the necessary information for load balancing.Based on this procured data and the algorithm chosen a favorite list is composed.The message server then uses this list to delegate the incoming requests.
The Favorite List of the Message Server
So what is the favorite list of the Message Server ? The favorite list is list of application servers compiled based on a weighted value derived from the response time and no of user logged into the server at a point in time.The message server delegates the request to the server with the best value in the list.
RFC logons and Load balancing
Have you ever wondered what will happen if a message server receives thousands of login request every second ? Will it then be advisable to retrieve the load data from servers every second and also given the performance constraints of running a report every second(since the 5th logon happens within a second in this case) on the servers.Even if we try to avoid the performance issue and only retrieve it every 5 minutes it would only render the best server overloaded with all the requests recieved possibly running into 1000's .To resolve this issue a different version of load balancing was introduced and the version needs to be set in SMLG explicity by following the note 593058.The new version uses a delta value for calculating the best server.So once the list is retrieved and first logon after the retrieval is delegated with the best server,all other logons after that deduce the best server by recalculating the list obtained after subtracting the delta values from the best server.
I hope you found my blog useful. Below are some SAP notes which you might find interesting to read.I have provided a short description of the relevance of each note.
593058 | RFC Logon concept and settings to be perfomed in SMLG |
118093 | Usage of limiting values in influencing load balancing behaviour |
1112104 | Weighted Round Robin Procedure for load balancing |
986373 | Managing RFC Load Distribution |
64015 | Test programs for load balancing |
1385815 | Tracing load balancing |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |