Salesforce

Is it possible to configure a third-party load balancer with PASOE?

« Go Back

Information

 
TitleIs it possible to configure a third-party load balancer with PASOE?
URL NameIs-it-possible-to-configure-a-third-party-load-balancer-with-PASOE
Article Number000182895
EnvironmentProduct: OpenEdge
Version: 11.6, 11.7, 12
OS: All supported platforms
Other: Load balancer, F5 BIGIP, Apache HTTPD, IIS, Amazon ELB and Nginx
Question/Problem Description
How to configure a third-party Load Balancer to divide traffic from PASOE Web Apps using HTTP sessions between transfer nodes?

How to solve errors 18320 18328 when using the APSV transport for a PASOE instance sitting behind a Load Balancer?

Web Apps using HTTP sessions fail when PASOE is configured to use a Load Balancer 
POST requests fail when the HTTP session for the sessionID is not found on the current node

PASOE:
APSV(<sessionID>) : An error occurred processing the POST request :  <errormsg> : <exception>. (18320)
APSV(<sessionID>) : unable to find existing HTTP session for specified sessionID. (18328)


Client:
Failure reading response from Application Server. (14810)
 
Steps to Reproduce
Clarifying Information


 
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Use Load Balancer sticky sessions. 

Since OpenEdge 11.6, load balancing is supported for all PASOE transports:
  • Where both client and server need to be upgraded in-order to run APSV load balancing.
  • When Load Balancing is needed for the APSV transport, then the load balancer must be configured to use sticky sessions.
  • Load Balancing for the APSV transport is added through a JSESSIONID. OpenEdge uses the JSESSIONID cookie which is managed by Tomcat and ties a request to a specific HTTP session which is used to make the session sticky. 
Enable sticky sessions on the Load Balancer and make use of Tomcat Clustering:

Load balancing is the ability of a server to divide a workload among connected resources, achieved in Tomcat through workers, which are server instances. Basic load balancing is configured by designating a cluster of workers, with one worker configured as a load balancer.  
  • When the load balancer switches sessions between nodes the session is reset. The resolution is to set the load balancer to enable "Sticky Sessions." 
  • When PASOE is sitting behind a load balancer and the load balancer is configured for sticky sessions, this enables the client to be served by the same PASOE instance during the duration of the session.
A Cluster is a collection of linked servers, (nodes). Tomcat supports clustering through the use of a cluster element included in a host or engine container. This allows for the sharing of HTTP session information across a cluster.  
  • PASOE session context data is moved around from server to server as a load-balancer dispatches HTTP messages to different servers. 
  • Tomcat requires any web application (such as PAS for OpenEdge) to make all Java objects stored in the login session context to be serializable.
Tomcat clustering and the Load Balancing are independent of each other, once clustering is working (without a load balancer), test with the load balancer. 
 
0. Specific to the PAS instance, the following must be configured for each worker instance:

{CATALLINA_BASE}\conf\catalina.properties:
cd {CATALLINA_BASE}/bin
oeprop.sh oepas1.ROOT.APSV.adapterEnabled=1
oeprop.sh oepas1.ROOT.APSV.enableRequestChunking=1
oeprop.sh oepas1.ROOT.APSV.useHTTPSessions=1

{CATALLINA_BASE}/conf/server.xml
cd {CATALLINA_BASE}/bin
tcman.sh feature AJP13 on
tcman.sh feature Cluster=on

{CATALLINA_BASE}catalina.properties
cd {CATALLINA_BASE}/bin
tcman.sh config psc.as.ajp13.port 8009

1. Clustered PAS instances replicate sessions between each other 
  • AJP and Clustering are enabled on each PAS instance
  • PASOE instances share the same multicast address and port 
2. There are many "Load Balancers" - F5 BIGIP, Apache HTTPD, IIS, Amazon ELB, Nginx.  
The load balancing option for your application environment depends on site requirements and preference. PAS load balancing is implemented using standard HTTP options.

Example: Apache HTTPD web server with Mod_JK installed 
  • A virtual 'lb' and 'status' instance with a worker.properties file containing PAS instances with their respective AJP ports. 
  • Mod_jk requires one “workers.properties” file where load balancing is configured, where "workers" are defined in the properties file and represent actual or virtual workers.
  • worker.properties: turn off sticky sessions and let the Clustering support session replication, or use sticky sessions but don't force them - which means if the one PAS instance goes down the Load Balancer will recognize this and move the request on to another PAS instance
In the following workers.properties configuration, the virtual load-balancing instance, the virtual metrics-gathering instance, and the two PASOE worker instances (oepas1, oepas2) that execute client requests:
 
# list workers visible to apache
worker.list=lb,status

# Configure the Load Balancer

worker.lb.type=lb
worker.lb.balance_workers=oepas1,oepas2
worker.lb.sticky_session=true
worker.lb.sticky_session_force=false
worker.lb.method=Request
worker.lb.session_cookie=JSESSIONID

worker.status.type=status

# Global Configuration
worker.common.type =ajp13
worker.common.max_packet_size=8192
worker.common.socket_keepalive=true
worker.common.socket_timeout=10
worker.common.connect_timeout=10000
worker.common.ping_mode=I
worker.common.ping_timeout=10000
worker.common.connection_ping_interval=100
worker.common.retry_interval=100
worker.common.recover_time=20
worker.common.recovery_options=7 

# workers
worker.oepas1.reference=worker.common
worker.oepas1.host=oepas1host
worker.oepas1.port=8009
worker.oepas1.lbfactor =1
# worker.oepas1.redirect=oepas2

worker.oepas2.reference=worker.common
worker.oepas2.host=oepas2host
worker.oepas2.port=8009
worker.oepas2.lbfactor =1
# worker.oepas2.redirect=oepas1

Save worker.properties: /etc/httpd/conf on the Apache server

Start of Apache HTTP Web Server: systemctl restart httpd  
Assure the workers are started (tcman -start)

Test: Simple code to verify Load Balancing is attached to this Article which connects to a sports database.

Note Load Balancing and PAS Clusters are different which will affect sticky sessions:
 PASOE clustering with tomcat load balancer is not working   

 
Workaround
Notes
Keyword Phrase
Last Modified Date11/2/2021 2:57 PM

Powered by