Appeon Server loadbalancing and sticky sessions
Posted by Nico Wang on 29 March 2016 03:57 PM
If you need to use Loadbalance or Failover in Appeon Server, we’d recommend the Appeon Cluster solution. For details please refer to the local help in Appeon Help > Installation Guide for Appeon for PowerBuilder > Installation Guide for .NET > Configuring Appeon Server Cluster or the Configuring Appeon Server Cluster section under other application servers. If you want adopt other Loadbalance hardware, kingly please keep the session sticky, which is also referred to as load-balancing persistence. Sticky session refers to the feature of many commercial load balancing solutions for web-farms to route the requests for a particular session to the same physical machine that serviced the first request for that session. This is mainly used to ensure that an in-proc session is not lost as a result of requests for a session being routed to different servers. Thus requests for a user are always routed to the same machine that first served the request for that session.
Following 2 solutions are provided to determine if the session is a sticky session, so to implement load balancing.
Solution #2: this is a more profound one.
What will happen if the session is not sticky?
First you need to understand what kind of server calls will be recognized in Appeon server as a start of a transaction. Actually there are four types:
3. SELECT * FROM table FOR UPDATE,
4. STORED PROCEDURE.
So when Appeon Server receives those four types’ server calls, an active transaction will be listed in AEM and this transaction will disappear until Appeon Server receives the commit/rollback.
So if server calls in a transaction are sequenced as following:
Select * from table ….
If the first call INSERT is sent to server 1, and the second server call SELECT will be sent to server 2, on Server 2 the transaction will not be listed since in server 2 this is the first call server 2 received and since this is just a select clause, it won’t be recognized as a start of a transaction and you cannot notice this server call from AEM.