Load balancing for Liferay 6.2Load balancing for Liferay 6.2https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1044257772024-03-29T05:04:25Z2024-03-29T05:04:25ZRE: Load balancing for Liferay 6.2trx xhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1061284202018-04-02T21:49:24Z2018-04-02T21:49:24ZGood analogy. I've made changes to use "round robin" for our load balancing method and also communicated to the team that we should focus more on the root cause vs. the tweaking of the load balancing. Thanks for the insights. <br /><br />Regards,<br />Traolly Xiongtrx x2018-04-02T21:49:24ZRE: Load balancing for Liferay 6.2David H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1048766052018-03-06T03:51:39Z2018-03-06T03:51:39Z<div class="quote-title">Traolly Xiong:</div><blockquote>So David, if you had a simple round robin, but due the persistence feature enabled for users, the distributed load were way off and not evenly distributed, would you be surprised for one, and two, if round-robin kept going to a server that was having performance issues (i.e. application - tomcat response time, jvm memory leak, etc.), do does the techs typical first start with troubleshooting the root issue or do they first find a solution for load balancing base on application performance (maybe that can help the other node application buy time and recover) and attack the root performance issue after?</blockquote><br /><br />You have to go after the issue. Since you're in a cluster, the issue, whatever it might be, is on both nodes. Perhaps it only triggers when a certain user does a certain thing, but in all likelihood a spike is not isolated to a single node of a cluster, typically you will see spikes randomly on all of the nodes.<br /><br />You need to find out what was going on in that server at that time, typically you'll want thread dumps for that timeframe to try and identify why the node is buckling.<br /><br />The lurking problem, the one you're not seeing, is that if one node can spike, they both can spike. If they both spike, it doesn't matter what kind of load balancing you have configured because both of the nodes will be suffering.<br /><br />If instead you solve the problem, you won't even have to look at the load balancer at all.<br /><br />Look at it this way - you have a two lane highway and sometimes there is an accident in the left lane and sometimes in the right lane. Sure, if you could route traffic to the non-accident lane, more traffic might get through temporarily, but at the end of the day unless you solve the source of the accidents, you can't keep both lanes open and busy serving traffic. By worrying about rerouting the traffic, you're trying to treat a temporary workaround as a permanent fix but it really isn't.David H Nebinger2018-03-06T03:51:39ZRE: Load balancing for Liferay 6.2trx xhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1048783222018-03-06T02:49:03Z2018-03-06T02:49:03ZHello Olaf,<br /> We are NOT suffering from any dramatic difference in performance between the 2 nodes in the cluster. Our user base is not that big to the point where the 2 nodes in the cluster can't handle them. There are certain bottlenecks at times with the application, but that's normal from my experience. It's an ongoing thing. Our team is at a point where we're trying to see where we can improve our load distribution in the cluster. We are interested to see how the others approach these situations and how they configure their load distribution; if it's a simple approach (i.e. round robin) or if it's a sophisticated approach base on performance of the application, etc. <br /><br />Hope that helps. <br /><br />Any more insights are fully appreciated. <br /><br />Thanks.trx x2018-03-06T02:49:03ZRE: Load balancing for Liferay 6.2trx xhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1048736232018-03-06T02:04:07Z2018-03-06T02:04:07ZSo David, if you had a simple round robin, but due the persistence feature enabled for users, the distributed load were way off and not evenly distributed, would you be surprised for one, and two, if round-robin kept going to a server that was having performance issues (i.e. application - tomcat response time, jvm memory leak, etc.), do does the techs typical first start with troubleshooting the root issue or do they first find a solution for load balancing base on application performance (maybe that can help the other node application buy time and recover) and attack the root performance issue after?<br /><br />ex) Browser end users based on # of requests for 7 days between two cluster nodes: Attached image "node distribution.JPG"<br />You can see that at times we have quite a good distribution, but at times, there's a big difference in requests being made to one node only. <br /><br />Let me know your thoughts. <br /><br />Thanks.trx x2018-03-06T02:04:07ZRE: Load balancing for Liferay 6.2Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1044258412018-02-23T14:55:03Z2018-02-23T14:55:03ZDo you actually suffer from dramatically different performance of the machines in the cluster? Quite often, when you are balancing for a large user base, statistics help to balance out the load with the simplest possible algorithm.<br />If you're actually suffering from different performance, I'll gladly step back and leave the stage for anybody with more experience in F5. Otherwise it looks like you might be working a non-issue. Please confirm/deny.Olaf Kock2018-02-23T14:55:03ZRE: Load balancing for Liferay 6.2David H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1044283242018-02-23T14:54:39Z2018-02-23T14:54:39ZIf you combine the concept of F5's "trigger an auto fail-over when a node URL does NOT respond in a timely fashion" with the "render the liferay home page", I think you can see how the slower node to render the page is the one that is under load.<br /><br />Honestly, though, don't overthink things. In most cases a simple round robin strategy is just fine.David H Nebinger2018-02-23T14:54:39ZLoad balancing for Liferay 6.2trx xhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1044257762018-02-23T14:43:59Z2018-02-23T14:43:59ZHello Community,<br /> Currently, we have our PROD Clustered Liferay 6.2 load balanced by our reverse proxy appliance (F5). The F5 provides a set of <br />load balancing methods (i.e. fastest node, ratio 50/50, least connections, .etc), but that those methods don't have<br />any awareness of Liferay's health (slow response times, heap usage, db response times, etc.), so my question is, how do other load <br />balancers (apache, tomcat, other appliances, etc.) load balance a 2 clustered node environment base on the Liferay's health/performance/methods vs. actual server health/performance/methods?<br /><br />NOTE: The F5 does provide health monitors applied to nodes that can trigger an auto fail-over when a node URL does NOT respond timely