Forum Discussion

Chris_Miller's avatar
Chris_Miller
Icon for Altostratus rankAltostratus
Jul 22, 2010

Least Connections using Available App Instances

Let's assume I have 2 web servers in a pool, Server A and Server B. Server A sends traffic to App Servers A, B, and C. Server B sends traffic to App Servers D, E, and F. LTM can query the health of App Servers A-F. With the idea of somehow using the "active_members" command for this task, I've created "pool_app_A" which contains App servers A-C and "pool_app_B" which contains App servers D-F. I basically want to use Least Connections for our pool but if an App server is down, I want to use more of a ratio that represents it. I'm trying to think of the optimal way to do this:

when HTTP_REQUEST {
set app_A [active_members pool pool_app_A]
set app_B [active_members pool pool_app_B]
Now, I basically need to divide "app_A" by 3 and "app_B" by 3 to represent App health for each server in the pool. If 1 of the apps is down in pool app_A for instance, we'd want to send it less traffic.

4 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Why do you limit web A to App a.b.c and web B to App d,e,f?

     

     

    Assuming (From the context) that WebA and WebB have the same content, why not simply let both web servers use a pool of all 6 app servers?

     

     

    Apart from that, I'm not sure I follow what you want to do 100%. Are you saying you want to promote the unavailability of say appE so that webA now gets 3/5's of the load and webB gets 2/5's? If so, I'd recommend an external monitor on the web servers to set the dynamic ratios of the poolmembers based on the number of poolmembers in the app server pools... (And use dynamic ratio (By PoolMember) on the webserver pool...

     

     

    H
  • Posted By Hamish on 07/23/2010 05:09 AM

     

    Why do you limit web A to App a.b.c and web B to App d,e,f?

     

     

    Assuming (From the context) that WebA and WebB have the same content, why not simply let both web servers use a pool of all 6 app servers?

     

     

    Apart from that, I'm not sure I follow what you want to do 100%. Are you saying you want to promote the unavailability of say appE so that webA now gets 3/5's of the load and webB gets 2/5's? If so, I'd recommend an external monitor on the web servers to set the dynamic ratios of the poolmembers based on the number of poolmembers in the app server pools... (And use dynamic ratio (By PoolMember) on the webserver pool...

     

     

    H

     

     

    For this example, I significantly scaled down the number of app servers...I actually have 40 web servers and 160 app servers...different web servers use different app servers because of WebLogic Domain limitations. I'll look at dynamic ratio with external monitors quick. After looking at external monitors and dynamic ratio - I'm even more confused. My understanding for dynamic is that I need to be using snmp, wmi, or a real_server monitor...none of which I have in this case. Also, I'm not clear on how to configure an external monitor for this purpose either.
  • Hi Chris,

     

     

    What's the original use case?

     

     

    Are you trying to load balance client to web VS traffic and web to app VS traffic so that the client requests are persisted to the same web and app server? If so it might be simpler and you'd get more even distribution of traffic if you used cookie insert persistence on the app VS. If the web server requests are stateful, you could persist off of the app VS persistence cookie.

     

     

    Aaron
  • Posted By hoolio on 07/23/2010 11:58 AM

     

    Hi Chris,

     

     

    What's the original use case?

     

     

    Are you trying to load balance client to web VS traffic and web to app VS traffic so that the client requests are persisted to the same web and app server? If so it might be simpler and you'd get more even distribution of traffic if you used cookie insert persistence on the app VS. If the web server requests are stateful, you could persist off of the app VS persistence cookie.

     

     

    Aaron

     

     

    The request hits the LTM which load balances apache servers. Certain groups of apache servers have certain app instances. Using mod_weblogic on the apache boxes, traffic is sent from the apache boxes to the apps. So, number of apps indicates the processing power of a group of apache boxes. 16 app servers map to 4 specific apache servers. I'm basically persisting to these groups of apache servers, not to particular ones. The first request hits a group of all web servers (currently using least connections) and in the HTTP_RESPONSE event, I insert a cookie by comparing the IP::server_addr to a datagroup and inserting a cookie with a value that corresponds to the server group in which that box lives. The problem with doing this is that I'm treating all apache servers equal, as long as they have a single app instance, they'll pass their content health checks. I want to influence that first request load balancing algorithm by somehow including app server health.