For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Farhad_269561's avatar
Farhad_269561
Icon for Nimbostratus rankNimbostratus
Jun 08, 2016

Load Balancing Based on Custom Weights

We have a set of servers each one running an instance of an application that provides both Web UI and rest web service access. Web services are called in a bulk fashion, are meant for corporate users, allowing them to send one to a thousand requests per service call, while Web UI is meant for both corporate and home users storing requests one by one.

 

Request body of rest web services are simply a JSON string representing an array of request objects. I want to parse the request body, e.g. using a regex, etc., and count the number of requests in each service call and provide the request count as the request weight to load balancer, so that I can balance the work load based on each service call's internal request count.

 

Considering that the single request size in JSON differs from 1KB to aroud 32KB; request body size cannot be used as a replacement for counting the actual request objects inside the request body array.

 

As the total external web service bandwidth is around 6Mbps, there is not much data to traverse and search; however, I have two main problems: 1. Do you think custom scripting is the best solution for the mentioned problem or you think there is a more efficient solution to it?

 

  1. Assuming that the same device is going to fulfill the entire application delivery requirements, eg. SSL offloading, Application Firewalling, Connection Persistence, etc., which series of Big-IP hardware do you suggest to buy, based on your proposed solution to the above problem? More specifically 7000 or 10000 or maybe another series of products? It needs to be mentioned that the total UI bandwidth is not going to be over 300Mbps

Thanks Farhad

 

1 Reply

  • Woah, quite many questions there.

     

    For the balancing based on JSON data, I'm pretty sure only an iRule will do. You will need to collect the request payload using HTTP::collect function because JSON data is not exposed in a header. It will be quite a complicated solution, but it's doable. Only keep in mind that to manage such complex implementations, your company will always require an advanced engineer with sufficient experience in iRules (very difficult to find). A traditional IP routing expert (even if 4x CCIE) will not be good enough. The main thing to ask yourself is if the gains are really worth it. Perhaps a standard balancing based on load observation (Observed Method) is a viable and non-complex alternative.

     

    In regards to appliance recommendation, I'm not qualified to give the best answer, but considering the numbers seen, I figure that 5250v is the maximum you should consider going for at this point. It gives you a plenty of capacity for future scaling (more than 10x the current needs). 7000 Series doesn't have much added value, and 10000 series is a clear overkill. 5250v Is also one of my favorite bargains (hardware power to USD ratio). It has vCMP support which gives you the flexibility to build smaller isolated virtual appliances inside the same hardware for QA and testing environments.

     

    Hannes,