Forum Discussion

ozdemircili_696's avatar
ozdemircili_696
Icon for Nimbostratus rankNimbostratus
Jul 01, 2010

Load balancing methods

Hi, I have 5 systems identical in S.O. level but different in hardware, running tomcat applications. CPU Memory Server 1 Dual core 3.40 8Gb Server 2 Dual core 3.00 5GB Server 3 Dual core 3.00 4GB Server 4 Dual core 3.00 4GB Server 5 Dual core 3.00 4GB Server 6 VMware virtual server 4 GB memory Until now I was using ratio based load balancing (all 2, virtual 1) What would be the best load balacing method to be used? Could you please share your experiences in the producion environment? Anyone used SNMP Dynamic Ratio monitor? (http://devcentral.f5.com/Wiki/default.aspx/AdvDesignConfig/SNMPDynamicRatioMonitor.html) Thanks

4 Replies

  • It really depends on your goal - are you trying to split requests as evenly as possible or give users the fastest response time? Since your systems aren't all the time, you'll undoubtedly want to do some sort of ratio - the question then becomes whether you'd like it to be dynamic - I'd recommend finding the system spec that most impacts user experience and base your load balancing on that. If, for instance, you have a CPU intensive application, then use that to determine your ratio - of course, since different users consume different amounts of resources, something dynamic might be the way to go.

     

     

    The SNMP monitor you linked looks very appealing because it's dynamic and also gives you a ratio - you just need to ensure the stats it uses to determine that ratio correlate to user experience. If your app doesn't even make the CPU on your boxes move, then it's not gonna matter whether you send traffic to a server with more power, however; if it's a RAM intensive app, it's a different story - trial and error might be your best bet here.

     

     

    I personally use a combination of least connections node and response time for a get request I make for my site's home page. I want to spread connections while also making sure users get the best experience possible. With that in mind, I don't want to send traffic to the fastest responding systems just because they're a tiny bit faster - I typically do least connections unless one box is responding significantly slower.
  • Hi,

     

     

    Thanks for the comment. Actually the application in all the servers are exactly the same. And it is a CPU intensive piece of application. I actually am very curious about the SNMP dynamic ratio monitor.

     

     

    Has anyone used this, or similar, SNMP monitoring in prod environment?

     

     

    Thanks

     

  • Hi,

     

     

    like 2-3 months ago or some. I test this at home on ltm vm image (and on nscaler vpx) but not on production, Rather then tomcats, It was glassfish app servers, similar to your setup.

     

     

    ""SNMP Dynamic Ratio""

     

    Checking on system resources via snmp ++ i enable snmp proxy and gfs snmp and check other stuff too such as heap mem,threat counts,memory utilization, transcation manager, http listener threat connection counts and vice versa. Its effective and works well.On java side apps, i assume its better to monitor jvm then all system resources. Also easy to follow via cacti overall whats is going on for example. (my idea) . As long as nothing goes wrong with snmp traffic. Also as it shows on url you post, recommended healtcheck interval is too long 30 seconds on production for a fail node (snmp check criteria not met) is long time going to detect then going to relesect and dispatches it to other node not sure about that.

     

     

    But the most impressive part is applying this method to mysql load balanced slaves, for example, Heavy queries came from crons vice versa, it stops traffic to them cause of snmp monitoring (perl has mysql-snmp monitoring as you know) and dispatches it to other nodes. The traffic comes from app servers i meant. Its hard to do tcp lb on sqls and monitor them but this method i tried works best for detecting sqls with lots of io usage.

     

     

    These are my expriences from tests i did at home.

     

    Take care friend. (İyi çalışmalar)

     

  • Tesekkurler! Actually that was what I was looking for. Although it was not on Prod environment it is an accurate feedback.