Tomcat Load Balancing Confusion - Forum - OpenEdge Architecture - Progress Community
 Forum

Tomcat Load Balancing Confusion

This question is answered

Hi All 

I am confused, not for the first time!

The Openedge documentation talks about setting up Tomcat Load Balancing for the PAS - https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/pasoe-admin%2Ftomcat-load-balancing.html%23

And mentions creating a PAS lb and status instance.

However i am not sure what the point of those instances are as TC load balancing can use virtual equivalents of those as referenced in the attached document which is referenced in the KB article - https://knowledgebase.progress.com/articles/Article/how-to-configure-pasoe-for-load-balancing

PAS4OELoadBalancing-Eng-v2.pdf

The Openedge documentation does not explain how these PASOE lb and status instances are referenced and why you would create these instances rather than use the virtual ones in MOD_JK.

I have also seen sight of articles that describe how you don't need sticky sessions for load balancing if you use the PASOE tomcat load balancing route but again it seems to be very poorly explained.

Is there a more definitive explanation of the pro's and con's and how to guides for above options.

Christian.

Verified Answer
  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

All Replies
  • Well, in the end PAS is "just" Tomcat, so I think this is what you're looking for: tomcat.apache.org/.../loadbalancers.html

  • HI Bronco

    The link documents creating a virtual load balance and i have done this and it works so all good.

    What is confusing is that the OE documentation tells you to actually create a pas instance using tcman with the name lb.

    So i am a little confused!

  • Hi Bronco,

    "lb/jklb" and "status/jkstatus" are special pas instances which can be created to use for tomcat load balancing.

    If you create the instance with these names and use "pasman workers" to create the workers.properties file , then pasman or tcman understand these special instance and they are being used as loadbalancer and status monitor respectively.

    i.e we will automatically detect them and place them in loadbalancer and status worker directive respectively in the worker.propeties file.

    This is for user convenience so that they do not need to manually edit or create worker files. This will be automatic if the instance names are lb and status.

    All other names are considered as workers and users will have to manually edit the worker.properties file or create it to place the load balance directive and status worker directive by themselves.

    I hope this explains the need for 'lb' and 'status' instance. Please let us know if any other information is required.

    Thanks and Regards,

    Ram Krushna

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.

  • I have got this working now.

    My issue was that i misunderstood the Tomcat clustering and the Load Balancing which are independent of each other,

    My setup now has:

    1. Apache HTTPD web server with Mod_JK installed and a virtual 'lb' and 'status' instances with a worker.properties file containing PAS instances with their respective AJP ports.

    2. I have clustered my PAS instances and they are replicating sessions between each other for this you need to turn on AJP and Clustering on each PAS instances and make sure they share the same multicast address and port, all settings are in the catalina.properties file.

    Once you have clustering working and you can test this without a load balancer, you can then test with the load balancer.

    I then set the following in the worker.properties:

    #

    # Load balancer directives

    # CJB remember to turn off sticky sessions and let the clustering support session replication

    #

    worker.lb.type=lb

    worker.lb.balance_workers=OneFormBlue,OneForm

    worker.lb.sticky_session=true

    worker.lb.sticky_session_force=false

    worker.lb.method=Request

    The key here is that i am using sticky sessions but i am not forcing them, which means if one of PAS instances goes down the Load Balancer will recognize this and move the request on to another PAS instance.

    I am doing this with the JSDO and FORM based pas instances, but its easy enough to test in POSTMAN.